Giter Site home page Giter Site logo

wikimedia / wikidata-query-rdf Goto Github PK

View Code? Open in Web Editor NEW
137.0 137.0 47.0 6.51 MB

Github mirror of "wikidata/query/rdf" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing

Java 72.40% Shell 0.27% Python 0.88% Perl 0.04% HTML 0.20% Scala 25.29% Raku 0.02% Dockerfile 0.06% PHP 0.03% HiveQL 0.81% JavaScript 0.01%

wikidata-query-rdf's Introduction

Wikibase RDF Query

Tools for Querying Wikibase instances with RDF. The modules:

  • blazegraph - Blazegraph extension to make querying Wikibase instances more efficient
    • GPLv2 Licensed
  • war - Configurations for Blazegraph and the service
    • GPLv2 Licensed
  • tools - Tools for syncing a Wikibase instance with an SPARQL 1.1 compliant triple store
    • Apache Licensed
  • common - Code shared between tools and blazegraph
    • Apache Licensed
  • testTools - Helpers for testing
    • Apache Licensed
  • dist - scripts for running the service
    • Apache Licensed

See more in the User Manual.

Logging

Mapped Diagnostic Context contains some information depending on the context:

  • remote-query: a query sent to mediawiki
  • a few request related context, see ch.qos.logback.classic.helpers.MDCInsertingServletFilter for details)

See also org.wikidata.query.rdf.common.LoggingNames.

Development Notes

Eclipse

Works well with m2e.

Randomized Testing

Some tests use RandomizedRunner. If they fail you'll get a stack trace containing a "seed" that looks like this:

	at __randomizedtesting.SeedInfo.seed([A4D62887A701F9F1:1BF047C091E0A9C2]:0)

You can reuse that see by adding @Seed to the test class like this:

	@RunWith(RandomizedRunner.class)
	@Seed("A4D62887A701F9F1:1BF047C091E0A9C2")
	public class MungerUnitTest extends RandomizedTest {

Just remember to remove the @Seed annotation before committing the code.

We use RandomizedRunner because its a good way to cover a ton of testing ground with relatively little code. Its how Lucene consistently finds bugs in the JVM before they're hit in production.

Unit and Integration Testing

All tests either end in "UnitTest" or "IntegrationTest". "UnitTest"s are so named because they don't need any external services. "IntegrationTest"s either need to spin up some service like Blazegraph or they need an Internet connection to wikidata.org or test.wikidata.org.

Blazegraph

We use Blazegraph for testing SPARQL. You can start it from the command line by running

	cd tools && runBlazegraph.sh

It is started automatically during integration testing.

Maven

pom.xml files are sorted according to the usual code convention. The sortpom-maven-plugin is used to fail the build if this order is not respected. The pom.xml can be automatically sorted with:

mvn sortpom:sort

The application can be started by running the following command in the war submodule:

mvn -pl war jetty:run

The -pl war argument tells maven to run inside the war submodule, this is equivalent to running:

cd war && mvn jetty:run

The same target can be used directly from your IDE to run in debug mode and use all the nice IDE integration (automatic class reloading, ...). Check your IDE documentation for details.

Note: jetty:run will not automatically detect changes to other modules, but if you run mvn install in the root of the project, the changes should be compiled and jetty should auto reload the application.

Current central released version: Maven Central

wikidata-query-rdf's People

Contributors

addshore avatar deskana avatar dr0ptp4kt avatar earldouglas avatar ebernhardson avatar gehel avatar hashar avatar igor-kim avatar innovimax avatar janzerebecki avatar jdpupont-bnf avatar jobar avatar jonaskress avatar kleinmuci avatar krinkle avatar lucaswerkmeister avatar nomoa avatar nyurik avatar onimisionipe avatar pastakhov avatar ricordisamoa avatar ryankemper avatar schulzp avatar smalyshev avatar thiemowmde avatar trey314159 avatar zbyszkop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.