Skip to content

Latest commit

 

History

History
67 lines (52 loc) · 1.63 KB

File metadata and controls

67 lines (52 loc) · 1.63 KB

Developer setup (Linux)

To get setup for development, see this video if you prefer VS Code, or this older video if you prefer PyCharm, and the instructions below.

1. Fork and clone this repo

git clone git@github.com:[username]/malariagen-data-python.git
cd malariagen-data-python

2. Install Python

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.10 python3.10-venv

3. Install pipx and poetry

python3.10 -m pip install --user pipx
python3.10 -m pipx ensurepath
pipx install poetry

4. Create and activate development environment

poetry install
poetry shell

5. Install pre-commit hooks

pipx install pre-commit
pre-commit install

Run pre-commit checks manually:

pre-commit run --all-files

6. Run tests

Run fast unit tests using simulated data:

poetry run pytest -v tests/anoph

7. Google Cloud authentication (for legacy tests)

To run legacy tests which read data from GCS, you'll need to request access to MalariaGEN data on GCS.

Once access has been granted, install the Google Cloud CLI:

./install_gcloud.sh

Then obtain application-default credentials:

./google-cloud-sdk/bin/gcloud auth application-default login

Once authenticated, run legacy tests:

poetry run pytest --ignore=tests/anoph -v tests

Tests will run slowly the first time, as data will be read from GCS and cached locally in the gcs_cache folder.