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

Improve federated SPARQL query testing to use docker and add virtuoso test #789

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

vemonet
Copy link
Contributor

@vemonet vemonet commented Mar 26, 2023

@cthoyt I improved the federated query testing to use docker and added virtuoso

The docker compose up starts a virtuoso, blazegraph and bioregistry. There is a little catch with virtuoso, you need to run an additional command the first time you start it to enable federated queries

I added an expandable section under installations to explain how to start the stack with docker and enable federated query in virtuoso

I also added a step to start the docker compose stack directly with docker compose up -d in the GitHub action workflow for ubuntu (the images we use are not available on ARM windows apparently), all tests are passing: https://github.com/vemonet/bioregistry/actions/runs/4525145166

According to the GitHub action workflow run logs the test_sparql.py tests are passing on ubuntu, and skipped as expected on windows:

Screenshot from 2023-03-26 16-43-51

Note that the original query you use with VALUES fails on Virtuoso, so I added a simpler SPARQL query to test the most basic federated querying works, then we can iterate to fix issues related to specific query patterns

The csv parsing was failing due to virtuoso adding double quotes, so I used python built-in csv.DictReader() to parse it. And virtuoso was not accepting application/xml, so I used application/sparql-results+xml which works on blazegraph and virtuoso

…d a blazegraph triplestore to test federating querying to the bioregistry SPARQL mapping service.

Added a simpler SPARQL query to test federated querying, since the original query using VALUES fails on Virtuoso
The docker stack is now started in the tests github action
A section to describe how to run the tests has been added at the bottom of the README, you might want to move it to a more consistent place
…from workflow, and improve readme docs for tests
@codecov-commenter
Copy link

codecov-commenter commented Mar 26, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (96c63b3) 39.78% compared to head (4508d79) 39.78%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #789   +/-   ##
=======================================
  Coverage   39.78%   39.78%           
=======================================
  Files         132      132           
  Lines        7530     7530           
  Branches     1741     1741           
=======================================
  Hits         2996     2996           
  Misses       4354     4354           
  Partials      180      180           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

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.

2 participants