Page MenuHomePhabricator

Add citoid support for WikiBase to the Citoid extension
Open, NormalPublic

Description

Process:

  • Create preliminary gadget to do the same
  • Decide how mappings will be handled - will it be hard-coded, as in a gadget, or will there be some user-editable way to do it, as in TemplateData + VisualEditor, via JSON, or perhaps modelling it in wikibase itself using wikidata items/properties?

General way: Pros: Can be used with any wikibase instance. Hardcoding to specific properties is a bit problematic because the properties are theoretically quite changeable. It would be much less useful on non wikidata implementations of wikibase.

Cons: As we discovered with TemplateData + VisualEditor, users are sometimes frustrated at the inflexibility of only having a JSON block to work with in order to insert data, and want the Citoid extension to be able to make more fine tuned adjustments. This definitely still works for VisualEditor because there are many different languages all with different templates, but there will be less of an argument to make on this with Wikidata because we really only have one Wikibase instance and the possibility of using it on other instances is more theoretical than actual.

Details

Related Gerrit Patches:
mediawiki/extensions/Citoid : masterAdd wikibase module
mediawiki/extensions/Wikibase : masterAdd tabs to references with jquery.ui.tabs
mediawiki/services/citoid : master[WIP] Add wikibase format

Event Timeline

Mvolz created this task.Jun 4 2018, 10:52 AM
Restricted Application added a project: VisualEditor. · View Herald TranscriptJun 4 2018, 10:52 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Vvjjkkii renamed this task from Add citoid support for WikiBase to the Citoid extension to 2obaaaaaaa.Jul 1 2018, 1:06 AM
Vvjjkkii raised the priority of this task from Normal to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
Mvolz renamed this task from 2obaaaaaaa to Add citoid support for WikiBase to the Citoid extension.Jul 1 2018, 10:20 AM
Mvolz lowered the priority of this task from High to Normal.
Mvolz updated the task description. (Show Details)
Mvolz added a project: Wikidata.
Mvolz updated the task description. (Show Details)
Mvolz claimed this task.Jul 2 2018, 10:17 AM
Mvolz added a comment.Jul 2 2018, 10:48 AM

Conversation from IRC about modelling citoid ontology in wikidata and using that:

(11:14:34) mvolz: Can a wikidata dev give me a sanity check on something? Would it be feasible to write a gadget that uses sparql to query data in wikibase and then use that information to insert items? Or would it be too slow/better to use an interface message with some JSON in it, if it's something that isn't expected to change from query to query (i.e. you'd expect to get the same single result each time, so querying wikidata isn't strictly necessary.)
(11:21:55) sjoerddebruin: I think the constraints system uses queries...
(11:27:04) mvolz: sjoerddebruin: thanks, that is very helpful, I will look and see how they're doing it :)
(11:28:04) sjoerddebruin: I don't see Lucas around here, but I suggest talking with him. :)
(11:29:55) DanielK_WMDE: mvolz: it depends on the query, and if it runs always, or only when the user presses a button, whether it's just one query or many...
(11:30:21) DanielK_WMDE: generally speaking, havign the user press a button, then run a query, then do something, should be fine by the system
(11:30:37) DanielK_WMDE: depending on the query, it may be annoyingly slow to the user. expectation management is key
(11:32:33) spectre left the room (quit: Ping timeout: 248 seconds).
(11:33:59) BRPever [~androirc@49.126.25.90] entered the room.
(11:34:25) BRPever left the room (quit: Changing host).
(11:34:25) BRPever [~androirc@wikimedia/BRPever] entered the room.
DanielK_WMDE danmichaelo Danny_B
DanielK_WMDE danmichaelo Danny_B davic
(11:40:50) mvolz: DanielK_WMDE: so I'm thinking about how we want to insert items as references, and I was contemplating putting in the entire ontology for which citoid properties are equivalent to the wikidata ones. So the queries would occur every time an item was being created as reference, and probably maybe 10 queries for something like SELECT equivalent wikidata property WHERE instance of citoid property AND name equals "bookTitle".
(11:40:56) mvolz: There are some things we absolutely have to do queries for though, like the item which corresponds to the journal, for instance, or even author names, so theoretically that could get really bogged down adding those as well...
(11:41:27) mvolz: And so the list of properties could just go into an interface message to cut down on that.
(11:42:43) mvolz: But if all the queries are done in parlellel, these ones are all quite short.
(11:42:53) DanielK_WMDE: Lookup by name is always a bit problematic with wikidata. But talk to Lucas, he's the expert.
(11:42:56) mvolz: shorter than probably the longer ones we'd be waiting for anyway?
(11:42:59) mvolz: Ok :).
(11:43:14) DanielK_WMDE: but the mapping between citoied and wikidata sounds like it should be rather small, and cacheable
(11:43:20) mvolz: Yes
(11:43:36) DanielK_WMDE: generating that froim a sparql query is sensible, but re-running that query over and over... less so.
(11:43:56) DanielK_WMDE: otoh, we do have varnish caching for queries, that may be enough
(11:44:10) DanielK_WMDE: I still recommed caching that on the client.
(11:44:21) DanielK_WMDE: people who add one reference are likely to add more soon

Also sample interface message:

https://test.wikidata.org/wiki/MediaWiki:Citoid_qid_type_map.json

MusikAnimal updated the task description. (Show Details)Jul 3 2018, 2:29 PM
Zache added a subscriber: Zache.Oct 10 2018, 1:20 PM
Restricted Application changed the subtype of this task from "Deadline" to "Task". · View Herald TranscriptOct 10 2018, 1:20 PM

Change 471691 had a related patch set uploaded (by Mvolz; owner: Mvolz):
[mediawiki/services/citoid@master] [WIP] Add wikibase format

https://gerrit.wikimedia.org/r/471691

Change 496748 had a related patch set uploaded (by Mvolz; owner: Mvolz):
[mediawiki/extensions/Citoid@master] [WIP] Remove dependancy on VE, add wikibase module

https://gerrit.wikimedia.org/r/496748

Ocaasi added a subscriber: Ocaasi.May 22 2019, 4:25 PM

Change 500050 had a related patch set uploaded (by Mvolz; owner: Mvolz):
[mediawiki/extensions/Wikibase@master] [WIP] Add tabs to references with jquery.ui.tabs

https://gerrit.wikimedia.org/r/500050

Change 471691 abandoned by Mvolz:
[WIP] Add wikibase format

Reason:
abandoned in favour of I7fc0004abe62e53a67e532298a4e48793eccca66

https://gerrit.wikimedia.org/r/471691

Change 500050 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Add tabs to references with jquery.ui.tabs

https://gerrit.wikimedia.org/r/500050

Change 496748 merged by jenkins-bot:
[mediawiki/extensions/Citoid@master] Add wikibase module

https://gerrit.wikimedia.org/r/496748