Skip to content

Conversation

@vineetbansal
Copy link
Collaborator

@vineetbansal vineetbansal commented Nov 3, 2025

Summary

While working on isssue #186, I'm realizing that ruff format and black are conflicting with each other in terms of their formatting suggestions, and having both of them as pre-commit hooks is causing changes by the former (ruff) that the latter (black) doesn't like.

I'm sure by carefully formatting the code a certain way, one can come up with something that both tools are happy with, but I think this goes against the point of having these automated formatters in the first place. Since they both serve the same purpose with ruff format being the preferred way as of today, I've removed the latter from the list. A subsequent pre-commit run --all-files formats just a couple of files, so I think we should be good going forward.

Major changes:

  • Removed black formatting from the list of pre-commit hooks
  • codespell seems to be picking up blurbs of embedded svg strings in notebook cells and reporting them as spelling errors. There's probably a more fine-grained way to configure codespell, but perhaps we can open up an issue and tackle this later? I think a successful pre-commit run --all-files allows us to proceed with other issues for now.

Todos

If this is work in progress, what else needs to be done?

Checklist

  • Google format doc strings added.
  • Code linted with ruff. (For guidance in fixing rule violates, see rule list)
  • Type annotations included. Check with mypy.
  • Tests added for new features/fixes.
  • I have run the tests locally and they passed.

Tip: Install pre-commit hooks to auto-check types and linting before every commit:

pip install -U pre-commit
pre-commit install

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 84.89%. Comparing base (2dc42fc) to head (dad14f6).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/pyEQL/functions.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #285   +/-   ##
=======================================
  Coverage   84.89%   84.89%           
=======================================
  Files           9        9           
  Lines        1476     1476           
  Branches      257      257           
=======================================
  Hits         1253     1253           
  Misses        193      193           
  Partials       30       30           

☔ 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.

@vineetbansal vineetbansal mentioned this pull request Nov 3, 2025
5 tasks
@rkingsbury
Copy link
Member

Great find @vineetbansal ! I'm ready to merge; however I'd like to wait and talk through my code review process with @SuixiongTay and @YitongPan1 before I do so (using this as an example).

Continue basing your work in #286 on this one and stay tuned!

@rkingsbury rkingsbury added housekeeping pkg Package and repository health labels Nov 5, 2025
@rkingsbury rkingsbury merged commit 9c0c0ae into KingsburyLab:main Nov 5, 2025
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

housekeeping pkg Package and repository health

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants