Skip to content

Development

Enes Ergin edited this page May 25, 2026 · 1 revision

Development

Setup

git clone https://github.com/LangeLab/PXAudit.git
cd PXAudit
uv sync
uv run pre-commit install

Project layout

src/pxaudit/
├── __init__.py        # Version, PRIDE prefix
├── cli.py             # Click commands: check, bulk-audit, manifest
├── tier_engine.py     # FAIR ladder scoring + quant tier logic
├── file_classifier.py # Filename to FileClass mapping
├── pride_client.py    # PRIDE REST API v3 client
├── db.py              # SQLite schema, inserts, migrations
└── cache.py           # Local JSON response cache

Running tests

uv run pytest                              # unit tests (no network)
uv run pytest --cov=pxaudit                # with coverage report
uv run pytest -m integration -v --no-cov   # live API tests (requires network)

There are 455 unit tests and 12 integration tests, all at 100% branch coverage.

Code quality checks

Everything is enforced in CI and pre-commit:

  • ruff check: linting (E, F, W, I, UP, B, SIM rules)
  • ruff format --check: formatting (line length 100)
  • mypy src/ tests/: strict type checking
  • pytest --cov-fail-under=100: coverage must stay at 100%

Run them all locally:

uv run ruff check src/ tests/
uv run ruff format --check src/ tests/
uv run mypy src/ tests/
uv run pytest --cov=pxaudit --cov-fail-under=100

Style guide

See plan/STYLE.md for conventions on docstrings, comments, imports, naming, error handling, and testing.

Adding documentation

Wiki pages live in wiki/ and use standard Markdown. GitHub Wiki links use [[Page Name]] syntax. Add new pages to _Sidebar.md under the appropriate section. The _Footer.md renders at the bottom of every page when synced to GitHub Wiki.

Page template:

# Title

Brief description of what this page covers (one paragraph).

## Section one

Content here. Use `: ` for definition lists instead of `--`.

## Section two

```bash
# Code examples where useful

When adding a page that documents a feature, include version tags in the footer comment to track when it was introduced or changed.

PXAudit

Getting started

Concepts

Contributing

Clone this wiki locally