SuLab / WikidataIntegrator

A Wikidata Python module integrating the MediaWiki API and the Wikidata SPARQL endpoint
MIT License
244 stars 46 forks source link

wdi_rdf still access the wikidata api while working with local data #187

Closed andrawaag closed 1 year ago

andrawaag commented 2 years ago

wdi_rdf is the part of WDI that generates the rdf from a json representation of a wikidata item. By default it fetches the json from the Wikibase api. However, the library also allows transformation of json items archived in local dumps. However, it seems that although the a test script is applied locally, the script still contacts the api. The culprit can be found at https://github.com/SuLab/WikidataIntegrator/blob/main/wikidataintegrator/wdi_rdf.py#L30, where the script checks if a QID is give. This is unnecessary since that qid is also part of the json model