separate out dev dependency groups and improve justfile recipe enviro…#143
separate out dev dependency groups and improve justfile recipe enviro…#143
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the project’s developer dependency setup by splitting the single dev dependency group into smaller, task-focused groups (typing/lint/test/docs/etc.) and updates just recipes and CI to use those groups for better environment separation.
Changes:
- Split
pyproject.tomldev dependencies into multiple[dependency-groups](typing/lint/test/coverage/precommit) and recomposedevviainclude-group. - Update
justfilerecipes to run tools with explicituvgroups (and add new type-checking / check-all targets). - Update CI workflow to run
just testand refresh the lockfile to reflect new groups and bumped tool versions.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
uv.lock |
Regenerates lockfile to reflect new dependency groups and updated tool versions. |
pyproject.toml |
Introduces separate dependency groups and updates tool version constraints. |
justfile |
Refactors recipes to use explicit uv groups; updates docs/test/type-check commands and release target dependencies. |
conftest.py |
Adds pytest hook logic to improve --trace debugging for unittest-style tests. |
.pre-commit-config.yaml |
Expands local pre-commit hooks to include typing/docs/package checks. |
.github/workflows/test.yml |
Switches CI from just test-all to just test to match updated just recipes. |
Comments suppressed due to low confidence (1)
justfile:217
precommitrunspre-commitwithout selecting theprecommitdependency group, while most other recipes explicitly select the group they need. This can makejust precommitfail in environments where only specific groups were synced/installed. Consider running it viauv runwith--no-default-groups --group precommitfor consistency and to ensure the command’s dependency is present.
precommit:
@just run pre-commit
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @just run pytest \ | ||
| -o addopts='-ra -q' \ | ||
| -s --trace --pdbcls=IPython.terminal.debugger:Pdb \ | ||
| --headed {{ TESTS }} |
There was a problem hiding this comment.
debug-test passes --headed, but there’s no dependency/plugin in this repo that provides that pytest option (e.g., pytest-playwright). This will make just debug-test … error with “unrecognized arguments: --headed”. Either remove --headed or add the required plugin and document it as a dev dependency.
| --headed {{ TESTS }} | |
| {{ TESTS }} |
| # run tests | ||
| test *TESTS: | ||
| @just run pytest --cov-append {{ TESTS }} | ||
| @just run --no-default-groups --exact --group test --isolated pytest {{ TESTS }} --cov |
There was a problem hiding this comment.
just test adds a bare --cov even though pytest is already configured with coverage options in pyproject.toml (--cov=enum_properties, --cov-branch). Passing --cov without a target can expand coverage collection to the whole environment and can change results/performance. Consider removing the extra --cov here (or replace it with --cov-append if the goal is to preserve data across multiple invocations with the same COVERAGE_FILE).
| @just run --no-default-groups --exact --group test --isolated pytest {{ TESTS }} --cov | |
| @just run --no-default-groups --exact --group test --isolated pytest {{ TESTS }} |
| test-all: | ||
| @just run pytest --cov-append | ||
| # run all checks including documentation link checking (slow) | ||
| check-all: check check-docs-links |
There was a problem hiding this comment.
check already includes check-docs-links, so check-all: check check-docs-links will run link checking twice. Either remove check-docs-links from check and keep it in check-all, or drop the redundant dependency in check-all.
| check-all: check check-docs-links | |
| check-all: check |
| "mypy>=1.19.1", | ||
| ] | ||
| lint = [ | ||
| "ruff>=0.15.0", |
There was a problem hiding this comment.
There’s trailing whitespace after the ruff requirement, which is likely to be reintroduced/flagged by whitespace linters or formatting tools. Remove the trailing space to keep the TOML clean and stable in diffs.
| "ruff>=0.15.0", | |
| "ruff>=0.15.0", |
| @just run pytest --cov-append {{ TESTS }} | ||
| @just run --no-default-groups --exact --group test --isolated pytest {{ TESTS }} --cov | ||
|
|
||
| # debug an test |
There was a problem hiding this comment.
Typo in comment: “debug an test” → “debug a test”.
| # debug an test | |
| # debug a test |
| docs-live: install-docs | ||
| @just run sphinx-autobuild doc/source doc/build --open-browser --watch src --port 8000 --delay 1 | ||
| docs-live: | ||
| @just run --no-default-groups --group docs sphinx-autobuild doc doc/_build --open-browser --watch src --port 8000 --delay 1 |
There was a problem hiding this comment.
docs-live runs sphinx-autobuild against doc/doc/_build, but the rest of the justfile (and the repository layout) uses doc/source as the source and doc/build as the build output. As written, this will fail because doc/_build doesn’t exist and it won’t pick up conf.py from doc/source. Align the paths with the other docs targets (or update the other targets if the intent is to move the docs root).
| @just run --no-default-groups --group docs sphinx-autobuild doc doc/_build --open-browser --watch src --port 8000 --delay 1 | |
| @just run --no-default-groups --group docs sphinx-autobuild ./doc/source ./doc/build/html --open-browser --watch src --port 8000 --delay 1 |
| dbg.set_break(*first_breakable_line(test)) | ||
| dbg.cmdqueue.append("continue") | ||
| dbg.set_trace() | ||
| except (OSError, AssertionError): |
There was a problem hiding this comment.
'except' clause does nothing but pass and there is no explanatory comment.
| except (OSError, AssertionError): | |
| except (OSError, AssertionError): | |
| # Best-effort debugger setup: ignore failures to locate source or set breakpoints. |
…nment separation