Page MenuHomePhabricator

Prepare Federated Properties test instance #1 (EU Invasive Species)
Closed, ResolvedPublic5 Estimated Story Points

Description

We need to prepare one of the test instances created in T256457 with a sample set of items to be used for testing federated properties.

Data Source
This table provided by the user who will be testing the feature

What to Import
Column A representing the item label, Column B representing the description for the item. Ignore Column C.

Tech details

We decided to write a maintenance script.

  • It has one option, CSV file location
  • It works with one format, EN Label, EN Description

And it would:

  • Create 1 item per row with the label and description

When merged into Wikibase it should then be run on the test system with the data

Domain: eu-invasive-species-federated-properties.wmflabs.org

Event Timeline

Samantha_Alipio_WMDE renamed this task from Set up Federated Properties test instance #1 (EU Invasive Species) to Prepare Federated Properties test instance #1 (EU Invasive Species).Jun 26 2020, 9:12 AM
Samantha_Alipio_WMDE updated the task description. (Show Details)
Addshore raised the priority of this task from Medium to High.Jul 8 2020, 10:34 AM

Discussion

So the data looks like this:

Scientific name (item)	English name	Description (statement: instance of)
Acacia saligna (Labill.) H.L.Wendl.	Golden wreath wattle	taxon

We briefly discussed 3 options:

  • Api calls via a script
    • Perhaps extra complexity with the format to send to the API
    • Learning: Get to use our API!
  • Maintenance script doing it internally
    • ./extensions/Wikibase/repo/maintenance/importFedPropsTestTsv.php --file ./mydata.csv
    • Using the internal Wikibase services
    • explode( " ", explode("\n", $tsvText) ) = all the things?
    • $entityStore->save( new Item( TermList( [ 'en' => $LABEL ] ), StatementList ) )
    • Pro: more testable
  • Via some tool doing it some other wall (quickstatmenets?)
    • We probably don't want to leave something like this setup (per what was said in story time) so should probably avoid this direction.

Todos

We decided to write a maintenance script.

  • It has one option, CSV file location
  • It works with one format, EN Label, EN Description, Instance of string value

And it would:

  • Create items for all of the instances of string values (and keep a record of the Q ids)
  • Create 1 item per row with the label and statement for instance of

When merged into Wikibase it should then be run on the test system (for this ticket) with the data

Change 612633 had a related patch set uploaded (by Rosalie Perside (WMDE); owner: Rosalie Perside (WMDE)):
[mediawiki/extensions/Wikibase@master] [WIP]FP: Maintemance script for federated properties test instance #1

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

Change 612633 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] FP: Maintenance script for test instance #1

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

Resolved as it's in the Done column at the end of sprint 3 (start of sprint 4)