GSoC 2020: Enhancements for Wikidata extension
During GSoC 2020, I added two features to OpenRefine Wikidata extension:
- OAuth support for Wikidata extension.
- Extend Wikidata extension to support arbitrary Wikibase instances.
Since these two features are not quite relevant, I’ll give introduce them separately.
The original goal was to add three-legged OAuth support to the Wikidata extension, so users can authorize OpenRefine to upload edits to Wikidata on behalf of them without providing their usernames and passwords to OpenRefine. But considering that OpenRefine was designed to be used locally by a single user, and due to some reasons discussed under #2661, we found that the three-legged OAuth support is complex and not useful. So, the goal was changed to adding two-legged OAuth support (i.e., supporting login with owner-only consumer).
Users can now choose to login with owner-only consumer. This is helpful for the security of their Wikidata accounts.
After clicking on “login with your owner-only consumer”, the user can use the consumer credentials to login in the following dialog:
If the user doesn’t have a owner-only consumer, he can learn how to get one according to Wikidata owner only consumer.
- Add three-legged OAuth support when OpenRefine introduces a use system and supports multiple users, but that’s a long way to go.
- Tweak the UI of username/password login to recommend users to use bot passwords. (#3108)
Arbitrary Wikibase instances support
Users should be able to change the target Wikibase instance to work against, thus making it possible to upload edits to arbitrary Wikibase instances from OpenRefine.
Users can add Wikibase manifests in the following dialog:
As explained in the dialog, we can found manifests for some public Wikibase instances at wikibase-manifest. If there is no manifest for the Wikibase instance the user wants to work against, then the user can write one according to Write-a-Wikibase-manifest.
After adding some Wikibase manifests to OpenRefine, the user can select anyone to work against:
To make OpenRefine work against a given Wikibase instance, the user can simply click on the corresponding item listed in the dialog above.
After switching to the target Wikibase, users can then reconciled the data to the corresponding reconciliation services, edit the schema, login and upload edits to the target Wikibase instance, just in the same way before.
Though coding on this feature did take me a lot of time, I am glad that the UI is kept simple and user-friendly :)
- Write more manifests for other public Wikibase instances.
- More thorough tests on this feature.
- Validate Wikibase manifest on the server. (#3109)