Page MenuHomePhabricator

[ES-M2]: Create a new EntitySchema data type
Closed, ResolvedPublic13 Estimated Story Points


As an editor, I want to refer to existing EntitySchemas in statements on Items, Lexemes etc. in order to make it easier to find and classify EnititySchemas. We need a new data type to link to EntitySchemas in statements.

Human (Q5) is governed by the EntitySchema Human (E10).

We would like to create a new EntitySchema data type to link these via statements to show the link between the Item and the EntitySchema.

GIVEN an Item
AND an EntitySchema that governs that class
AND an EntitySchema data type
THEN a statement can be added that links the Item and the EntitySchema

Acceptance criteria:

  • a new datatype exists that allows linking to EntitySchema
  • Only existing EntitySchemas can be selected as values
  • Link text should be the ID (or label if possible) of the EntitySchema
  • The new datatype should be added to Special:ListDatatypes


Related Objects

Event Timeline

Sprint 6 Planning - Notes

  • Confirm if datatypes are enabled in the config as default
  • datatype for this exists and 'the datatype is disabled in prod via wmgWikibaseDisabledDataTypes'. Do we use this or create this?
  • where should this live?
  • @ItamarWMDE insight here would be good
karapayneWMDE set the point value for this task to 13.Mar 21 2023, 10:22 AM
karapayneWMDE moved this task from Unified dot to Sprint-∞ on the Wikidata Dev Team board.

Task Breakdown Notes:

  • We are not yet able to decide where the code should go. Some extensions (WikibaseLexeme, Math) have data types defined within their codebase. With the math extension this has caused some issues with CI configuration, but might be solvable with proper planning
  • This all boils down to an architectural decision, we will therefore take time to outline the first sections of an ADR for this

Next Steps:

  • We need to figure out where datatypes are enabled/disabled
  • We should start by understanding what was done in the previously added datatype and, importantly, why it was deemed unfit and ended up being rolled back. This is information the whole team should have as a starting point to working on this.
  • It will also be beneficial to work on writing the ADR together in a shared doc

We need to figure out where datatypes are enabled/disabled

This is entirely done via the config option of $wgWBRepoSettings['disabledDataTypes'] in wmf-config. That means also that the (legacy) EntitySchema datatype is enabled in a default Wikibase setup (like the dev setups).

Change 903705 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/EntitySchema@master] [WIP]: Add ADR 0003 about adding the Datatype Wiring into EntitySchema

Change 903705 merged by jenkins-bot:

[mediawiki/extensions/EntitySchema@master] Add ADR 0003 about adding the Datatype Wiring into EntitySchema

Breakdown Notes:

  • We agreed that we will add the data type wiring in the entity schema codebase (as per ADR 0003)
  • We are currently working under the assumption that the only support for entity schema links required in this task is for the statement page alone, of course we will be happy to implement additional features (such as entity schema links in talk pages etc.) after this first pass
  • RDF formatting and representation is not part of this task, but its functionality will be added in T225778: [ES-M2]: Define canonical URI for EntitySchemas
  • Excluded: registering the "expert module" for picking entity schemas as values this is probably an additional user story that requires more definition from product and UX

Potential Plan of Action:

  1. Start with a simple data type: a PT:entity-schema that only has a value type of string (TBC: @Michael)
  2. In parallel:

This is looking good on Beta now, just going to leave it open until we are live on Wikidata.

It would be great to update the name of the data type from Entity Schema to EntitySchema so it reflects how they are referred to on Wikidata.

Once we are live on Wikidata, we will need to add the data type to the Special:ListDatatypes

If it's easier to follow, I can create new tickets for these tasks

Perfect, yeah, I'd say it's easier if we have all our work tracked with tickets

karapayneWMDE claimed this task.

Completed in 2023 sprint 9