This Python package provides convenience methods for accessing data from MalariaGEN.
The malariagen_data
Python package is available from the Python
package index (PyPI) and can be installed via pip
, e.g.:
$ pip install malariagen-data
Documentation of classes and methods in the public API are available from the following locations:
See GitHub releases for release notes.
To get setup for development, see this video and the instructions below.
Fork and clone this repo:
git clone [email protected]:[username]/malariagen-data-python.git
Install Python 3.8 (current recommended version for local development), e.g.:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.8 python3.8-venv
Install pipx, e.g.:
python3.8 -m pip install --user pipx
python3.8 -m pipx ensurepath
Install poetry, e.g.:
pipx install poetry==1.4.1 --python=/usr/bin/python3.8
Create development environment:
cd malariagen-data-python
poetry use 3.8
poetry install
Activate development environment:
poetry shell
Install pre-commit and pre-commit hooks:
pipx install pre-commit --python=/usr/bin/python3.8
pre-commit install
Run pre-commit checks (isort, black, blackdoc, flake8, ...) manually:
$ pre-commit run --all-files
Run tests:
$ poetry run pytest -v
Tests will run slowly the first time, as data required for testing will be read from GCS. Subsequent runs will be faster as data will be cached locally in the "gcs_cache" folder.
Create a new GitHub release. That's it. This will automatically trigger publishing of a new release to PyPI via GitHub actions.