We use uv to manage the dependencies and just as a command runner.
To install project dependencies via uv run:
uv sync --all-groups --all-extrasTo install just run:
uv tool install rust-justTo install project dependencies via just run:
just installTo activate your virtualenv run:
source .venv/bin/activateWe also ship some optimized C-extensions together with our Python code. If you want to build them run:
just mypycThis will build dmr.compiled extensions
with mypyc.
After you installed the deps, run just test to run all the checks we have!
To see all available commands:
justTo run tests:
just unitTo run linting:
just lintThese steps are mandatory during the CI.
To build docs locally:
just docsIf docs build fails on macOS with multiprocessing-related errors while running examples, force the start method explicitly:
DMR_SPAWN_METHOD=spawn just docsWe use trunk based
development (we also sometimes call it wemake-git-flow).
What is 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
just testto 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
just testagain to make sure it is still working
We use Django's built-in i18n system. Translation files live in dmr/locale/.
- Generate a
.pofile for your locale:uv run django-admin makemessages --locale <lang>
- Fill in the
msgstrvalues indmr/locale/<lang>/LC_MESSAGES/django.po - Compile and validate all translations:
just translations
- Commit both
django.poanddjango.mofiles
- Edit
dmr/locale/<lang>/LC_MESSAGES/django.po - Compile and validate:
just translations
- Commit both
django.poanddjango.mofiles
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.