Skip to content

Commit

Permalink
Mark piece of code to revisit and improve
Browse files Browse the repository at this point in the history
  • Loading branch information
mberacochea committed Feb 19, 2024
1 parent 783f275 commit 1b031df
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions emgapi/metagenomics_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,13 @@ def check_analysis(self, mgya: str, sequence_accession: str, metadata=None):
logging.info(f"{mgya} does not exist in ME")
return analysis_registry_id, metadata_match

# TODO: this code needs some refactoring to improve it:
"""
try:
found_record = next(item for item in datasets if item.get("sourceID") == mgya)
except StopIteration
...
"""
sourceIDs = [item.get("sourceID") for item in datasets]
if mgya in sourceIDs:
found_record = [item for item in datasets if item.get("sourceID") == mgya][
Expand Down

0 comments on commit 1b031df

Please sign in to comment.