[SYNPY-1590] Implement Submission(+Status, +Bundle) OOP model #1250
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem:
This work is part of the ongoing effort to refactor the Synapse Python Client using object-oriented principles, following the pattern established in https://sagebionetworks.jira.com/browse/SYNPY-1418.
We currently to not have an OOP model for communications to the Evaluation API services provided by the Synapse platform.
Solution:
The work has been separated into 3 feature branches, with the *main branch being intended for merge into develop and the other 2 branches merging into *main when ready.
The acceptance criteria has been split up into these 3 branches in the following way.
Branch:
synpy-1589-evaluation-model-mainBranch:
synpy-1590-submission-model-functionalityEvaluation API Design Summary
The data model of the Evaluation API is built around around two primary objects:
The data model includes additional objects to support scoring of Submissions and convenient data access:
Source: https://rest-docs.synapse.org/rest/#org.sagebionetworks.repo.web.controller.EvaluationController
The design for the python client tools for communicating with this API will take into consideration the Evaluation API design summary above. This implementation will look like so:
evaluation_services.pySubmission operations:
Create submission: https://rest-docs.synapse.org/rest/POST/evaluation/submission.html
Get submission: https://rest-docs.synapse.org/rest/GET/evaluation/submission/subId.html
Get submissions for evaluation: https://rest-docs.synapse.org/rest/GET/evaluation/evalId/submission/all.html
Get user submissions: https://rest-docs.synapse.org/rest/GET/evaluation/evalId/submission.html
Get submission count: https://rest-docs.synapse.org/rest/GET/evaluation/evalId/submission/count.html
Delete submission: https://rest-docs.synapse.org/rest/DELETE/evaluation/submission/subId.html
Cancel submission: https://rest-docs.synapse.org/rest/PUT/evaluation/submission/subId/cancellation.html
SubmissionStatus operations:
Get submission status: https://rest-docs.synapse.org/rest/GET/evaluation/submission/subId/status.html
Update submission status: https://rest-docs.synapse.org/rest/PUT/evaluation/submission/subId/status.html
Get all submission statuses: https://rest-docs.synapse.org/rest/GET/evaluation/evalId/submission/status/all.html
Batch update statuses: https://rest-docs.synapse.org/rest/PUT/evaluation/evalId/statusBatch.html
Bundle operations:
Get submission bundles: https://rest-docs.synapse.org/rest/GET/evaluation/evalId/submission/bundle/all.html
Get user submission bundles: https://rest-docs.synapse.org/rest/GET/evaluation/evalId/submission/bundle.html
*.pyfiles for discoverability:Submissionwill inheritSubmissionStatusSubmissionBundlewill inheritSubmissionandSubmissionStatusBranch:
synpy-1590-submission-model-docsTesting: