Repository navigation
ci: enforce 500-line Python file-length ratchet (#111) - #126
Open
AadarshM07 wants to merge 1 commit into
Open
AadarshM07 wants to merge 1 commit into
AadarshM07 wants to merge 1 commit into
Conversation
This branch has not been deployed
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
Closes #111
Implements the dependency-free CI file-length policy check and ratchet mechanism recommended in
docs/investigations/file-length-limit.md:nitrostack/,tests/,examples/, andscripts/..file_length_baseline.json) for the 14 pre-existing legacy files that exceed 500 lines.--update-baselinelowers the baseline as files shrink or graduates them when they reach ≤ 500 lines..github/workflows/test.ymlacross the Python 3.10, 3.11, and 3.12 matrix.CONTRIBUTING.md.Changes
scripts/check_file_lengths.py: Standard-library checker script with ratchet and baseline update logic..file_length_baseline.json: Baseline manifest containing recorded line counts for the 14 legacy over-limit files.tests/test_file_length_check.py: Focused test suite covering 500-line boundary, new files > 500, baseline growth, ratchet lowering, and baseline graduation..github/workflows/test.yml: Added step to executepython scripts/check_file_lengths.pybefore pytest.CONTRIBUTING.md: Developer guide explaining the policy, counting rules, and baseline update commands.