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

Changes to the rdflib-endpoint dependency #1

Closed
vemonet opened this issue Mar 20, 2023 · 2 comments
Closed

Changes to the rdflib-endpoint dependency #1

vemonet opened this issue Mar 20, 2023 · 2 comments
Assignees

Comments

@vemonet
Copy link

vemonet commented Mar 20, 2023

Hi @proycon, I made some changes to rdflib-endpoint that will impact how the endpoint is deployed in your app

Starting from v0.3.0 you can define on which path the SPARQL endpoint will be deployed, and the YASGUI will not be deployed on / by default. YASGUI is now served on the same path as the SPARQL endpoint when the request headers ask for text/html in Accept (when people access it through the browser)

To fix this you might want to add a line with path="/sparql", when instantiating the SparqlEndpoint class:
https://github.com/proycon/codemeta-server/blob/master/codemeta_server/main.py#L101

Let me know if you are facing any issue with this new approach!

@vemonet
Copy link
Author

vemonet commented Mar 21, 2023

Actually I just released 0.4.0 which adds a new class SparqlRouter to create the SPARQL endpoint as an APIRouter instead of a full FastAPI. So you can directly mount the SPARQL endpoint to an existing API with app.include_router()

So you would just need to change your SparqlEndpoint to SparqlRouter and include it to your API with app.include_router(sparql_router)

@proycon
Copy link
Owner

proycon commented Mar 21, 2023

Thanks a lot for the heads-up and your work on rdflib-endpoint! I will adapt my code accordingly!

@proycon proycon self-assigned this Mar 21, 2023
@proycon proycon moved this from Todo (backlog) to In Progress in CLARIAH+ Shared Service: FAIR Tool Discovery May 15, 2023
proycon added a commit that referenced this issue May 15, 2023
(I didn't get the SparqlRouter to work properly so I used the first method)
@proycon proycon closed this as completed May 15, 2023
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

No branches or pull requests

2 participants