Page MenuHomePhabricator

Fixture data to populate a new Wikibase docker instance
Closed, ResolvedPublic

Description

As a newcomer who plays with the docker-compose file, I installed Wikibase through the 'command-line-magic' docker-compose up,
Then I would like to feed/populate some wikibase items with fixtures sample data out-of-the-box.
ie. docker-compose exec wdqs ./populateFixtures.sh

Those items could come from a canonical dump (ie. items sample from wikidata)
or items from your own dump (ie. ttl or ndjson)

Related repos to manually workaround this issue (involving php and pip) (thx to @Addshore for the help provided)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I've been working a little on this and have created a couple python scripts to help pre-populate a fresh wikibase.
Located here: https://github.com/stuppie/wikibase-tools

It creates "equivalent property" and "equivalent class" properties, and then allows you to import either a set of QIDs and/or PIDs from wikidata, or can import all properties from Wikidata, and creates the respective equivalent class/property statements with values linking back to the Wikidata URIs.

Note: It simply creates the item with equivalent class/property statements. It does NOT fully recreate the items including all statements.

Future plan is to allow giving a Shex template and importing the relevant data from the resulting ttls

StjnVMF renamed this task from Fixture data to populate a new Wikibase docker instance to unban reguyla.May 18 2018, 5:23 PM
StjnVMF updated the task description. (Show Details)
StjnVMF edited subscribers, added: Nullzero; removed: Gstupp, Jumtist.
JJMC89 renamed this task from unban reguyla to Fixture data to populate a new Wikibase docker instance.May 18 2018, 5:34 PM
JJMC89 updated the task description. (Show Details)
JJMC89 edited subscribers, added: Gstupp, Jumtist; removed: Nullzero.
Addshore claimed this task.

So, WikibaseImport is now included in the bundle docker image.
Using that extension you should be able to pull in entities from other pre existing wikibases, for example test, beta and the real wikidata.

Resolving this for now, if you need anything else please do comment.

Vvjjkkii renamed this task from Fixture data to populate a new Wikibase docker instance to frcaaaaaaa.Jul 1 2018, 1:09 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed Addshore as the assignee of this task.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from frcaaaaaaa to Fixture data to populate a new Wikibase docker instance.Jul 1 2018, 7:46 PM
CommunityTechBot closed this task as Resolved.
CommunityTechBot assigned this task to Addshore.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.