-
Notifications
You must be signed in to change notification settings - Fork 8
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
Remove return_gufe
kwarg from AlchemiscaleClient.query_networks
#206
Conversation
return_gufe
kwarg from AlchemiscaleClient.query_networks
return_gufe
kwarg from AlchemiscaleClient.query_networks
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #206 +/- ##
==========================================
+ Coverage 82.25% 82.36% +0.10%
==========================================
Files 22 22
Lines 2739 2727 -12
==========================================
- Hits 2253 2246 -7
+ Misses 486 481 -5 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this 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 a couple notes. I may also add to this PR removal of return_gufe
handling for query_networks
in the user-facing API that the AlchemiscaleClient
talks to (in interface/api.py
) before merging.
alchemiscale/interface/client.py
Outdated
@@ -136,7 +136,6 @@ def query_networks( | |||
self, | |||
name: Optional[str] = None, | |||
scope: Optional[Scope] = None, | |||
return_gufe=False, | |||
) -> Union[List[ScopedKey], Dict[ScopedKey, AlchemicalNetwork]]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also want to update the return type to reflect simplification here.
alchemiscale/interface/client.py
Outdated
else: | ||
networks.extend(self._query_resource("/networks", params=params)) | ||
params = dict(name=name, **scope.dict()) | ||
networks.extend(self._query_resource("/networks", params=params)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just return the list returned by this method; unclear to me now why I chose to extend/update an empty list/dict here, since it will be freshly created by the underlying method anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @ianmkenney! Merge when satisfied!
Fixes #142
This PR removes the
return_gufe
kwarg from theAlchemiscaleClient.query_networks
method.As it was not a tested feature before, not tests needed to be changed.
Edit: it also doesn't appear to be mentioned in the current docs.