Skip to content

Excise openff dependency from OpenMM testing#993

Merged
janosh merged 6 commits intomaterialsproject:mainfrom
orionarcher:fix_testing
Sep 27, 2024
Merged

Excise openff dependency from OpenMM testing#993
janosh merged 6 commits intomaterialsproject:mainfrom
orionarcher:fix_testing

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?


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
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
@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 <[email protected]>

* Respond to Yanosh PR and fix type of OpenMM Flow

* Fix typo, lint

* Add dataclass tag where needed

---------

Co-authored-by: Janosh Riebesell <[email protected]>
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