[ARCHIVED] https://phabricator.wikimedia.org/T155829

Clone this repo:

Branches

  1. 95e171c Change schema to make badges indexable by Stanislav Malyshev · 10 years ago master
  2. 216b9f5 add console-based loading by Stanislav Malyshev · 10 years ago
  3. 54dea96 Add codenarc to complain about groovy code by Nik Everett · 10 years ago
  4. b858cc2 Add good tostring for label property by Nik Everett · 10 years ago
  5. 682602c Add synthetic label property by Nik Everett · 10 years ago

Just hacks for now. Please do not use for anything important.

== Code formatting == We use two spaces for indentation and start braces on the same lane. In Java we disallow single line if statements. In Groovy we don't really like them either.

== Local testing == First run the tests

mvn clean test

You can start testing with tinkergraph by running

./console.sh

and from there running

g = TinkerGraph.open()
g.of(WikidataTraversal.class).ensureSchema().wd('Q23').wd('Q91').out('P509').unstub().properties('labelEn')

You can also run tinkergraph in client/server mode. In one window run

./server.sh

and in another window run

./console.sh

from there connect to the server and initialize the graph by running

:remote connect tinkerpop.server src/test/resources/remote.yaml
:> g.of(WikidataTraversal.class).ensureSchema().wd('Q23').wd('Q91').out('P509').unstub().properties('labelEn')

Optionally you can load a dump of wikidata by running

mvn package
java -cp _target/wikidata-gremlin-tools-0.0.9-SNAPSHOT.jar org.wikidata.gremlin.tool.DumpLoader

You can also start updating from wikidata by running

mvn package
java -cp _target/wikidata-gremlin-tools-0.0.9-SNAPSHOT.jar org.wikidata.gremlin.tool.RecentChangesPoller

which will start listening for all changes.

  NODES
os 1
server 4