Contributing to Apache Kibble

Table of contents

Community

The main development and design discussion happens on our mailing lists. We have a list specifically for development, and one for future user questions and feedback.

To join in the discussion on the design and roadmap, you can send email to dev@kibble.apache.org.
You can subscribe to the list by sending an email to dev-subscribe@kibble.apache.org.
You can also browse the archives online at lists.apache.org.

We also have:

Development installation

You should be able to install Apache Kibble by simply doing:

pip install -e ."[devel]"

This will install the Kibble package in editable mode together wit all requirements needed for fluent development.

You may also use the development Docker file:

docker build -f Dockerfile.dev -t apache/kibble-dev .
docker run apache/kibble-dev kibble
docker run apache/kibble-dev pytest

Testing

Apache Kibble project uses pytest for running testing. Writing good test helps us avoid regression and unexpected issues.

In order to run tests you all you need to do is to call pytest:

# Run all tests
pytest

# Run single test file
pytest tests/cli/commands/test_config_command.py

The test can be also run using the dev docker image:

➜ docker run apache/kibble pytest tests/cli/commands/test_config_command.py
============================= test session starts ==============================
platform linux -- Python 3.8.8, pytest-6.1.1, py-1.10.0, pluggy-0.13.1 -- /usr/local/bin/python
cachedir: .pytest_cache
rootdir: /kibble, configfile: pyproject.toml
collecting ... collected 1 item

tests/cli/commands/test_config_command.py::TestConfigCommand::test_show PASSED [100%]

============================== 1 passed in 0.02s ===============================

Code Quality

Apache Kibble project is using different tools to ensure the quality of the code, including:

All those tool can be automatically run using pre-commits. We encourage you to use pre-commits, but it's not required in order to contribute. Every change is checked on CI and if it does not pass the tests it cannot be accepted. If you want to check locally then you should install Python3.6 or newer together and run:

pip install pre-commit
# or
brew install pre-commit

For more installation options visit the pre-commits. To turn on pre-commit checks for commit operations in git, run:

pre-commit install

To run all checks on your staged files, run:

pre-commit run

To run all checks on all files, run:

pre-commit run --all-files