For developers#
This page outlines some additional information for developers that intend to contribute to the package.
Installation from source#
After cloning or downloading the source code from Github and assuming you have a working Python distribution (version==3.9), you need to install a couple of dependencies before installing Medusa:
pip install poetry
Finally, install Medusa by running:
poetry install
This may take a while as it will resolve and download all dependencies. After the command has finished running, Medusa has been installed in editable mode. This means that you can edit the code and changes will be effective immediately without having to reinstall the package.
Testing#
Medusa contains an extensive set of unit tests in the tests directory (in the repository’s root). To execute all tests, run the following command in the repository root:
./ci/run_unittests
which clears all previous test outputs and runs the entire test suite with coverage. To just run pytest (the testing package that Medusa uses), run:
pytest tests/
Building documentation#
To build the documentation (website including API docs), run the following in the root of the repository:
./docs/build_docs
To just build the Python API documentation, run:
sphinx-build -b html ./docs/autoapi ./docs/autoapi/_build
To just build the website without the API docs, run:
jupyter-book build ./docs/
The website HTML code is deposited in ./docs/_build
.