-
Notifications
You must be signed in to change notification settings - Fork 71
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
CI: check of Scribe-Data Wikidata queries #48
Comments
Am I right in assuming that this task would do the following:
If the response is O.K then the query was correctly formatted and so the test has passed. If the response is not O.K and there was network connectivity, then the query was incorrectly formatted and the test has failed. Would this test be applied to all SPARQL queries or, a subset? |
Hey @m-charlton 👋 I think we can just do |
Still getting my thoughts together on this, so a lot of what I'm about to say may be unrealistic or, not a good idea. Here goes: Integration testsI don't see these tests being run as often as unit tests. There's a pytest integration plugin which could be usefull in this respect. Run as a development toolOptions would include Either way it would be a good idea to test queries that have chaged and the gitpython might help us with this. |
That sounds great, @m-charlton 🙌 It's true that these tests perhaps do lean more on the side of integration testing rather than unit testing - something that @andrewtavis and I have discussed before actually. Here are some additional thoughts on the topic:
|
I second this 🙋♂️ And
We have a fairly robust Stable Interface Policy, and I really don't see any issues with this in the near future. We have valid SPARQL queries going to the appropriate endpoints through a relatively maintained package, so really our only worry would be that the endpoints change. The are hopes that part of Wikidata will migrate to Wikibase instances eventually, but I've never heard Lexemes mentioned in this way as the team and community is really focussing on growing it right now. Maybe eventually if it gets huge - minimum years from now - and we'll have lots of forewarning. Having the option to run Btw, @m-charlton, I see that you're in the Matrix space! Great to have you :) We'll be talking next week in the General channel about a bi-weekly developers call we'll be settings up (we like things that happen every two weeks 😊). Would be great to have you join the channel and the eventual call! |
I think the next step is for me to come up with a prototype: Arguments
These are just some ideas. Feedback/questions appreciated and ideas as to what features would be needed for a minimum viable product. I've not yet figured out how to implement the Successes printed to STDOUT. Failures to STDERR. The script will terminate with an exit code of 0 - indicating success. Any other exit code indicates failure. Should be around next week, look forward to meeting you all. |
We can do some further research to figure out |
I've written a prototype CLI tool
A major constraint is that it must be executed in a project under git control. In this case Still a lot to do especially with robustness testing and success/failure reporting. |
Please find enclosed a beta quality release of
Done some testing and the most likely error you will see is A lot to do around:
Feedback appreciated. |
Heyo @m-charlton! I'm slowly getting back into the groove of things post being sick. Very sorry for the wait on all this. As we discussed, we have a dev sync tomorrow at 14:00 UTC that would be great to have you join. Details for the call are in the General channel on Matrix. Will get to the above in the coming days as well as the PR for #50. Thanks again so much! 🙏 |
@andrewtavis I should be about tomorrow. If so I'll see you then. I've been working on ReportingNow uses RobustneesAny HTTP error (e.g. 429 'too many requests) will not fail immediately. Instead it will wait a number of seconds & execute the query again. It will attempt to execute the query for a maximum of three times before giving up & failing that query. TestingMore extensive ad-hoc testing undertaken. Still need to think about unit tests. Please ignore all previous versions. Feedback & ideas appreciated. |
feat(checkquery): tool for checking SPARQL query files (resolves #48)
Closed via #53 :) Let's discuss what's next during the sync, @m-charlton! Would be interested to know what you'd like to work on or if you have some ideas for how to improve things! Really thanks so much! This is going to make the transfer to Scribe-Server so much better from the start 🚀 |
Terms
Description
This issue would add a test to Scribe-Data/tests that would make sure that the data queries are running effectively. For this the general idea would be that we'd load in the SPARQL queries and then put a
LIMIT 1
or similar at the end of them via adding to the strings. The very low limit is because we don't want to be burdening the Wikidata endpoints too much, but maybe we can increase it if need be. We'd then need to check that everything works within the CI process.Contribution
Happy to work on this with someone or get to it myself eventually 😊
The text was updated successfully, but these errors were encountered: