Skip to content

add complexipy checks to CI#700

Merged
andrewtavis merged 2 commits into
scribe-org:mainfrom
ashb155:feat/complexipy
May 30, 2026
Merged

add complexipy checks to CI#700
andrewtavis merged 2 commits into
scribe-org:mainfrom
ashb155:feat/complexipy

Conversation

@ashb155
Copy link
Copy Markdown
Contributor

@ashb155 ashb155 commented May 29, 2026

Contributor checklist


Description

Introduces complexipy as a cognitive complexity checker in the CI linting workflow

Files changed:

  • pyproject.toml — added complexipy>=4.2.0 to dev dependencies and [tool.complexipy] config block
  • .pre-commit-config.yaml — added complexipy-pre-commit hook at v4.2.0 scoped to src/
  • .github/workflows/ci_static_analysis.yaml — added complexipy step with --max-complexity-allowed 15
  • complexipy-snapshot.json — baseline snapshot of existing violations throughout the codebase so CI blocks new ones without requiring upfront refactoring which can be gradually worked upon

Testing:
Ran locally via uvx complexipy src/scribe_data/ --max-complexity-allowed 15 — passes with snapshot in place.

image

Related issue

@github-actions
Copy link
Copy Markdown
Contributor

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:

  • Those interested in developing their skills and expanding their role in the community should read the mentorship and growth section of the contribution guide
  • If you're not already a member of our public Matrix community, please consider joining!
    • We'd suggest that you use the Element client as well as Element X for a mobile app
    • Join the General and Data rooms once you're in
  • Also consider attending our bi-weekly Saturday developer syncs!
    • Details are shared in the General room on Matrix each Wednesday before the sync
    • It would be great to meet you 😊

Note

Scribe uses Conventional Comments in reviews to make sure that communication is as clear as possible.

@github-actions
Copy link
Copy Markdown
Contributor

Maintainer Checklist

The 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 :)

  • Tests for changes have been written and the pytest, linting and formatting workflows within the PR checks do not indicate new errors in the files changed

  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

Comment thread .pre-commit-config.yaml Outdated
hooks:
- id: complexipy
files: ^src/
types_or: [ python, pyi ] No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would be good to have blank lines at the end of files as a convention, @ashb155 :) I'll add them now :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will keep it in mind, thanks for letting me know @andrewtavis !

Copy link
Copy Markdown
Member

@andrewtavis andrewtavis left a comment

Choose a reason for hiding this comment

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

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.

@andrewtavis andrewtavis merged commit f91f25e into scribe-org:main May 30, 2026
6 checks passed
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.

Add Complexipy for complexity checks in CI

2 participants