Skip to content
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

Raises an error if the MARS receipt contains errors #102

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kdp-cloud
Copy link
Collaborator

Closes #101

Raise HTTP Error in case receipts has errors in it.
@kdp-cloud kdp-cloud self-assigned this Jan 31, 2025
@kdp-cloud kdp-cloud linked an issue Jan 31, 2025 that may be closed by this pull request
@kdp-cloud
Copy link
Collaborator Author

Result test submission to BioSamples and ENA:

2025-01-31 11:56:16,027 - MARS-CLI - INFO - ############# Welcome to the MARS CLI. #############
2025-01-31 11:56:16,027 - MARS-CLI - INFO - Running in Development environment
2025-01-31 11:56:16,029 - MARS-CLI - INFO - Starting submission of the ISA JSON to the target repositories: biosamples, ena.
2025-01-31 11:56:16,032 - MARS-CLI - INFO - ISA JSON with investigation 'Bob's investigation' is valid.
2025-01-31 11:56:17,431 - MARS-CLI - INFO - Submission to biosamples was successful. Result:
{'targetRepository': 'biosamples', 'errors': [], 'info': [], 'accessions': [{'value': 'SAMEA131520198', 'path': [{'key': 'investigation'}, {'key': 'studies', 'where': {'key': 'title', 'value': 'Arabidopsis thaliana'}}, {'key': 'materials'}, {'key': 'samples', 'where': {'key': 'name', 'value': 'leaf 1'}}]}, {'value': 'SAMEA131520197', 'path': [{'key': 'investigation'}, {'key': 'studies', 'where': {'key': 'title', 'value': 'Arabidopsis thaliana'}}, {'key': 'materials'}, {'key': 'sources', 'where': {'key': 'name', 'value': 'plant 1'}}]}]}
2025-01-31 11:56:18,079 - MARS-CLI - INFO - ENA_TEST2.R2.fastq.gz already exists and has the same size on the FTP, skipping
2025-01-31 11:56:20,912 - MARS-CLI - INFO - Submission to ena was successful. Result:
{'targetRepository': 'ena', 'errors': [], 'info': [{'message': 'This submission is a TEST submission and will be discarded within 24 hours'}], 'accessions': [{'value': 'ERP168821', 'path': [{'key': 'investigation'}, {'key': 'studies', 'where': {'key': 'title', 'value': 'Arabidopsis thaliana'}}]}, {'value': 'ERX13631345', 'path': [{'key': 'investigation'}, {'key': 'studies', 'where': {'key': 'title', 'value': 'Arabidopsis thaliana'}}, {'key': 'assays', 'where': {'key': '@id', 'value': '#assay/18_20_21'}}, {'key': 'materials'}, {'key': 'otherMaterials', 'where': {'key': '@id', 'value': '#other_material/332'}}]}, {'value': 'ERX13631346', 'path': [{'key': 'investigation'}, {'key': 'studies', 'where': {'key': 'title', 'value': 'Arabidopsis thaliana'}}, {'key': 'assays', 'where': {'key': '@id', 'value': '#assay/18_20_21'}}, {'key': 'materials'}, {'key': 'otherMaterials', 'where': {'key': '@id', 'value': '#other_material/333'}}]}]}

Setting formattter to 25.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI should handle errors in any case
1 participant