Principled probabilistic modelling with Mutual Hazard Networks.
- Documentation: https://cbg-ethz.github.io/pMHN
- Source code: https://github.com/cbg-ethz/pMHN
- Bug reports: https://github.com/cbg-ethz/pMHN/issues
To facilitate reproducibility we use Snakemake. We recommend creating a new virtual environment (e.g., using Micromamba) and installing Snakemake as described in their documentation.
Once the environment is set, the package can be installed using
$ pip install -e . # Note -e which will allow modifying the code when needed
We use Poetry to control dependencies.
When Poetry is installed, clone the repository and type
$ poetry install --with dev
to install the package with the dependencies used for development.
At this stage you should be able to use Pytest to run unit tests:
$ poetry run pytest
Alternatively, you may want to work inside Poetry environment:
$ poetry shell
$ pytest
When you submit a pull request, automated continuous integration tests will be run. They include unit tests as well as code quality checks. To run the code quality checks automatically at each commit made, we use pre-commit. To activate it run:
$ poetry shell # If it is not already active
$ pre-commit install
This package is built around LearnMHN (the backend for Mutual Hazard Networks) and PyMC (probabilistic programming framework).