Open ssssarah opened 1 month ago
Attention: Patch coverage is 9.60000%
with 113 lines
in your changes missing coverage. Please review.
Project coverage is 73.88%. Comparing base (
4a0ee65
) to head (813689a
).
Files with missing lines | Patch % | Lines |
---|---|---|
kgforge/specializations/stores/bluebrain_nexus.py | 6.32% | 74 Missing :warning: |
...cializations/stores/nexus/batch_request_handler.py | 13.33% | 39 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
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.
https://github.com/BlueBrain/nexus/pull/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.