Skip to content

Commit

Permalink
More spaces between definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedram Keyvani committed Apr 12, 2024
1 parent d714747 commit 097a3c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mars-cli/mars_lib/ena_receipt.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def to_json(response: Dict[ReceiptField, Any]) -> Any:
"""
return json.loads(json.dumps(response, cls=ReceiptEnumEncoder))


def interpret(receipt: Dict, isa_json: Dict) -> Dict[ReceiptField, Any]:
"""
Prepares the response
Expand Down Expand Up @@ -44,7 +45,7 @@ def interpret(receipt: Dict, isa_json: Dict) -> Dict[ReceiptField, Any]:
if ena_study is None:
response[ReceiptField.ERRORS].append(f"Cannot find a study with the alias '{isa_json_study_title}' in the ENA receipt")
continue

response[ReceiptField.ACCESSIONS].append(get_study_response(isa_json_study_title, ena_study))
for sample in study["materials"]["samples"]:
isa_json_sample_id = sample["@id"]
Expand Down Expand Up @@ -127,11 +128,13 @@ def get_experiment_response():
# TODO: Preparing the response for ISA-JSON assay from ENA experiment
raise NotImplementedError(f"{get_experiment_response.__name__}() is not implemented!")


def get_run_response():
# TODO: Preparing the response for ISA-JSON dataFile from ENA run
raise NotImplementedError(f"{get_run_response.__name__}() is not implemented!")



if __name__ == "__main__":

isa_json_file_path = "./test-data/biosamples-input-isa.json"
Expand Down
1 change: 1 addition & 0 deletions mars-cli/mars_lib/receipt.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class ReceiptField(str, Enum):
PATH = "path"
WHERE = "where"


class ReceiptEnumEncoder(json.JSONEncoder):
"""
Json encoder for fields that are Enums
Expand Down

0 comments on commit 097a3c7

Please sign in to comment.