Commands needed for setting up a development environment, building wheels,
and uploading to PyPI

# Development environment

## Create the development environment, only needed once
python3 -m venv venv

## Activate the development environment
source ./venv/bin/activate

## Install the module locally using the source in-place
python3 -m pip install --editable '.[dev, numpy]'

# Testing

The package must be installed to be tested because the C library
must be compiled and this is done during packaging.

python3 -m pip install pytest
pytest

# Update release version
The single-source package version is specified in:
src/mseedlib/__version__.py

The versioning follows the semantic versioning definition.


# Building distribution packages

Distributions are built automatically by a GitHub Action when a
release is created.

The Action has a workflow_dispatch trigger that allows manually
triggering of the build process from here:
https://github.com/EarthScope/mseedlib/actions/workflows/release.yml

This is convenient for testing the build process prior to creating
a new release.  These wheels will not be published to PyPI, that only
happens for releases created on github.com

## Triggering GitHub Actions using GH CLI
gh workflow run BuildRelease --ref <branch>

# Building distribution packages manually for testing

## Ensure required build modules are installed
python3 -m pip install build twine

## Build sdist and wheel
python3 -m build

## Test and upload to PyPI

Official releases should be built by the GitHub Action, this
is only needed in special cases, or more likely nevermore.

python3 -m twine check --strict dist/*
python3 -m twine upload dist/*

## To clean a build (requires hatch)
hatch clean
