Skip to content

Kunstenpunt/datakwaliteit-tool

Repository files navigation

datakwaliteit-tool

Graphical tool to help improve data quality (datakwaliteit in Dutch) on a wikibase instance.

Screenshot

Some features include:

  • Generate a list of all defined constraints on properties
  • Ability to validate constraints on properties (user can choose to limit input or output if the query takes to long) (partially implented)
  • Generate QuickStatements based on query and template for batch correction of data
  • Any Q-number, P-number or statement ID can be double clicked to open the corresponding page in a default web browser.

This tool is initially solely developed for use on the kg.kunsten.be instance, and therefore currently only implements the constraints that are used in this database.

Current implementation scope

The main focus of this tool is the listing and validation of constraints. This happens through custom SPARQL queries, defined to take the logic for each constraint into account.

The project started out as a practical solution for a specific wikibase instance, so only a limited amount of constraint types is implemented, and even for them, the coverage is not as wide and detailed as how it is defined in the WikibaseQualityConstraints extension. For example, constraint scopes is currently not implemented, there is no validation on qualifiers or references at the moment... We are slowly working towards feature parity though!

This is at the moment all done by a single volunteer, so progress is moderately paced.

Constraint implementation status:

Constraint Type Extension Implementation Basic Validation Implemented
allowed qualifiers constraint QualifiersChecker.php ✔️
allowed units constraint AllowedUnitsChecker.php
allowed-entity-types constraint
citation-needed constraint CitationNeededChecker.php
Commons link constraint CommonsLinkChecker.php
conflicts-with constraint ConflictsWithChecker.php ✔️
contemporary constraint ContemporaryChecker.php
description in language constraint
difference-within-range constraint DiffWithinRangeChecker.php
distinct-values constraint UniqueValueChecker.php ✔️
format constraint FormatChecker.php ✔️
integer constraint IntegerChecker.php
inverse constraint InverseChecker.php
item-requires-statement constraint ItemChecker.php ✔️
label in language constraint LabelInLanguageChecker.php
lexeme requires language constraint Lexeme/LanguageChecker.php
lexeme requires lexical category constraint
lexeme-value-requires-lexical-category constraint
multi-value constraint MultiValueChecker.php
no-bounds constraint NoBoundsChecker.php
none-of constraint NoneOfChecker.php
one-of constraint OneOfChecker.php
one-of qualifier value property constraint
property scope constraint PropertyScopeChecker.php
range constraint RangeChecker.php
required qualifier constraint MandatoryQualifiersChecker.php ✔️
single-best-value constraint SingleBestValueChecker.php
single-value constraint SingleValueChecker.php ✔️
subject type constraint TypeChecker.php ✔️
symmetric constraint SymmetricChecker.php
value-requires-statement constraint TargetRequiredClaimChecker.php ✔️
value-type constraint ValueTypeChecker.php ✔️

How to run

The project uses python. Use your preferred method for installing specific python versions on your operating system.

The project makes use of pipenv to manage its python environment. Install it for your platform, then run the following to install the necessary modules:

pipenv install

The project uses a fixed python version to have equal development environments. If your installation does not have the correct python version, the previous command will give a warning. Install the correct python version (as indicated by the warning) and try again.

To then run the application, use the following:

pipenv run python app.py

If you want to generate a release binary, use pyside6-deploy which is part of the used PySide6 Qt UI toolkit library.

pipenv run pyside6-deploy -c pysidedeploy.spec

There is also a Makefile with commands for compiling the ui files, formatting the code, performing typechecks and tests...

Configurations

Configuration for kg.kunsten.be instance

Configuration for www.wikidata.org instance

Static type checking

This application uses the typing module to add type hints and allows for static type checking using mypy.

mypy --strict --follow-untyped-imports path/to/file.py

The --strict argument enables certain extra strict checking flags. The --follow-untyped-imports is needed for now because of the wikibaseintegrator module import.

About

Graphical tool to help improve data quality (datakwaliteit in Dutch) on a wikibase instance.

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Packages

 
 
 

Contributors