Contributing to Compose
Compose is a part of the Docker project, and follows the same rules and principles. Take a read of Docker's contributing guidelines to get an overview.
Pull requests will need:
If you're looking contribute to Compose but you're new to the project or maybe even to Python, here are the steps that should get you started.
- Fork https://github.com/docker/compose to your username.
- Clone your forked repository locally
git clone firstname.lastname@example.org:yourusername/compose.git.
- You must configure a remote for your fork so that you can sync changes you make with the original repository.
- Enter the local directory
- Set up a development environment by running
python setup.py develop. This will install the dependencies and set up a symlink from your
docker-composeexecutable to the checkout of the repository. When you now run
docker-composefrom anywhere on your machine, it will run your development version of Compose.
Install pre-commit hooks
This step is optional, but recommended. Pre-commit hooks will run style checks and in some cases fix style issues for you, when you commit code.
To run the style checks at any time run
tox -e pre-commit.
Submitting a pull request
See Docker's basic contribution workflow for a guide on how to submit a pull request for code or documentation.
Running the test suite
Use the test script to run linting checks and then the full test suite against different Python interpreters:
Tests are run against a Docker daemon inside a container, so that we can test
against multiple Docker versions. By default they'll run against only the latest
Docker version - set the
DOCKER_VERSIONS environment variable to "all" to run
against all supported versions:
$ DOCKER_VERSIONS=all script/test/default
script/test/default are passed through to the
tox executable, so
you can specify a test directory, file, module, class or method:
$ script/test/default tests/unit $ script/test/default tests/unit/cli_test.py $ script/test/default tests/unit/config_test.py::ConfigTest $ script/test/default tests/unit/config_test.py::ConfigTest::test_load
Finding things to work on
We use a ZenHub board to keep track of specific things we are working on and planning to work on. If you're looking for things to work on, stuff in the backlog is a great place to start.
For more information about our project planning, take a look at our GitHub wiki.