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

Prez v4.0.0 #229

Merged
merged 13 commits into from
Jul 2, 2024
Merged

Prez v4.0.0 #229

merged 13 commits into from
Jul 2, 2024

Conversation

recalcitrantsupplant
Copy link
Collaborator

  • Simplified to define two main functions (for listings and objects), on which all "instance data" endpoints are based.
  • Utilises external SPARQL grammar Pydantic library to build SPARQL queries (https://pypi.org/project/sparql-grammar-pydantic/)
    • This provides the basis for safely merging CQL, Search, Endpoint defined classes, and profiles to generate queries.

Listing Endpoints

The "instance data" listing endpoints are:

  1. /profiles
  2. /catalogs
  3. /catalogs/{catalogId}/collections
  4. /catalogs/{catalogId}/collections/{collectionId}/items
  5. /concept-hierarchy/{parent_uri}/top-concepts
  6. /concept-hierarchy/{parent_uri}/narrowers
  7. /search?q=<search term/>
  8. /cql?filter=<CQL JSON expression>

All of these endpoints share the same FastAPI Dependency instances:

  • CQL (implemented as a selection/filter of focus nodes within the SubSelect)
  • Search (regex search)
  • Endpoint nodeshapes (which focus nodes to select at a given endpoint, given any parents)

Object Endpoints

The "instance data" object endpoints are:

  1. /object?uri=<uri>
  2. /profiles/{profile_curie}
  3. /catalogs/{catalogId}
  4. /catalogs/{catalogId}/collections/{collectionId}
  5. /catalogs/{catalogId}/collections/{collectionId}/items/{itemId}

Additional management and other endpoints are provided, the details of which can be seen in the OpenAPI docs at /docs.

…ixes previous inadvertent permission changes.

Merge search endpoint with other listing functions.
Move to using sparql_grammar_pydantic as external dependency, black code, improve API documentation (examples, query params); remove unused code.
Update dependencies; minor changes to get tests passing.
Prez V4 architecture using SPARQL grammar library.
Example updates.
Fix shapely issue in Docker container
…formant queries - this was causing timeouts on link generation. Remove skos broader/narrower from extra predicates; there are concept scheme specific endpoints for these.
…ulted to 1000.

Patch sparql-grammar-pydantic to support this.
…order to put pattern matches with more variables last.
@recalcitrantsupplant
Copy link
Collaborator Author

Reviewed by Ashley. Merging to simplify managing v3 (split out to separate branch) and v4

@recalcitrantsupplant recalcitrantsupplant merged commit 78fda68 into main Jul 2, 2024
2 checks passed
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.

None yet

1 participant