You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Discuss which checks and tests belong in pre-commit hooks #995
Agree as a group on which checks and tests should run in pre-commit hooks, and which should run only through explicit developer commands or CI.
Requested by @knoepfel during review of PR #975. This discussion is a follow-up and must not block that PR.
Context
The existing scripts-unit-tests hook in .pre-commit-config.yaml runs pytest scripts/test/ -v in a pre-commit-managed Python environment. PR #975 broadens its file scope to scripts/, ci/, and .devcontainer/, and removes the Python-only file filter.
The review raised a policy question about running pytest during commits. The hook provides automatic local checks without requiring developers to select an environment and invoke pytest manually, but the group should agree on the appropriate scope and cost of commit-time checks.
Discussion topics
Which formatting, linting, static analysis, and test checks should run before each commit?
Should pytest run in pre-commit, and if so, which tests and file triggers should apply?
What runtime and environment requirements are acceptable for local hooks?
Which checks should remain in CI or run through explicit developer commands?
Desired outcomes
Agree on the checks and tests that belong in pre-commit.
Define the scope and triggers for any commit-time tests.
Document the agreed policy and how developers run checks outside pre-commit.
Identify any follow-up changes to .pre-commit-config.yaml, test commands, or CI workflows.
Activity
pcanal commentedon Oct 20, 2026
The test commented upon on https://github.com/Framework-R-D/phlex/pull/975/changes/BASE..301d05655a575af577a91b75cfe821181cbc435c#r4314426250 really seems to build to the build/ctest step rather than the (pre)commit step.