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

Merged
merged 5 commits into from
Feb 21, 2025

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'}}]}]}

@kdp-cloud kdp-cloud marked this pull request as ready for review February 10, 2025 21:52
@kdp-cloud kdp-cloud requested a review from bedroesb February 10, 2025 21:52
@kdp-cloud kdp-cloud merged commit 279c1bb into main Feb 21, 2025
8 checks passed
@kdp-cloud kdp-cloud deleted the 101-cli-should-handle-errors-in-any-case branch February 21, 2025 14:59
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
2 participants