-
Notifications
You must be signed in to change notification settings - Fork 19
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
Simplify retrieve #420
Simplify retrieve #420
Conversation
fdde9fd
to
7779f54
Compare
41c7fcf
to
b68c35b
Compare
7779f54
to
8d560e2
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #420 +/- ##
==========================================
- Coverage 74.19% 74.01% -0.18%
==========================================
Files 106 106
Lines 6998 7020 +22
==========================================
+ Hits 5192 5196 +4
- Misses 1806 1824 +18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
8d560e2
to
45afbe1
Compare
45afbe1
to
8d560e2
Compare
…2 requests instead of 4
…rieve for ontologies
…ve resource endpoint
1721cb3
to
64b55be
Compare
Aren't these two points contradicting each other? if now the annotate query parameter is available for schemas, then the |
2 (main+metadata through resource endpoint) or 3 (main fail through resource endpoint, main+metadata through resolver endpoint) requests were necessary to retrieve resources:
Remove async force complete for retrieval of one resource. Synchronous requests are now used, since the body of the function is simpler, a little bit of duplication doesn't hurt as much.
To avoid the client session staying open too long, leading to a ServerDisconnectedError. + all tasks/resources no longer share the same client session (a batch of tasks/resources per client session)
When using the resource endpoint, the annotate query parameter only works for regular resources. It fails if we attempt to retrieve a schema with it. The best thing would be to use the schema endpoint with the annotate query parameter but that isn't supported by delta yet. So the mechanism to retrieve data (not source) + metadata, then data (source) without metadata, and then to merge them has been kept in a retrieve_schema method.
Allow to return annotated payload for schemas nexus#5079 RDFModel's validate uses the resource retrieve implementation to get schemas and ontologies. It was not possible to use the annotate query parameter in order to retrieve schemas through the resource endpoint until this change in the API.