If you want to start working on this project, you will need to get familiar with these projects:
- Django docs
- Typing in Python
- How to write custom mypy plugins
- Typechecking Django and DRF guide
- Testing mypy stubs, plugins, and types guide
It is also recommended to take a look at these resources:
TODO
We use pip to manage the dependencies.
To install them you would need to activate your virtualenv and run install command:
pip install -r ./dev-requirements.txtWe use mypy, pytest, flake8, and black for quality control.
Here's how we run our CI.
To run typechecking use:
mypy ./mypy_django_pluginThere are unit tests and type-related tests.
To run unit tests:
pytestType-related tests ensure that different Django versions do work correctly. To run type-related tests:
python ./scripts/typecheck_tests.py --django_version=2.2
python ./scripts/typecheck_tests.py --django_version=3.0Currently we only support two Django versions.
To run auto-formatting:
isort -rc .
black django-stubs/To run linting:
flake8
flake8 --config flake8-pyi.iniWe 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.
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.