Developer Guide
Installation guide
The Python implementation of DePSI is under development. At present you can only install it from the GitHub repository.
It is assumed that you have mamba
installed. If not, you can find the installation instructions here. Other package managers like conda
or venv
can be used as well.
Clone this repository and cd
into it:
Create a new conda environment (here we give an example name depsi-dev
) with mamba
.:
Here we use Python 3.12 since we aim to support python 3.10 and above.
Activate the environment:
Install this package in development mode, with extra dependencies for development and documentation:
In the end, install the pre-commit hooks, which will run the checks before each commit:
Linting and formatting
We use ruff
for linting and formatting. If the pre-commit hooks are installed, the checks will be run automatically before each commit.
To manually run the checks, use the following command in the root directory of the repository:
Testing
We use pytest
for testing. All tests are located in the tests
directory.
To run the tests, use the following command in the root directory of the repository:
The GitHub Actions will run the tests automatically for each push and pull-request
on the main
branch.
Documentation
We use mkdocs
for documentation.
To check the documentation at local, use the following command in the root directory of the repository:
This will build and render the documentation at a local server. Follow the link provided in the terminal to view the documentation in the browser.