Thank you for thinking about contributing to repo2docker! This is an open source project that is developed and maintained entirely by volunteers. Your contribution is integral to the future of the project. THANK YOU!
There are many ways to contribute to repo2docker:
If you’re not sure where to get started, then please come and say hello in our Gitter channel, or open an discussion thread at the Jupyter discourse forum.
This outlines the process for getting changes to the repo2docker project merged.
Identify the correct issue template: bug report or feature request.
Bug reports (examples, new issue) will ask you for a description of the problem, the expected behaviour, the actual behaviour, how to reproduce the problem, and your personal set up. Bugs can include problems with the documentation, or code not running as expected.
It is really important that you make it easy for the maintainers to reproduce the problem you’re having. This guide on creating a minimal, complete and verifiable example is a great place to start.
Feature requests (examples, new issue) will ask you for the proposed change, any alternatives that you have considered, a description of who would use this feature, and a best-guess of how much work it will take and what skills are required to accomplish.
Very easy feature requests might be updates to the documentation to clarify steps for new users. Harder feature requests may be to add new functionality to the project and will need more in depth discussion about who can complete and maintain the work.
Feature requests are a great opportunity for you to advocate for the use case you’re suggesting. They help others understand how much effort it would be to integrate the work,and - if you’re successful at convincing them that this effort is worth it - make it more likely that they to choose to work on it with you.
Open an issue. Getting consensus with the community is a great way to save time later.
Make edits in your fork of the repo2docker repository.
Make a pull request. Read the next section for guidelines for both reviewers and contributors on merging a PR.
Edit the changelog by appending your feature / bug fix to the development version.
Wait for a community member to merge your changes. Remember that someone else must merge your pull request. That goes for new contributors and long term maintainers alike.
(optional) Deploy a new version of repo2docker to mybinder.org by following these steps
These are not hard rules to be enforced by 🚓 but they are suggestions written by the repo2docker maintainers to help complete your contribution as smoothly as possible for both you and for them.
[WIP]
git log --merges --pretty=format:"%h %<(10,trunc)%an %<(15)%ar %s" <deployed-revision>..
[MRG]
docs/source/changelog.rst
To develop & test repo2docker locally, you need:
First, you need to get a copy of the repo2docker git repository on your local disk. Fork the repository on GitHub, then clone it to your computer:
git clone https://github.com/<your-username>/repo2docker
This will clone repo2docker into a directory called repo2docker. You can make that your current directory with cd repo2docker.
repo2docker
cd repo2docker
After cloning the repository, you should set up an isolated environment to install libraries required for running / developing repo2docker.
There are many ways to do this but here we present you with two approaches: virtual environment or pipenv.
virtual environment
pipenv
python3 -m venv . source bin/activate pip3 install -e . pip3 install -r dev-requirements.txt pip3 install -r docs/doc-requirements.txt pip3 install black
This should install all the libraries required for testing & running repo2docker!
Note that you will need to install pipenv first using pip3 install pipenv. Then from the root directory of this project you can use the following commands:
pip3 install pipenv
pipenv install --dev
This should install both the dev and docs requirements at once!
We use black as code formatter to get a consistent layout for all the code in this project. This makes reading the code easier.
black
To format your code run black . in the top-level directory of this repository. Many editors have plugins that will automatically apply black as you edit files.
black .
We also have a pre-commit hook setup that will check that code is formatted according to black’s style guide. You can activate it with pre-commit install.
pre-commit install
As part of our continuous integration tests we will check that code is formatted properly and the tests will fail if this is not the case.
If you do not already have Docker, you should be able to download and install it for your operating system using the links from the official website. After you have installed it, you can verify that it is working by running the following commands:
docker version
It should output something like:
Client: Version: 17.09.0-ce API version: 1.32 Go version: go1.8.3 Git commit: afdb6d4 Built: Tue Sep 26 22:42:45 2017 OS/Arch: linux/amd64 Server: Version: 17.09.0-ce API version: 1.32 (minimum version 1.12) Go version: go1.8.3 Git commit: afdb6d4 Built: Tue Sep 26 22:41:24 2017 OS/Arch: linux/amd64 Experimental: false
Then you are good to go!
If you only changed the documentation, you can also build the documentation locally using sphinx .
sphinx
pip install -r docs/doc-requirements.txt cd docs/ make html
Then open the file docs/build/html/index.html in your browser.
docs/build/html/index.html