-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linting, CI, dependencies, and infrastructure updates #810
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #810 +/- ##
==========================================
+ Coverage 88.09% 88.15% +0.06%
==========================================
Files 44 44
Lines 3629 3589 -40
==========================================
- Hits 3197 3164 -33
+ Misses 432 425 -7
☔ View full report in Codecov by Sentry. |
Looks great! Thanks @rkingsbury.
I'm curious what you mean by that. Is this about unused import errors? Yes, initially when running |
pyproject.toml
Outdated
"src/maggma/api/*" = ["B008", "B021", "RET505", "RET506"] | ||
"tests/api/*" = ["B017", "B018"] | ||
"src/maggma/cli/*" = ["EXE001"] # triggered by ! at top of file | ||
"src/maggma/api/utils.py" = ["I001"] # to allow unsorted import block |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@munrojm I disabled a few ruff
rules in api
because I didn't want to inadvertently screw anything up. You may want to examine and see if any can be fixed
@munrojm any concerns about the migration to |
Nope! No concerns on my end. I'm glad to have these changes. Thanks for making them. |
This PR contains a series of updates to the linting, CI, and dependency management systems to make package maintenance easier and to harmonize our practices with other MP ecosystem packages, notably pymatgen and custodian.
Specifically:
flake8
,pycodestyle
,pydocstyle
, andisort
dependencies withruff
(note thatpydocstyle
was in the requirements but never invoked in CI orpre-commit
). Ruff is substantially faster than flake8, etc., and replaces many popular tools by re-implementing rules from pycodestyle, pydocstyle, flake8, isort, etc. into a single dependency. The ruff configuration closely tracks that implemented by @materialsproject/pymatgen-maintainers for custodian and pymatgen (see Addruff
linter custodian#278)ruff
linting to CI (replacing Flake8)setup.cfg
withpyproject.toml
mypy
imports from inline comments (e.g.,# type: Any
) to normal type hints and making use of teh__all__
variable in empty__init__.py
files..pre-commit
action to current repo and version