add complexipy checks to CI#700
Conversation
Thank you for the pull request! 💙🩵The Scribe-Data team will do our best to address your contribution as soon as we can. The following are some important points:
Note Scribe uses Conventional Comments in reviews to make sure that communication is as clear as possible. |
Maintainer ChecklistThe following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :) |
| hooks: | ||
| - id: complexipy | ||
| files: ^src/ | ||
| types_or: [ python, pyi ] No newline at end of file |
There was a problem hiding this comment.
Would be good to have blank lines at the end of files as a convention, @ashb155 :) I'll add them now :)
There was a problem hiding this comment.
will keep it in mind, thanks for letting me know @andrewtavis !
andrewtavis
left a comment
There was a problem hiding this comment.
praise: Really great to have this added in, @ashb155! And amazing that you did it in a way where this can be worked on over time :) Let's get the next release of Scribe-Data out, and then we can start doing issues where we refactor to reduce complexity.
Contributor checklist
pytestcommand as directed in the testing section of the contributing guideDescription
Introduces
complexipyas a cognitive complexity checker in the CI linting workflowFiles changed:
pyproject.toml— addedcomplexipy>=4.2.0to dev dependencies and[tool.complexipy]config block.pre-commit-config.yaml— addedcomplexipy-pre-commithook atv4.2.0scoped tosrc/.github/workflows/ci_static_analysis.yaml— added complexipy step with--max-complexity-allowed 15complexipy-snapshot.json— baseline snapshot of existing violations throughout the codebase so CI blocks new ones without requiring upfront refactoring which can be gradually worked uponTesting:
Ran locally via
uvx complexipy src/scribe_data/ --max-complexity-allowed 15— passes with snapshot in place.Related issue