Skip to content

Testing and Development

Caroline Fortier edited this page Sep 6, 2026 · 1 revision

Testing and Development

Development installation

git clone https://github.com/tahiri-lab/PhyloGeoPlot.git
cd PhyloGeoPlot
pip install -e ".[dev]"

Development dependencies

Development dependencies currently include:

  • pytest;
  • Jupyter.

Running tests

python -m pytest -v

The tests cover major preprocessing and visualization functionality, including:

  • metadata integration;
  • GBIF formatting;
  • phylogenetic tree construction;
  • visualization initialization;
  • trait color mapping;
  • raster configuration;
  • plotting;
  • figure export.

Headless plotting tests

Automated tests use a non-interactive Matplotlib backend so plotting functionality can be tested without opening graphical windows.

Package structure

phylogeoplot/
├── preprocessing/
│   ├── add_metadata.py
│   ├── build_phylogenetic_tree.py
│   ├── format_gbif_data.py
│   └── prepare_data.py
│
└── visualisation/
    └── tree_to_map_raster.py

Tests are located in:

tests/

Building the package

python -m pip install build
python -m build

Output is written to:

dist/

Validate distribution files

python -m pip install twine
python -m twine check dist/*

Editable development workflow

pip install -e ".[dev]"

Contributing

Before submitting changes:

  1. run the test suite;
  2. verify that existing examples continue to work;
  3. document new parameters or workflows;
  4. keep generated output and local development files out of version control.

Clone this wiki locally