Development process and tools¶
The project is made of several packages, but live in a single repository (a “monorepo”).
You will need also an instance of Docker, either locally or remotely (in which case you should set the
DOCKER_HOST environment variable accordingly).
Monorepo and virtual environments¶
The project is a monorepo, so you need to install all dependencies in a single virtual environment.
To start hacking on the project, you should mostly need to type:
This single environment can be used to develop all packages (i.e. you don’t need to activate a specific environment for each package).
But since all subpackages have different sets of dependencies, you can use Nox to run lint and tests for each subpackage:
nox -e lint
nox -e test
# Or just
Testing and static analysis¶
You can run unit tests with:
nox -e test
End-to-end tests (e2e)¶
We also provide a script to run the end-to-end tests, which are located in the
These tests leverage a virtual machine managed by Vagrant, to start from a clean state each time. They take quite a bit of time, though.
You can run them with either:
from the top level directory, or:
We leverage several Python tools to perform static analysis:
Each tool is configured in the
pyproject.toml file or
setup.cfg file of each package, or from the top level
You can run all static analysis tools with:
nox -e lint
Makefile and Invoke¶
We provide a Makefile to ease some common tasks. Type
make help to get a list of the most useful available targets.
For a few complex tasks, we also provide a
tasks.py file, which can be used with Invoke. Type
invoke --list (or
inv -l) to get a list of the available tasks.
Nua uses Abilian DevTools to manage its QA process.
To release a new version on PyPI:
invoke bump-versionfrom the main branch. (
invoke bump-version minorfor a minor release,
invoke bump-version majorfor a major release)
Commit the changes, and push them to the main branch.
invoke release. This will, among other things:
- Merge the main branch into the release branch.
- Replace relative packages paths with PyPI package names.
- Apply the proper tag
- Build and publish the package on PyPI.
- Build and publish the documentation on GitHub Pages.
release merge may fail. In this case, fix the conflicts, commit and push the changes, checkout
main again then run
invoke release again. This should work eventually.