Repository navigation
Infra: Fixed files for pre-commit and added GH workflow for pre-commit - #802
Open
MonkeyCanCode wants to merge 4 commits into
Open
MonkeyCanCode wants to merge 4 commits into
MonkeyCanCode wants to merge 4 commits into
Conversation
MonkeyCanCode
requested review from
christianeu-db and
jbonofre
and
a balanced review from Copilot
and removed request for
Copilot
November 22, 2026 21:19
Copilot stopped reviewing on behalf of
MonkeyCanCode due to an error
November 22, 2026 21:21
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The return documentation in validation/validate.py incorrectly implies that FILTER returns None, rather than an error message, and must distinguish it from a valid call without FILTER.
1 open issue
What changed in this PR
This follow-up to #682 brings the codebase into alignment with the existing pre-commit rules and adds automated enforcement through GitHub Actions.
Changes:
- Adds a workflow that runs
make pre-commiton pushes and pull requests tomain. - Applies Ruff formatting, import cleanup, and Python syntax modernization; includes
ost/srcin Ruff’s source paths. - Preserves existing enum stringification with explicit lint exemptions and a regression test, alongside whitespace cleanup.
| File | Description |
|---|---|
validation/validate.py |
Formats validator code, revises docstrings, and simplifies caching. |
validation/tests/test_vendor_validators.py |
Formats vendor-validator tests. |
validation/tests/test_validate.py |
Formats tests and modernizes UTC and zip usage. |
validation/tests/test_ontology.py |
Formats ontology and mapping tests. |
validation/tests/test_generate_spec_types.py |
Formats generator tests and revises docstrings. |
validation/test_validate.py |
Formats loader and command-line tests. |
scripts/tests/test_audit_spec_changes.py |
Organizes imports and formats audit tests. |
scripts/generate-spec-types.py |
Organizes imports and modernizes string formatting. |
scripts/audit-spec-changes.py |
Organizes imports and formats argument handling. |
ruff.toml |
Adds ost/src to source paths. |
python/tests/test_validation.py |
Organizes imports and formats validation tests. |
python/tests/test_serialization.py |
Formats serialization tests and revises helper docstrings. |
python/tests/test_models.py |
Adds enum stringification coverage and formats model tests. |
python/tests/test_loading.py |
Formats YAML and JSON loading tests. |
python/tests/test_ai_context_serialization.py |
Formats test signatures. |
python/src/ossie/models.py |
Modernizes type annotations while retaining existing enum behavior. |
python/src/ossie/__init__.py |
Sorts imports without changing exports. |
ost/tests/test_runner.py |
Separates third-party and project imports. |
ost/tests/test_parser.py |
Adjusts import spacing and assertion formatting. |
ost/tests/test_cli.py |
Adjusts import spacing and call formatting. |
DISCLAIMER |
Removes a trailing blank line. |
core-spec/expression_language.md |
Cleans trailing whitespace without changing specification text. |
compliance/portability/grader/test_grade.py |
Formats portability-grader tests. |
compliance/portability/grader/grade.py |
Formats grader code, revises docstrings, and simplifies caching. |
.github/workflows/pre-commit-ci.yml |
Adds automated pre-commit checks using Python and uv. |
.editorconfig |
Adds the final newline. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Follow up PR for #682 where now we re-format files for ruff rules and added a pre-commit hook in workflow.
Related Issues
Checklist
Specification
core-spec/and follow the existing structure[DISCUSS]thread ondev@with a stated end date, and reach lazy consensus (or pass a[VOTE]) before mergedocs/spec_changes.mdrecords rationale, compatibility and migration impact, or the PR explains why no entry is neededOntology
ontology/are consistent with spec changesConverters
Validation
validation/are updated if the spec changedDocumentation
docs/is updated to reflect any user-facing changesCONTRIBUTING.mdis updated if the contribution process changedExamples
examples/are added or updated for any new spec constructsTests
pytest/ CI green)Compliance
NOTICEand/orLICENSEhave been updated per ASF policy