Skip to content

Comments

separate out dev dependency groups and improve justfile recipe enviro…#143

Merged
bckohan merged 4 commits intomainfrom
justupdates
Feb 6, 2026
Merged

separate out dev dependency groups and improve justfile recipe enviro…#143
bckohan merged 4 commits intomainfrom
justupdates

Conversation

@bckohan
Copy link
Owner

@bckohan bckohan commented Feb 6, 2026

…nment separation

Copilot AI review requested due to automatic review settings February 6, 2026 18:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.toml dev dependencies into multiple [dependency-groups] (typing/lint/test/coverage/precommit) and recompose dev via include-group.
  • Update justfile recipes to run tools with explicit uv groups (and add new type-checking / check-all targets).
  • Update CI workflow to run just test and 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

  • precommit runs pre-commit without selecting the precommit dependency group, while most other recipes explicitly select the group they need. This can make just precommit fail in environments where only specific groups were synced/installed. Consider running it via uv run with --no-default-groups --group precommit for 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 }}
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
--headed {{ TESTS }}
{{ TESTS }}

Copilot uses AI. Check for mistakes.
# run tests
test *TESTS:
@just run pytest --cov-append {{ TESTS }}
@just run --no-default-groups --exact --group test --isolated pytest {{ TESTS }} --cov
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

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

Suggested change
@just run --no-default-groups --exact --group test --isolated pytest {{ TESTS }} --cov
@just run --no-default-groups --exact --group test --isolated pytest {{ TESTS }}

Copilot uses AI. Check for mistakes.
test-all:
@just run pytest --cov-append
# run all checks including documentation link checking (slow)
check-all: check check-docs-links
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
check-all: check check-docs-links
check-all: check

Copilot uses AI. Check for mistakes.
"mypy>=1.19.1",
]
lint = [
"ruff>=0.15.0",
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
"ruff>=0.15.0",
"ruff>=0.15.0",

Copilot uses AI. Check for mistakes.
@just run pytest --cov-append {{ TESTS }}
@just run --no-default-groups --exact --group test --isolated pytest {{ TESTS }} --cov

# debug an test
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

Typo in comment: “debug an test” → “debug a test”.

Suggested change
# debug an test
# debug a test

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

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

Suggested change
@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

Copilot uses AI. Check for mistakes.
dbg.set_break(*first_breakable_line(test))
dbg.cmdqueue.append("continue")
dbg.set_trace()
except (OSError, AssertionError):
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

'except' clause does nothing but pass and there is no explanatory comment.

Suggested change
except (OSError, AssertionError):
except (OSError, AssertionError):
# Best-effort debugger setup: ignore failures to locate source or set breakpoints.

Copilot uses AI. Check for mistakes.
@bckohan bckohan merged commit 30cc2f9 into main Feb 6, 2026
27 checks passed
@bckohan bckohan deleted the justupdates branch February 9, 2026 18:50
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.

1 participant