From 8c9b38eb2286c9a80d59fb42e37d31b618e43abf Mon Sep 17 00:00:00 2001 From: Hasnain Ibrar Date: Mon, 7 Sep 2026 17:35:06 +0300 Subject: [PATCH] docs: correct the contributor test command The contributor setup and validation steps told readers to run `uv run --no-sync pytest -q`. From a clean checkout that fails during collection, because five root-level tooling tests import the top-level `utils` package: ERROR tests/test_ci_scope.py ERROR tests/test_normalize_sdist.py ERROR tests/test_published_distribution.py ERROR tests/test_release_contract.py ERROR tests/test_release_notes.py ModuleNotFoundError: No module named 'utils' !!!! Interrupted: 5 errors during collection !!!! The repository has no pytest configuration and no `conftest.py`, so nothing places the repository root on the import path. `python -m pytest` does, and collects the suite cleanly. CI does not catch this because it runs `python -m unittest discover -s tests`, which prepends the working directory for the same reason. Use `python -m pytest` in both validation steps and in the coding-agent instructions, and record why the invocation matters so it is not shortened again. `docs/benchmarking/runtime_validation.md` already notes that the automated suite depends on import-path selection. Documentation only. Verified with `python -m pytest -q --collect-only` (740 tests collected, no errors) and `markdownlint-cli2@0.23.2` on both changed files. Co-Authored-By: Claude Opus 5 (1M context) --- AGENTS.md | 2 +- docs/CONTRIBUTING.md | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 5fb1c80..0b6958f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -23,7 +23,7 @@ from the contributing guide before submitting a pull request. Common checks: ```bash uv run --no-sync ruff check . -uv run --no-sync pytest -q +uv run --no-sync python -m pytest -q npm --prefix desktop run check ``` diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 1fcb66d..e4f4a48 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -62,9 +62,13 @@ Initialize and verify the local media runtime: uv run --no-sync vidxp init uv run --no-sync vidxp --version uv run --no-sync vidxp doctor -uv run --no-sync pytest -q +uv run --no-sync python -m pytest -q ``` +Run the test suite as `python -m pytest`. That form puts the repository root +on the import path, which the root-level tooling tests require. Calling +`pytest` directly fails to collect them. + `vidxp init` verifies FFmpeg, ffprobe, `libx264`, and `aac`. A fresh checkout may report that model files have not been prepared; that is expected. Prepare only the capability needed for manual testing: @@ -143,7 +147,7 @@ Common checks are: ```bash uv run --no-sync ruff check . -uv run --no-sync pytest -q +uv run --no-sync python -m pytest -q npm --prefix desktop run check docker compose config --quiet ```