Skip to content

Commit 6147bfd

Browse files
authored
docs: fix missing pixi -e flags in CONTRIBUTING.md (#1541)
Every quickstart command (`pixi run test`, `test-cov`, `pre-commit ...`) omitted `-e <environment>`, 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).
1 parent 3f8a79c commit 6147bfd

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

CONTRIBUTING.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ git clone https://github.com/datajoint/datajoint-python.git
1616
cd datajoint-python
1717

1818
# Run tests (containers managed automatically)
19-
pixi run test
19+
pixi run -e test test
2020

2121
# Run with coverage
22-
pixi run test-cov
22+
pixi run -e test test-cov
2323

2424
# Run pre-commit hooks
25-
pixi run pre-commit run --all-files
25+
pixi run -e dev pre-commit run --all-files
2626
```
2727

2828
### Alternative: Using pip
@@ -41,8 +41,8 @@ Tests use [testcontainers](https://testcontainers.com/) to automatically manage
4141
Integration tests are **backend-parameterized** — tests using the `backend` fixture run automatically against both MySQL and PostgreSQL.
4242

4343
```bash
44-
pixi run test # All tests (both backends)
45-
pixi run test-cov # With coverage
44+
pixi run -e test test # All tests (both backends)
45+
pixi run -e test test-cov # With coverage
4646
pixi run -e test pytest tests/unit/ # Unit tests only
4747
pixi run -e test pytest tests/integration/test_blob.py -v # Specific file
4848
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
6969
```bash
7070
# MySQL + MinIO
7171
docker compose up -d db minio
72-
DJ_USE_EXTERNAL_CONTAINERS=1 pixi run test
72+
DJ_USE_EXTERNAL_CONTAINERS=1 pixi run -e test test
7373
docker compose down
7474

7575
# MySQL + PostgreSQL + MinIO
7676
docker compose up -d db postgres minio
77-
DJ_USE_EXTERNAL_CONTAINERS=1 pixi run test
77+
DJ_USE_EXTERNAL_CONTAINERS=1 pixi run -e test test
7878
docker compose down
7979
```
8080

@@ -91,8 +91,8 @@ docker compose --profile test up djtest --build
9191
Hooks run automatically on `git commit`. All must pass.
9292

9393
```bash
94-
pixi run pre-commit install # First time only
95-
pixi run pre-commit run --all-files # Run manually
94+
pixi run -e dev pre-commit install # First time only
95+
pixi run -e dev pre-commit run --all-files # Run manually
9696
```
9797

9898
Hooks include: **ruff** (lint/format), **codespell**, YAML/JSON/TOML validation.
@@ -101,9 +101,9 @@ Hooks include: **ruff** (lint/format), **codespell**, YAML/JSON/TOML validation.
101101

102102
## Before Submitting a PR
103103

104-
1. `pixi run test` — All tests pass
105-
2. `pixi run pre-commit run --all-files` — Hooks pass
106-
3. `pixi run test-cov` — Coverage maintained
104+
1. `pixi run -e test test` — All tests pass
105+
2. `pixi run -e dev pre-commit run --all-files` — Hooks pass
106+
3. `pixi run -e test test-cov` — Coverage maintained
107107

108108
---
109109

0 commit comments

Comments
 (0)