Contributing to kloppy
When contributing to this repository, please discuss the change you wish to make with the repository owners via Issues before making the change. This is to ensure that there is nobody already working on the same issue and to ensure your time as a contributor isn't wasted!
How to Contribute
All code changes happen through Pull Requests. If you would like to contribute, follow the steps below to set up the project and make changes:
- Fork the repo and create your branch from
- Make code changes to fix a bug/add features
- If you have added new code, add test(s) which cover the changes you have made. If you have updated existing code, verify that the existing tests cover the changes you have made and add/modify tests if needed.
- Ensure that tests pass.
- Ensure that your code conforms to the coding standard by either using the git hook (see instructions below) or by
executing the command
black .prior to committing your code.
- Commit your code and create your Pull Request. Please specify in your Pull Request what change you have made and please specify if it relates to any existing issues.
After you have forked the code and cloned it to your machine, execute the command
pip install -r requirements.txt
in order to install all necessary project dependencies.
This project uses the black code formatter to ensure all code conforms to a specified format. It is necessary to
format the code using black prior to committing. There are two ways to do this, one is to manually run the command
black . (to run
black on all
.py files (or,
black <filename.py> to run on a specific file).
Alternatively, it is possible to setup a Git hook to automatically run black upon a
git commit command. To do this,
follow these instructions:
- Execute the command
pre-commit installto install the Git hook.
- When you next run a
git commitcommand on the repository, black will run and automatically format any changed files. Note: if black needs to re-format a file, the commit will fail, meaning you will then need to execute
git add .and
git commitagain to commit the files updated by black.