Skip to content

Adopt uv, ruff, pre-commit, and CI tooling - #37

Closed
mshettyFE wants to merge 1 commit into
TonyZhou729:mainfrom
mshettyFE:CI_tooling
Closed

Adopt uv, ruff, pre-commit, and CI tooling#37
mshettyFE wants to merge 1 commit into
TonyZhou729:mainfrom
mshettyFE:CI_tooling

Conversation

@mshettyFE

Copy link
Copy Markdown
  • Migrate dependency management to uv (uv.lock; consolidate metadata into pyproject [project]; remove setup.py/setup.cfg). Build backend unchanged (setuptools.build_meta) — release pipeline untouched. We want this because uv is a lot faster than alternatives like conda/pip
  • Adopt ruff for lint + format and apply across the codebase. lint flags any obvious errors/dropped threads (unused dependencies, unused local variables etc.).
  • Format is just so that the codebase complies with PEP8 style guide; purely mechanical and doesn't change runtime behavior. This is the main reason why the diff is so large
  • Add pre-commit hooks and CI (pre-commit + pytest). Ensures that you can't forget to run the linter and formatter when committing and that the tests must pass before pushing to the github repo
  • Accuracy test passes. formatter modified it, but its' functionality is unchanged

  - Migrate dependency management to uv (uv.lock; consolidate metadata into
    pyproject [project]; remove setup.py/setup.cfg). Build backend unchanged
    (setuptools.build_meta) — release pipeline untouched.
  - Adopt ruff for lint + format and apply across the codebase.
  - Add pre-commit hooks and CI (pre-commit + pytest).
@mshettyFE

Copy link
Copy Markdown
Author

It should also be noted that I plan on adding pyright (re: static checker) if the above gets merged. The nature of that cleanup pass would require more through testing on my part to ensure that no semantics of the program break. The above changes, by their design, should not change the program's functionality in any way (please verify this though).

@cgiovanetti

cgiovanetti commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Hi Mihir

Thanks for putting this together!

We're not looking to migrate to uv at this time--pip/conda are more familiar to physicists, and we don't spend enough time setting up environments where the uv speedup might make much difference for users.

I'm interested in these other developments but the diff is too large for me to be able to efficiently review what you've put together; PEP8 compliance is low priority for us, so I would be interested in a much narrower PR with just the pre-commit hooks and maybe ruff, though I would want to review first. In general the more sophisticated the codebase is the less likely physicists are to use it, so even though these changes might not impact the user interfacing we want to make sure the intimidation factor stays very low.

@cgiovanetti cgiovanetti closed this Sep 2, 2026
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.

2 participants