How to contribute
First steps
- Fork our repo, here's the guide on forking
- Clone your new repo (forked repo) to have a local copy of the code
- Apply the required changes!
- Send a Pull Request to our original repo. Here's the helpful guide on how to do that
Dependencies
We use poetry to manage the dependencies.
To install them you would need to run install
command:
poetry install
To activate your virtualenv
run poetry shell
.
Two magic command
Run make autotests
or make lint
to run checks in docker/
Tests
We use pytest
and flake8
for quality control.
We also use wemake_python_styleguide
.
To run all tests:
pytest
To run linting:
flake8 .
Before submitting
Before submitting your code please do the following steps:
- Run
pytest
to make sure everything was working before - Add any changes you want
- Add tests for the new changes
- Edit documentation if you have changed something significant
- Update
CHANGELOG.md
with a quick summary of your changes - Run
pytest
again to make sure it is still working - Run
flake8
to ensure that style is correct
You can run everything at once with make autotests
,
run make help
for more details.
Notes for maintainers
This section is intended for maintainers only. If you are not a maintainer (or do not know what it means), just skip it. You are not going to miss anything useful.
Making new release
Releases are shipped using git-flow https://danielkummer.github.io/git-flow-cheatsheet/index.html
This command has to be run only once to set up git flow, keep default value for all parameters.
git flow init
-
Update master and develop branches
git checkout develop && git pull git checkout master && git pull
-
Start a new release
git flow release start <VERSION>
<VERSION>
- new release version -
Update CHANGELOG.md
-
Update project version
poetry version <VERSION>
-
Commit project configuration with the new version
git commit -m "bump version" pyproject.toml
-
Finish building a release
git flow release finish <VERSION>
-
Push all the changes into the repository
git push origin master develop --follow-tags
-
Create a new release specifying pushed tag