mosdef-hub / foyer

A package for atom-typing as well as applying and disseminating forcefields
https://foyer.mosdef.org
MIT License
117 stars 75 forks source link

Do not use 'old' OpenFF Toolkit API #545

Closed mattwthompson closed 9 months ago

mattwthompson commented 9 months ago

PR Summary:

A change I made to the toolkit (https://github.com/openforcefield/openff-toolkit/pull/1661) involved changing how attributes are looked up, which made this check

        uses_old_api = hasattr(Topology(), "_topology_molecules")

no longer produce the same behavior as when I wrote it. With 0.14.4, released last night, this line erroneously evaluates to True. There would be a few ways to fix this, but I'm proposing to just remove the dual support. We are no longer supporting the "old" (< 0.11) versions of the toolkit. Note, of course, that this change wouldn't affect any released version of Foyer.

I also noticed tests aren't run in parallel - it's a small and straightforward fix to get CI to use the multiple cores that GHA provides . I'm lazy.

PR Checklist


codecov[bot] commented 9 months ago

Codecov Report

Merging #545 (81085c5) into main (d2608b7) will increase coverage by 0.33%. The diff coverage is 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #545 +/- ## ========================================== + Coverage 69.21% 69.55% +0.33% ========================================== Files 16 16 Lines 1673 1662 -11 ========================================== - Hits 1158 1156 -2 + Misses 515 506 -9 ```
mattwthompson commented 9 months ago

The only constraint is openff-toolkit >=0.11 but that's already in there. The quirk of 0.14.4 wasn't an API break so it should work all the way back to 0.11

mattwthompson commented 9 months ago

Thanks @daico007! Anything I can do to help a release? (If you have a checklist/process in place I'm happy to do as much of it as you are comfortable dumping off)

daico007 commented 9 months ago

No problem @mattwthompson. I will put a out a patch release for foyer Monday (I may attempt to fix the current Dockerfile before that but there's a good chance it fill fail again)