Page MenuHomePhabricator

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

Description

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.

Example:
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.

BDD
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

Notes:

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
ResolvedkarapayneWMDE
ResolvedArian_Bozorg
ResolvedMichael
ResolvedMichael
ResolvedArian_Bozorg
ResolvedNone
DeclinedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedArian_Bozorg
ResolvedArian_Bozorg
InvalidBUG REPORTLucas_Werkmeister_WMDE
ResolvedArian_Bozorg
Resolvedhoo
ResolvedItamarWMDE
ResolvedNone
ResolvedItamarWMDE
ResolvedJakob_WMDE
ResolvedItamarWMDE
ResolvedPRODUCTION ERRORLucas_Werkmeister_WMDE
OpenNone
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedMichael
ResolvedMichael
ResolvedLucas_Werkmeister_WMDE
ResolvedMichael
Resolvedguergana.tzatchkova

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

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

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

Change 903705 merged by jenkins-bot:

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

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

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