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

Excise openff dependency from OpenMM testing #993

Merged
merged 6 commits into from
Sep 27, 2024

Conversation

orionarcher
Copy link
Contributor

This PR removes the openff dependency from the openmm test suite. This conflict originally arose in PR #923.

@orionarcher
Copy link
Contributor Author

@janosh would you mind taking a look?

src/atomate2/openmm/jobs/base.py Outdated Show resolved Hide resolved
from emmet.core.openmm import OpenMMTaskDocument

with suppress(ImportError):
Copy link
Member

Choose a reason for hiding this comment

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

TYPE_CHECKING is always False at run time so no need to suppress errors here. also, suppress is quite slow compared to try/except so would usually opt for that

Copy link
Contributor Author

@orionarcher orionarcher Sep 26, 2024

Choose a reason for hiding this comment

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

I initially did try/except but it was caught by the linter. should I override then? nvm, understood ty

Copy link
Member

Choose a reason for hiding this comment

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

yes, we should ignore that ruff rule that recommends contextlib.suppress. bad rule imo

orionarcher and others added 2 commits September 26, 2024 15:53
@orionarcher
Copy link
Contributor Author

All fixed, thanks for review @janosh

@janosh janosh added testing Test all the things dx Developer experience md Molecular dynamics labels Sep 26, 2024
@janosh janosh enabled auto-merge (squash) September 26, 2024 20:13
Copy link
Member

@janosh janosh left a comment

Choose a reason for hiding this comment

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

👍

auto-merge was automatically disabled September 26, 2024 20:32

Head branch was pushed to by a user without write access

Copy link
Member

@janosh janosh left a comment

Choose a reason for hiding this comment

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

looks great! 👍 thanks for the quick turnaround on #923 (comment) @orionarcher

@janosh janosh merged commit 9600cef into materialsproject:main Sep 27, 2024
9 checks passed
@janosh janosh changed the title Excise openff dependency from openmm testing Excise openff dependency from OpenMM testing Sep 27, 2024
@utf utf added the house-keeping Formatting and code quality tweaks label Sep 30, 2024
hrushikesh-s pushed a commit to hrushikesh-s/atomate2 that referenced this pull request Nov 16, 2024
* Excise openff dependency from openmm testing

* Remove commmented out code

* Update src/atomate2/openmm/jobs/base.py

Co-authored-by: Janosh Riebesell <janosh.riebesell@gmail.com>

* Respond to Yanosh PR and fix type of OpenMM Flow

* Fix typo, lint

* Add dataclass tag where needed

---------

Co-authored-by: Janosh Riebesell <janosh.riebesell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dx Developer experience house-keeping Formatting and code quality tweaks md Molecular dynamics testing Test all the things
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants