Skip to content

Latest commit

 

History

History
106 lines (76 loc) · 2.1 KB

CONTRIBUTING.md

File metadata and controls

106 lines (76 loc) · 2.1 KB

Development and Testing

Installing development version of pixy

Create a fresh conda environment with Python 3.8, install samtools and htslib 1.9 using the provided environment.yaml, and then install pixy and its Python dependencies with poetry.

mamba create -n pixy-dev python=3.8
mamba env update -f environment.yaml
poetry install

Primary Development Commands

To check and resolve linting issues in the codebase, run:

poetry run ruff check --fix

To check and resolve formatting issues in the codebase, run:

poetry run ruff format

To check the unit tests in the codebase, run:

poetry run pytest

To check the typing in the codebase, run:

poetry run mypy

To generate a code coverage report after testing locally, run:

poetry run coverage html

To check the lock file is up to date:

poetry check --lock

Shortcut Task Commands

To be able to run shortcut task commands, first install the Poetry plugin poethepoet:

poetry self add 'poethepoet[poetry_plugin]'

Note

Upon the release of Poetry v2.0.0, Poetry will automatically support bootstrap installation of project-specific plugins and installation of the task runner will become automatic for this project. The pyproject.toml syntax will be:

[tool.poetry]
requires-poetry = ">=2.0"

[tool.poetry.requires-plugins]
poethepoet = ">=0.29"
For Running Individual Checks
poetry task check-lock
poetry task check-format
poetry task check-lint
poetry task check-tests
poetry task check-typing
For Running All Checks
poetry task check-all
For Running Individual Fixes
poetry task fix-format
poetry task fix-lint
For Running All Fixes
poetry task fix-all
For Running All Fixes and Checks
poetry task fix-and-check-all