-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fixes for a few bugs I encountered while testing the command #351
Conversation
Add support for Assembly and Run based jobs (both). Remove the public check, we only submit public data to the exchange. Normalize argument names in the MGX wrapper. Added some docstrings
The MGX API returns a json with the error message, which is useful for debugging.
return analysis_registry_id, metadata_match | ||
|
||
data = response.json() | ||
datasets = data.get("datasets", []) | ||
|
||
# The API will return an emtpy datasets array if it can find the accession | ||
if not len(datasets): | ||
logging.info(f"{source_id} does not exist in ME") | ||
logging.info(f"{mgya} does not exist in ME") | ||
return analysis_registry_id, metadata_match | ||
|
||
sourceIDs = [item.get("sourceID") for item in datasets] |
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.
Can it be:
try:
found_record = next(item for item in datasets if item.get("sourceID") == mgya)
except StopIteration:
...
or similar?
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.
Yeah, it could be. I think method needs some improvements and some more unit tests. I'll create a JIRA ticket improve it.
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 good!
No description provided.