We use poetry to manage the dependencies.
To install them you would need to run install command:
poetry installTo activate your virtualenv run poetry shell.
We use pytest, flake8 and various pre-commit hooks for quality control.
To run all tests:
pytestTo run linting:
flake8 .To update snapshots:
pytest --snapshot-updateThese steps are mandatory during the CI.
For a fast feedback loop you can run the pre-commit hooks locally on all files via:
pre-commit run --all-filesWe use mypy to run type checks on our code.
To use it:
mypy dump_envThis step is mandatory during the CI.
We use trunk based
development (we also sometimes call it wemake-git-flow).
What the point of this method?
- We use protected
masterbranch, so the only way to push your code is via pull request - We use issue branches: to implement a new feature or to fix a bug
create a new branch named
issue-$TASKNUMBER - Then create a pull request to
masterbranch - We use
git tags to 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 master branch.
Before submitting your code please do the following steps:
- Run
pytestto 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.mdwith a quick summary of your changes - Run
pytestagain to make sure it is still working - Run
mypyto ensure that types are correct - Run
flake8to ensure that style is correct - Run
doc8to ensure that docs are correct
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.