Develop¶
Install the development dependencies¶
Follow the uv instructions to clone and create a virtual environment first.
Then, install the development dependencies, including the test, linting and documentation requirements:
uv sync --all-groups --all-extras
Recommended tools¶
The following tools are all part of the lint group defined in the pyproject.toml file
(see above):
They play well in an IDE such as VSCode or PyCharm, which can run them automatically during editing.
Run unit tests¶
Without MPI:
pytest
With MPI:
mpirun -np 6 python -m pytest -svv --with-mpi
Build documentation¶
Generate documentation in watch mode:
sphinx-autobuild docs/source docs/build/html --watch src/
The documentation is locally accessible at http://127.0.0.1:8000 and will automatically reload when changes are made (either to the documentation source files or the code).