maxlath / wikibase-cli

read and edit a Wikibase instance from the command line
MIT License
223 stars 24 forks source link

Avoid creation of duplicates #116

Open nichtich opened 4 years ago

nichtich commented 4 years ago

When creating entities it is easy to accidentally create duplicates. Given the use case that:

The creation of duplicates can be avoided by addition of an option --unique <property> (the letter i is already taken, so no --identifier). If this option is used, the creation of an entity will be rejected if

maxlath commented 4 years ago

the uniqueness requirements of a property could actually be pulled from the properties constraints (ex: P268 constraints); we could default to applying the property constraints and having a flag to disable those checks(?) That would have a complexity and performance cost, but that could very much be worth it

nichtich commented 4 years ago

Support of constraints seems more complex, might require SPARQL (which sometimes lags a few minutes), not all Wikibase instances use constraints, and Wikidata constraints are sometimes too strict but you don't want to turn of all of them . For my use case I'd prefer to check uniqueness but general support of constraints could be more useful in the end.