From b6545ddc22fcd798e92a5247cdf409d09cba9166 Mon Sep 17 00:00:00 2001 From: George Touloumes Date: Fri, 14 Aug 2026 08:50:59 -0400 Subject: [PATCH] docs: fix missing pixi -e flags in CONTRIBUTING.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every quickstart command (`pixi run test`, `test-cov`, `pre-commit ...`) omitted `-e `, so it resolved to the `default` pixi environment, which only installs bare `datajoint` — no pytest or pre-commit. Following the doc verbatim on a clean clone fails with `pytest: command not found` / `pre-commit: command not found`. Add `-e test` to the test/test-cov invocations and `-e dev` to the pre-commit invocations, matching the already-correct `-e test` usage further down in the same doc and how CI itself invokes pixi (.github/workflows/test.yaml). --- CONTRIBUTING.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a9bab3481..64ad3f6ab 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,13 +16,13 @@ git clone https://github.com/datajoint/datajoint-python.git cd datajoint-python # Run tests (containers managed automatically) -pixi run test +pixi run -e test test # Run with coverage -pixi run test-cov +pixi run -e test test-cov # Run pre-commit hooks -pixi run pre-commit run --all-files +pixi run -e dev pre-commit run --all-files ``` ### Alternative: Using pip @@ -41,8 +41,8 @@ Tests use [testcontainers](https://testcontainers.com/) to automatically manage Integration tests are **backend-parameterized** — tests using the `backend` fixture run automatically against both MySQL and PostgreSQL. ```bash -pixi run test # All tests (both backends) -pixi run test-cov # With coverage +pixi run -e test test # All tests (both backends) +pixi run -e test test-cov # With coverage pixi run -e test pytest tests/unit/ # Unit tests only pixi run -e test pytest tests/integration/test_blob.py -v # Specific file pixi run -e test pytest -m mysql # MySQL tests only @@ -69,12 +69,12 @@ Tests automatically spin up both MySQL and PostgreSQL containers via testcontain ```bash # MySQL + MinIO docker compose up -d db minio -DJ_USE_EXTERNAL_CONTAINERS=1 pixi run test +DJ_USE_EXTERNAL_CONTAINERS=1 pixi run -e test test docker compose down # MySQL + PostgreSQL + MinIO docker compose up -d db postgres minio -DJ_USE_EXTERNAL_CONTAINERS=1 pixi run test +DJ_USE_EXTERNAL_CONTAINERS=1 pixi run -e test test docker compose down ``` @@ -91,8 +91,8 @@ docker compose --profile test up djtest --build Hooks run automatically on `git commit`. All must pass. ```bash -pixi run pre-commit install # First time only -pixi run pre-commit run --all-files # Run manually +pixi run -e dev pre-commit install # First time only +pixi run -e dev pre-commit run --all-files # Run manually ``` Hooks include: **ruff** (lint/format), **codespell**, YAML/JSON/TOML validation. @@ -101,9 +101,9 @@ Hooks include: **ruff** (lint/format), **codespell**, YAML/JSON/TOML validation. ## Before Submitting a PR -1. `pixi run test` — All tests pass -2. `pixi run pre-commit run --all-files` — Hooks pass -3. `pixi run test-cov` — Coverage maintained +1. `pixi run -e test test` — All tests pass +2. `pixi run -e dev pre-commit run --all-files` — Hooks pass +3. `pixi run -e test test-cov` — Coverage maintained ---