How to contribute¶
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.
One magic command¶
Run make test to run everything we have!
Tests¶
We use pytest and flake8 for quality control.
We also use wemake_python_styleguide to enforce the code quality.
To run all tests:
make unit
To run linting:
make lint
Keep in mind: default virtual environment folder excluded by flake8 style checking is .venv.
If you want to customize this parameter, you should do this in setup.cfg.
These steps are mandatory during the CI.
Type checks¶
We use mypy to run type checks on our code.
To use it:
make mypy
This step is mandatory during the CI.
Submitting your code¶
What the point of this method?
We use protected
mainbranch, so the only way to push your code is via pull requestWe use issue branches: to implement a new feature or to fix a bug create a new branch named
issue-$TASKNUMBERThen create a pull request to
mainbranchWe use
git tagto make releases, so we can track what has changed since the latest release
So, this way we achieve an easy and scalable development process which frees us from merging hell and long-living branches.
In this method, the latest version of the app is always in the main branch.
Before submitting¶
Before submitting your code please do the following steps:
Run
make testto make sure everything was working beforeAdd any changes you want
Add tests for the new changes
Edit documentation if you have changed something significant
Run
make testagain to make sure it is still working
Other help¶
You can contribute by spreading a word about this library. It would also be a huge contribution to write a short article on how you are using this project. You can also share your best practices with us.