Developer’s Guide

Managing version numbers

To assign meaning to the version number, we use semantic versioning. Technically we use the package versioneer to increment the version number. To update the version number, run the following commands:

git checkout main
git tag -a v1.2.3 -m "mapreader-1.2.3"
git push --tags

All intermediate development version numbers are automatically generated by versioneer.

Building the Conda package

The overall challenge with installing MapReader is that it some of its dependencies are only available on PyPI, whilst others are only available on conda-forge.

The solution is to create and build Conda packages that wrap each of the packages that are only available on PyPI, into a local Conda channel. This local Conda channel is then used to build the MapReader package. The following directory structure is used:

conda
├── meta.yaml            # <-- Conda recipe for MapReader
├── parhugin
│   └── conda
│       └── meta.yaml    # <-- Conda recipe for parhugin
└── ipyannotate
    └── conda
        ├── meta.yaml    # <-- Conda recipe for ipyannotate
        └── setup.py     # <-- setup script for ipyannotate (needed because the source on PyPI does not include setup.py)

The minimal build process is as follows:

mkdir /path/to/local/conda/channel
conda index /path/to/local/conda/channel
conda-build ./conda/parhugin/conda --output-folder /path/to/local/conda/channel
conda-build ./conda/ipyannotate/conda --output-folder /path/to/local/conda/channel
conda-build -c file:///path/to/local/conda/channel -conda-forge ./conda