PDM is used for dependency and package management. The steps for setting up the development environment:
-
Install PDM: either globally, or in a Python virtual environment (using
pip install pdm
). -
Install the project (if outside a virtual environment, PDM will create one):
$ pdm install
During development, the command pdm run checks
will execute a number of checks and tests on the library codebase:
- code linting check using
ruff
- code format check using
ruff format
- import statement sorting check using
isort
- documentation styling check using
pydocstyle
The full unit test suite can be executed with pdm run tests
.
To preview the documentation locally, first install the dependencies:
$ pdm install -G docs
The project documentation can then be served locally by running:
$ mkdocs serve
To build the static documentation site, run:
$ mkdocs build
This will create the HTML documentation in the site
directory.