Skip to content

Commit

Permalink
Add docstring to NMDCAPIInterface class
Browse files Browse the repository at this point in the history
  • Loading branch information
kheal committed Dec 19, 2024
1 parent 01d9ef5 commit 38db386
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class NMDCAPIInterface:
"""
A genereric interface for the NMDC runtime API.
A generic interface for the NMDC runtime API.
"""

def __init__(self):
Expand Down Expand Up @@ -152,9 +152,3 @@ def check_if_ids_exist(self, ids: list) -> bool:
raise requests.RequestException(f"Error making API request: {e}")

return True

biosample_ids = ["nmdc:bsm-11-q0bxzb10"]
api_biosample_getter = ApiInfoRetriever(collection_name="biosample_set")

if not api_biosample_getter.check_if_ids_exist(biosample_ids):
raise ValueError("Biosample IDs do not exist in the collection.")

0 comments on commit 38db386

Please sign in to comment.