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

Fix import of ASE filters when user has installed from PyPI and not gitlab #650

Merged
merged 9 commits into from
Jan 3, 2024

Conversation

esoteric-ephemera
Copy link
Contributor

@esoteric-ephemera esoteric-ephemera commented Dec 14, 2023

Simple fix for a recent change to atomate2.forcefields.utils which tries to import FrechetCellFilter from ase.filters. Neither that filter nor the module in ASE exist in the current PyPI release.

I don't know that it's reasonable to expect users to install ASE from gitlab by default. I've added a kwarg to ase.filters.utils.Relaxer.relax that fails when FrechetCellFilter cannot be imported and the user does not specify and alternate Filter.

Added test coverage for atomate2.forcefields.utils to ensure higher Codecov

Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (2c23435) 76.05% compared to head (d691bd5) 75.95%.
Report is 6 commits behind head on main.

❗ Current head d691bd5 differs from pull request most recent head aea46e1. Consider uploading reports for the commit aea46e1 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #650      +/-   ##
==========================================
- Coverage   76.05%   75.95%   -0.10%     
==========================================
  Files          83       83              
  Lines        7033     7034       +1     
  Branches     1044     1044              
==========================================
- Hits         5349     5343       -6     
- Misses       1363     1373      +10     
+ Partials      321      318       -3     
Files Coverage Δ
src/atomate2/forcefields/utils.py 83.56% <55.55%> (+5.78%) ⬆️

... and 1 file with indirect coverage changes

@esoteric-ephemera
Copy link
Contributor Author

I think something is bugged with codecov here. Test coverage of the only file I've modified, atomate2.forcefields.utils, is at 82%. It's claiming that atomate2.common.jobs.utils has indirect test coverage decrease of -33%, which makes no sense given that these two files are unrelated.

@janosh janosh enabled auto-merge (squash) January 3, 2024 09:34
@janosh janosh merged commit 4f93a22 into materialsproject:main Jan 3, 2024
6 checks passed
@esoteric-ephemera esoteric-ephemera deleted the fix_ase_import branch January 3, 2024 18:18
@utf utf added the fix Bug fix PR label Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants