Skip to content

docs: fix missing pixi -e flags in CONTRIBUTING.md - #1541

Merged
dimitri-yatsenko merged 1 commit into
masterfrom
docs/pixi-run-env-flags
Aug 14, 2026
Merged

docs: fix missing pixi -e flags in CONTRIBUTING.md#1541
dimitri-yatsenko merged 1 commit into
masterfrom
docs/pixi-run-env-flags

Conversation

@gtouloumes

Copy link
Copy Markdown
Collaborator

Why

Every top-level pixi run command in the Quick Start and "Before Submitting
a PR" sections (pixi run test, pixi run test-cov, pixi run pre-commit ...) omits -e <environment>. Without it, pixi resolves the task against
the default environment, which only installs the bare datajoint package
([tool.pixi.pypi-dependencies]) — pytest and pre-commit only exist in the
test/dev feature environments. Following the Quick Start verbatim on a
clean clone fails on the very first command:

✨ Pixi task (test in default): pytest tests/
pytest: command not found

This also left the doc inconsistent with itself (the finer-grained examples
a few lines down already use -e test, e.g. pixi run -e test pytest tests/unit/) and with CI, which always calls pixi run -e <env> ...
(.github/workflows/test.yaml:55,70), never a bare pixi run <task>.

What

  • pixi run test / test-covpixi run -e test test / test-cov
    (Quick Start, Running Tests, External Containers, Before Submitting a PR)
  • pixi run pre-commit ...pixi run -e dev pre-commit ...
    (Quick Start, Pre-commit Hooks, Before Submitting a PR)
  • No behavior change — same tasks, correct environment. Doc-only.

Test plan

  • pixi run -e test pytest --version resolves (bare pixi run test
    previously failed with pytest: command not found)
  • pixi run -e dev pre-commit --version resolves
  • pixi run -e test test runs the full suite successfully (994 passed, 14 skipped)
  • N/A CI (docs-only change, no code touched)

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).

@dimitri-yatsenko dimitri-yatsenko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified against pyproject.toml: test/test-cov are global [tool.pixi.tasks], so a bare pixi run test runs in the default environment, whose base deps are just editable datajoint — pytest/pre-commit are in the test/dev features only. So bare pixi run test does fail with pytest: command not found, and the fix matches CI (pixi run -e <env> …). Correctly adds -e test to the test tasks and -e dev to pre-commit (pre-commit is in the dev feature), and only touches the bare commands. Clean doc fix — thanks @gtouloumes!

@dimitri-yatsenko
dimitri-yatsenko merged commit 6147bfd into master Aug 14, 2026
3 checks passed
@dimitri-yatsenko
dimitri-yatsenko deleted the docs/pixi-run-env-flags branch August 14, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants