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

Added support for NonTransformations #270

Merged
merged 3 commits into from
Apr 23, 2024

Conversation

ianmkenney
Copy link
Collaborator

This PR closes #110. The default network_tyk2 fixture now includes NonTransformations on all ChemicalSystems. All Cypher queries involving Transformations now also include NonTransformations. Self loop validation now only runs when the transformation is of type Transformation.

- `network_tyk2` now includes NonTransformations
  on all ChemicalSystems
- Added a helper method to
  `integration/conftest.py` to get the first
  instance of a Transformation or a
  NonTransformation
- New fixture `nontransformation`
- Updated Cypher queries relating to
  Transformations to `|` with
  NonTransformations
* Transformations are now sorted by their GufeKeys, and filter out
  NonTransformations when setting up n4js_preloaded actioned tasks.
* `get_edge_type` helper method in integration/conftest.py also
  sorts by GufeKey so we know we are getting the same ordering
@ianmkenney ianmkenney requested a review from dotsdl April 18, 2024 17:57
Copy link
Member

@dotsdl dotsdl 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 @ianmkenney! Just one note; merge when satisfied!

@@ -888,7 +888,10 @@ def query_transformations(self, *, name=None, key=None, scope: Scope = Scope()):
"""Query for `Transformation`\s matching given attributes."""
additional = {"name": name}
return self._query(
qualname="Transformation", additional=additional, key=key, scope=scope
qualname="Transformation|NonTransformation",
Copy link
Member

Choose a reason for hiding this comment

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

Brilliant!

@@ -4,7 +4,7 @@

"""

from gufe import AlchemicalNetwork, Transformation
from gufe import AlchemicalNetwork, Transformation, NonTransformation
Copy link
Member

Choose a reason for hiding this comment

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

You can drop this NonTransformation import; unused.

@ianmkenney ianmkenney merged commit 88699d9 into main Apr 23, 2024
4 checks passed
@ianmkenney ianmkenney deleted the feature-nontransformation_support branch April 23, 2024 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add explicit NonTransformation support throughout codebase
2 participants