πŸ”— 🌐 Github mirror of MediaWiki extension Wikibase - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build Don't use stashMwGlobals Oct 7, 2018
client Localisation updates from https://translatewiki.net. Oct 18, 2018
data-access Hygiene: anchor test coverage in the global namespace Oct 16, 2018
docs Drop supportedEntityTypesForEntitiesWithoutTermListings config Oct 2, 2018
jmeter Test Wikidata.org entity page performance Aug 16, 2018
lib Localisation updates from https://translatewiki.net. Oct 16, 2018
repo Localisation updates from https://translatewiki.net. Oct 18, 2018
tests Make Wikibase Client create wikibase_item field Oct 5, 2018
view Remove item and property specific code from Entityview Oct 19, 2018
.editorconfig EditorConfig file Dec 5, 2016
.eslintrc.json build: Update eslint from 19->20 Sep 13, 2017
.gitignore Add Phan config May 23, 2017
.gitmodules Move over files of Data View library (JS part) Dec 5, 2017
.gitreview Whoops, track not trace Oct 25, 2016
.luacheckrc Adding .luachecrc with a minimum configuration Nov 20, 2017
.mailmap Family name of Thiemo changed Nov 14, 2017
.phpcs.xml PHPCS: do not check Phan stubs Jul 27, 2018
.rubocop.yml Enable rubocop May 20, 2016
.rubocop_todo.yml Update RuboCop Ruby gem Dec 6, 2017
.scrutinizer.yml Add missing newline at end of text files Feb 13, 2017
.stylelintrc.json build: Bump CI development dependencies Dec 4, 2017
.travis.yml Travis: Don't test PHP5 May 24, 2018
CODE_OF_CONDUCT.md build: Updating npm dependencies for security issues Oct 11, 2018
COPYING Remove outdated and superfluous pieces of documentation Jun 2, 2014
CREDITS Add Lucas and Pablo to CREDITS Jul 17, 2018
Doxyfile Doxygen configuration Oct 24, 2016
Gemfile Move Gemfiles to tests/browser/ and leave symlinks Apr 11, 2017
Gemfile.lock Move Gemfiles to tests/browser/ and leave symlinks Apr 11, 2017
Gruntfile.js Split Wikibase Client apihelp messages to a separate group Sep 25, 2018
README.md Remove optional dependency on Wikibase local vendor directory Jul 17, 2018
Rakefile Migration of browsertests* Jenkins jobs to selenium* jobs May 23, 2016
Wikibase.php Remove WikibaseClient.jenkins.php Jul 12, 2018
composer.json Add calendar extension to suggested packages - composer.json Oct 1, 2018
jsduck.json Omit all warnings in JsDuck Oct 25, 2016
package.json build: Updating npm dependencies for security issues Oct 11, 2018
phpunit.xml.dist Do not reference deleted bootstrap.php in PHPUnit config Jul 27, 2018

README.md


Introduction to Wikibase

Build Status Scrutinizer Code Quality

The Wikibase.git package is part of the Wikibase software and consists of three interconnected extensions:

  • Wikibase Repository (in the directory repo)
  • Wikibase Client (in the directory client)
  • WikibaseLib (in the directory lib)

These extensions allow for the creation, maintenance, dissemination, and usage of structured data in MediaWiki.

The repo is the extension for the repository. It allows the creation and maintenance of structured data. This is being used on wikidata.org.

The client is the extension for the client. It allows several MediaWiki instances to use data provided by a Wikidata instance. Usually, you would not use them in a single wiki. This is being used on the Wikipedias.

The lib bundles common code that is used by both the client and the repo.

Install

This package contains three interrelated MediaWiki extensions:

  • Wikibase (in the subdirectory repo)
  • WikibaseLib (in the subdirectory lib)
  • Wikibase Client (in the subdirectory client)

If you are running Wikibase with hhvm, you need to enable zend compat in your php.ini:

hhvm.enable_zend_compat = true

Wikibase depends on various libraries such as DataValues components, and uses Composer to make it easy to install and manage those.

Once you have Wikibase in your MediaWiki extensions directory, add the composer.json of Wikibase to composer.local.json at the root of your mediawiki folder, as documented in MediaWiki's Composer documentation.

It should now look similar to:

{
  "extra": {
    "merge-plugin": {
       "include": [
         "extensions/Wikibase/composer.json"
       ]
    }
  }
}

Then, in the root of your mediawiki folder, run:

composer install

When using ways to combine MediaWiki with the extension folders (e.g. symlinks or docker volumes) please make sure that the folders are available to composer in the same structure they are available to the webserver, too.

This will install both Wikibase Client and Repo together on the same wiki.

If you want to only have one or the other, then set $wgEnableWikibaseRepo = false or $wgEnableWikibaseClient to false for the one you don't want to enable.

Wikibase also depends on several JavaScript libraries. They are included in this repository as submodules. To fetch files of these libraries, you might need to run, in the Wikibase extension folder, the following command:

git submodule update --init

Development

Wikibase uses tools to ensure the quality of software developed. To invoke these tools, inside the Wikibase folder, run

composer install
composer run-script test

As this uses development dependencies and custom configuration, executing it from the MediaWiki root folder (via composer run-script test extensions/Wikibase) will not work satisfactorily

The Wikibase software

These extensions are part of the Wikibase software created by the Wikidata team for the Wikidata project.

The Wikidata project uses the Wikibase software on its website.