Skip to content

Conversation

@valeriupredoi
Copy link
Collaborator

@valeriupredoi valeriupredoi commented Jan 7, 2026

Description

OK @bnlawrence @davidhassell I have added full infrastructure for pre-commit with ruff and mypy (though I have turned off mypy temporarily, while we fix or exclude ruff barfs, then I can turn it back on and we'll have to fix the type hints). Because the code is a mix of (very) old code, code that's been written with functionality in mind, and decent standards code, we have Ruff complaining about a lot of things - some of them are already fixed via a pre-commit run -a, some need attention but are easy fixes, and some are really tricky to fix; how do you propose we do the work? For now pre-commit doesn't run on tests/ nor on doc/ - I'll have to turn on running on tests/ at some point in the future, but let's focus on the main source code for now.

To run pre-commit, check out this branch, make sure you have pre-commit installed (from conda-forge) then:

pre-commit install
pre-commit run -a

Before you get started

Checklist

  • This pull request has a descriptive title and labels
  • This pull request has a minimal description (most was discussed in the issue, but a two-liner description is still desirable)
  • Unit tests have been added (if codecov test fails)
  • Any changed dependencies have been added or removed correctly (if need be)
  • If you are working on the documentation, please ensure the current build passes
  • All tests pass

@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.83%. Comparing base (628f227) to head (367c5e9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #173   +/-   ##
=======================================
  Coverage   76.83%   76.83%           
=======================================
  Files          15       15           
  Lines        2936     2936           
  Branches      467      467           
=======================================
  Hits         2256     2256           
  Misses        558      558           
  Partials      122      122           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@valeriupredoi valeriupredoi changed the title Add support for pre-commit with Ruff and start adding type hints Add support for pre-commit with mypy and Ruff and start adding type hints Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants