Jump to content

Tool:WikiDataAuthorityControlTool

From Wikitech
Toolforge tools
WikiData Authority Control Tool
Website https://wd-act.toolforge.org/
Description A tool to help WikiData editors research Authority Control data about WikiData items. Displays completeness information about an entity's Authority Control data fields, and for any missing fields, provides helpful URLs to search for missing data.
Keywords authority control, WikiData
Author(s) Tekneos (Ancient9983talk)
Maintainer(s) (View all)
Source code https://gitlab.wikimedia.org/toolforge-repos/wd-act
License GNU Affero General Public License 3.0
Issues Open tasks · Report a bug

WikiData Authority Control Tool

This tool helps you research Authority Control data for WikiData Items. It displays data about common fields in the Authority Control template, showing in an easy-to-use interface which fields have data, and which data is missing. For any fields which are missing data, it provides a handy link to search for the WikiData Item in the external database.

Project status: actively maintained

Basic functionality

WikiData Authority Control Tool is intended for use by WikiData/general wiki editors. It is meant to help editors research authority control data on different entities.

As an example: let's say you're a Wikipedia editor and want to know how your favorite author or band is represented in common databases, and improve the data. This tool quickly gives you an idea of how "complete" their coverage is in common external authority control sources. And anywhere where data is missing, you can get a quick jump-start towards finding missing data.

For more details about the technical implementation, see the developer documentation.

What WikiData Authority Control Tool does not do

This tool does not currently allow editing WikiData items. At the moment, it is purely intended to be used as a research convenience tool, to make it easier to find Authority Control information. It's expected that users will take the information they find and update WikiData separately.

User documentation

Prerequisites

Before using this tool, you should be familiar with:

You should have:

  • A web browser
  • A particular WikiData Item you want to research

How to use WikiData Authority Control Tool

Lookup an example WikiData item

  1. Open the Authority Control Tool UI at https://wd-act.toolforge.org/
  2. Click the "Help" page
  3. Click one of the example WikiData items to view Authority Control data for it

Lookup Authority Control data on a specific WikiData item

  1. Search for the item on WikiData and get its QID
    1. For example, for H. P. Lovecraft, the QID is Q169566.
  2. Append the QID to the end of the Authority Control Tool's URL.
    1. In this example, the URL would be: https://wd-act.toolforge.org/Q169566
  3. Review the item's authority control data
  4. Optionally, if any data is missing, click the "Search" button to attempt to find the data in the external system.

How to get help and report issues

Developer documentation

OAuth Flow use

I'm currently planning to use the Client Credentials flow for this application. Why?

All this application does is read data from the WikiData API and display it to the user. It does not need access to any user-specific data. Therefore, it doesn't make sense to get user-specific tokens to use when calling the WikiData REST API.

If I find out in the future that something needs to change here, I can revisit.

OAuth Reference info

  • https://www.mediawiki.org/wiki/OAuth/For_Developers
  • https://www.wikidata.org/wiki/Wikidata:REST_API

Technical implementation

Libraries/frameworks used

These libraries/tools/frameworks are currently used in this project:

  • Bootstrap
    • UI framework/components
  • Flask
    • Web server framework
  • Python
    • programming language any server-side logic is written in
  • Python 'requests' library
    • Used for making HTTP requests in Python
  • wikibase-rest-api-client Python library (https://pypi.org/project/wikibase-rest-api-client/)
    • Used to simplify calling the WikiData REST API and parse the API response data into usable Python objects
  • Python.gitignore from https://github.com/github/gitignore

Local development

Set up

How to set up development environment:

  1. Clone the repository from GitLab here: https://gitlab.wikimedia.org/toolforge-repos/wd-act
  2. Open the VS Code Workspace in the root of the repository in VS Code.

Configure

How to configure:

  1. Update run.sh or run.ps1 with the client id/secret of the API key. The software uses this credential to retrieve data from the WikiData REST API.

Build and test

How to build and run locally:

  1. There's no build step since we're working in Python.
  2. To run the project, open a terminal in the root of the repository. Then run the 'run.ps1' script in PowerShell, or the 'run.sh' script in Bash to run the web app.
  3. Open a browser to localhost:5000 to browse the web app.

How to contribute

The WikiData Authority Control Tool maintainers welcome contributions!

  • Bug reports/feature requests
  • Pull requests

Contribution process

  1. Bug reports/feature requests:
    1. First, setup an account in Phabricator to submit issues.
    2. Navigate to the WikiData Authority Control Tool project in Phabricator: https://phabricator.wikimedia.org/project/view/8856/
    3. Create a bug report/feature request there
  1. Pull requests
    1. Navigate to the project's GitLab repo here: https://gitlab.wikimedia.org/toolforge-repos/wd-act
    2. Clone the repo and make a branch to work on your changes locally
    3. Make your changes, test and validate
    4. Create a pull request in GitLab, with a request to merge into the main branch

Credits

List any contributors and individuals, teams, or organizations who contributed to your development of this tool.

License

GNU Affero General Public License, v3.

Link to license: https://gitlab.wikimedia.org/toolforge-repos/wd-act/-/blob/main/LICENSE.txt