We recommend using uv
for all packaging related commands.
pip install uv
uv --help
Install the pre-commit hooks for formatting code:
uv tool install pre-commit
pre-commit install
If you are running on PACE, then run the following command to activate the environment:
source scripts/activate
This will activate the virtual environment and setup packages and cache directories. This script is also used within sbatch jobs.
Follow typical python packaging conventions. Create a virtual environment and install it in editable mode.
# create a virtualenvironment
uv venv
# activate it
source .venv/bin/activate
# install the package
uv pip install -e ".[dev]"
Make sure the package works as expected:
birdclef --help
Run the tests:
# if you are on PACE
./scripts/slurm-test
# if you are on localhost
pytest -vv tests