Skip to content
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

Add Ruff to pre-commit hooks #1207

Merged
merged 10 commits into from
Nov 22, 2024
Merged

Conversation

chrisjonesBSU
Copy link
Contributor

@chrisjonesBSU chrisjonesBSU commented Nov 14, 2024

PR Summary:

This adds Ruff to the pre-commit hooks, like we did in GMSO and foyer

Closes #1186

PR Checklist


  • Includes appropriate unit test(s)
  • Appropriate docstring(s) are added/updated
  • Code is (approximately) PEP8 compliant
  • Issue(s) raised/addressed?

mbuild/compound.py Dismissed Show dismissed Hide dismissed
mbuild/conversion.py Dismissed Show dismissed Hide dismissed
mbuild/conversion.py Dismissed Show dismissed Hide dismissed
mbuild/conversion.py Dismissed Show dismissed Hide dismissed
element_list = [
c.element for c in container.particles_by_element("sod")
]
element_list = [c.element for c in container.particles_by_element("sod")]

Check notice

Code scanning / CodeQL

Unused local variable Note test

Variable element_list is not used.
mbuild/utils/io.py Fixed Show fixed Hide fixed
Copy link

codecov bot commented Nov 15, 2024

Codecov Report

Attention: Patch coverage is 81.45695% with 28 lines in your changes missing coverage. Please review.

Project coverage is 85.68%. Comparing base (a4c41c5) to head (d74671e).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
mbuild/formats/cassandramcf.py 0.00% 18 Missing ⚠️
mbuild/compound.py 92.10% 3 Missing ⚠️
mbuild/formats/json_formats.py 62.50% 3 Missing ⚠️
mbuild/lib/recipes/silica_interface.py 33.33% 2 Missing ⚠️
mbuild/periodic_kdtree.py 50.00% 1 Missing ⚠️
mbuild/utils/decorators.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1207      +/-   ##
==========================================
- Coverage   85.73%   85.68%   -0.06%     
==========================================
  Files          53       53              
  Lines        4802     4791      -11     
==========================================
- Hits         4117     4105      -12     
- Misses        685      686       +1     

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


🚨 Try these New Features:

Copy link
Contributor

@CalCraven CalCraven left a comment

Choose a reason for hiding this comment

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

I think this is good to go!

@CalCraven CalCraven merged commit 390927e into mosdef-hub:main Nov 22, 2024
14 of 16 checks passed
CalCraven pushed a commit to CalCraven/mbuild that referenced this pull request Nov 22, 2024
* update CI and precommit files

* add ruff changes

* remove gmso lines

* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci

* change error type in test

* raise the error that is created

* remove duplicate windows 3.12 test

* fix precommit errors

* fix import error

* fix CI error

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

Add Ruff to pre-commit
2 participants