Nizo Priskorn
Nizo Priskorn
as a user I want to know whats wrong so I can fix it and I would like WBI to tell me clearly
as a user I want clear errors from WBI and avoid cryptic errors from the Wikibase api whenever possible so I understand what went wrong and how to fix my...
See https://github.com/LeMyst/WikibaseIntegrator/discussions/462 for user story and background
See discussion
 code is here https://github.com/internetarchive/wcdimportbot/blob/00dc45896d7e85e96f934bd13be2e9c6931cda17/src/models/wikibase/crud/update.py#L117
https://www.wikidata.org/w/api.php?action=help&modules=query that module enables search using the cirrussearch extensions on Wikidata, see https://www.mediawiki.org/wiki/Help:Extension:WikibaseCirrusSearch It is much more powerful than wbsearchentities it seems. Example search is here: https://www.wikidata.org/w/api.php?format=json&action=query&list=search&srprop=&srlimit=10&srsearch=-haswbstatement:P31=Q13442814%20-haswbstatement:P31=Q5633421%20breast%20cancer
 code here https://github.com/dpriskorn/hiking_trail_matcher/commit/53fda373276889f310e8371eca2a7424e9370146
I prefer not to have more than one class in each file to ease navigation.
This helps check and correct the code before commit. See https://github.com/internetarchive/wcdimportbot/blob/main/.pre-commit-config.yaml (you are free to copy-paste it if you want :) )
https://m.youtube.com/watch?v=esZLCuWs_2Y&feature=youtu.be