SuLab / WikidataIntegrator

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

[Wikibase] Quantity property with a unit force item update #111

Closed LeMyst closed 4 years ago

LeMyst commented 4 years ago

When you try to add a quantity property to an item in your wikibase instance, with fastrun, like this : wdi_core.WDQuantity(value=size, prop_nr='P46', unit='https://wikibase.url/entity/Q913')

You have multiple issue :

I've mitigated some of these issues, but the last one block me.

In any case, these problems don't stop WikidataIntegrator to work correctly, but these create useless update request to the wikibase api.

LeMyst commented 4 years ago

Created PR #112 with my fixes. You don't need to add the concept_uri to the unit anymore, but you need to pass it via concept_base_uri parameter. WDI will now manage correctly the positive quantity. I don't know how this will work for negative quantity and upper/lower_bound (negative and positive)

I keep the issue open for the moment.

LeMyst commented 4 years ago

Issue fixed in PR #124