-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add new vocabs API #134
Add new vocabs API #134
Conversation
…tests. Add initial get concept scheme top concepts endpoint /v/vocab/{concept_scheme_curie}/top-concepts without tests
…. Add tests for concept narrowers endpoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far, works as advertised locally against the IDN triplestore.
One thing to note though, testing the /identifier/curie/<iri>
& /identifier/iri/<curie>
endpoints cause internal server errors when providing invalid iris or curies. These cases should be catered for and have appropriate HTTP error responses in the API.
Thanks for pointing that out @jamiefeiss about the error handling for invalid values on the |
Won't merge this until prez-ui has an implementation to consume this new API as described in RDFLib/prez-ui#84. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both the /top-concepts
& /narrowers
endpoints don't return sorted concepts. This should be updated to match the recent changes to paginated items being sorted.
@jamiefeiss I just checked both Maybe we can catch up tomorrow and you can show me the issue? |
See comments here #131 |
Chat in Prez meeting: Support for client-side "expand all" functionality. Count
Query parameters:
Returns the entire vocabulary in the old way.
Had discussion with a potential future design where it's a single endpoint and allows for retrieving vocabs at a depth given by query parameter. May follow up in a separate issue. |
The sorted pagination issue that @jamiefeiss raised is likely due to triplestore implementation of |
This reverts commit d671317.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks Edmond
Closes #131.
Summary:
New API for client fetching of concept schemes and concepts
Adds a new set of APIs as described in the linked issue above to enable the ability to fetch a vocabulary of any size in an incremental manner.
Prefix generation is set by default on startup
This PR creates prefixes by default on start up and can be disabled by setting the
DISABLE_PREFIX_GENERATION
environment variable tofalse
. This default behaviour is required as the new API assumes the endpoints are stateless with no side effects.Add identifier endpoints to provide resolution for IRIs to CURIEs and vice versa
New identifier endpoints to provide resolution of IRIs and CURIEs.
/identifier/curie/{iri:path}
/identifier/iri/{curie}
These are required to set up parameterised tests by converting IRI inputs into their CURIE identifiers to perform requests to the new vocabulary endpoints. For example, converting parameterised IRIs to perform test requests to
/v/vocab/{concept_scheme_curie}/top-concepts
.Add parametrised tests
Basic structure of parameterised tests for each new vocabulary endpoint added with different scenarios tested. New scenarios can be added in the form of another parameterised test.