OpenFreeEnergy / gufe

grand unified free energy by OpenFE
https://gufe.readthedocs.io
MIT License
28 stars 7 forks source link

Add KeyedChain GufeTokenizable representation #286

Open ianmkenney opened 5 months ago

ianmkenney commented 5 months ago

This PR implements the KeyedChain representation for GufeTokenizables originally implemented in alchemiscale. As it appears general and useful enough, an upstream implementation seems appropriate.

The KeyedChain representation encodes a GufeTokenizable as a list of Tuples with the GufeKey and keyed dicts of other required tokenizables as their first and second elements, respectively. These tokenizables are sorted such that, when decoded in order, all required dependencies have been satisfied while accounting for duplicated dependencies down the tree structure. This representation is particularly useful when encoding/decoding GufeTokenizables on systems without a populated TOKENIZATION_REGISTRY.

pep8speaks commented 5 months ago

Hello @ianmkenney! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 672:80: E501 line too long (87 > 79 characters) Line 781:80: E501 line too long (84 > 79 characters) Line 786:80: E501 line too long (86 > 79 characters)

Comment last updated at 2024-05-31 20:52:05 UTC
codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.97%. Comparing base (12bc644) to head (ba0680a).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #286 +/- ## ========================================== + Coverage 98.94% 98.97% +0.02% ========================================== Files 36 36 Lines 1988 2044 +56 ========================================== + Hits 1967 2023 +56 Misses 21 21 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ianmkenney commented 3 months ago

@richardjgowers I think this is ready.

dotsdl commented 1 month ago

I'll take on review @ianmkenney!

IAlibay commented 1 month ago

Thanks for taking on the review @dotsdl - maybe this is a good start for a more regular GUFE meeting?

dotsdl commented 1 month ago

@ianmkenney is this ready for review in your view? Still WIP?

ianmkenney commented 1 month ago

@dotsdl should be good for review