Extension:WikiLambda
État de la version : expérimental |
|
|---|---|
| Implémentation | Fonction d'analyseur, ContentHandler |
| Description | Providing Wikimedia wikis with a wikitext parser function to call evaluation of functions written, managed, and evaluated on a central wiki. |
| Auteur(s) | Wikimedia Foundation |
| Politique de compatibilité | Versions ponctuelles alignées avec MediaWiki. Le master n'est pas compatible arrière. |
| Modifie la base de données |
Oui |
|
|
|
|
| Licence | Licence MIT |
| Téléchargement | |
| Traduire l’extension WikiLambda sur translatewiki.net si elle y est disponible | |
| Problèmes | Tâches ouvertes · Signaler un bogue |
The WikiLambda extension provides for a wiki to host functions written, managed, and evaluated by users, which is used to power wikifunctions.org. It forms the core of the "Wikifunctions" software stack, as part of the work towards Abstract Wikipedia. The system is currently in active development, with the front-end written in Vue.js and using the new Codex interface library. Wikifunctions via WikiLambda provides Wikimedia wikis with a wikitext parser function to make evaluations from Wikifunctions on their local wiki.
Introduction

Wikifunctions is a MediaWiki installation on which function content, but not output, is stored. This content takes the form of programmatic descriptions of each available function ("Functions"), actual user-written code for these functions ("Implementations"), test suites for these functions ("Testers"), and human-facing documentation about these functions, alongside the usual wiki community management content like village pumps, discussion areas, and policy pages.
Requests for function calls can come in directly via a Web request, or via MediaWiki (through a parser function {{#function:…}}).
The function orchestrator determines the specifics of the request, checks the cache to see if the output value has been recently provided, and either returns that or proceeds to trigger an evaluation.
To do that, it fetches all relevant content from the cluster, be that published function content (or mid-edit as-yet-unpublished function content being "previewed") from Wikifunctions, or structured content on which functions can operate from Wikidata and Wikimedia Commons.
The complete bundle of code to execute and inputs on which to execute are then passed to the appropriate function executor, which then securely tries to execute the input and returns the output (or a failure error).
The orchestrator then writes the successful result to the cache and transmits it to the consumer.
The WikiLambda extension is responsible for content management of the content on the Wikifunctions wiki (like the Wikibase Repository extension), providing editing interfaces, restricting users from or warning about certain actions, and providing a reading and test execution interface, and the integration of content requests on all Wikimedia wikis (like the Wikibase Client extension). User-written code is never executed in the context of the production environment, and thus never has access to sensitive content, but is only run in isolated, disposable instances.
Getting started
Install
- Téléchargez et placez le(s) fichier(s) dans un répertoire appelé
WikiLambdadans votre dossierextensions/.
Les développeurs et les contributeurs au code doivent à la place installer l'extension à partir de Git en utilisant:cd extensions/ git clone --recurse-submodules https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiLambda
- Seulement lorsque vous installez à partir de Git, exécutez Composer pour installer les dépendances PHP, en entrant
composer install --no-devaprès vous être positionné dans le répertoire de l'extension. (Voir T173141 pour des complications potentielles.) - Ajoutez le code suivant à la fin de votre fichier LocalSettings.php :
wfLoadExtension( 'WikiLambda' );
- Exécutez le script de mise à jour qui va créer automatiquement les tables de base de données dont cette extension a besoin.
Fait – Accédez à Special:Version sur votre wiki pour vérifier que l'extension a bien été installée.
Installing the back-end services
If you wish you install the back-end services to use the WikiLambda software, you must do so and configure them. Instructions are subject to change, and so only provided within the repo.
Testing locally
(TODO)
Code stewardship
- Maintenu par Abstract Wikipedia team.
- Discussion en direct (IRC): #wikipedia-abstract-tech connecter
- Suivi des problèmes : Phabricator wikilambda (rapporter un problème)
See also
- MediaWiki-Docker/Extension/WikiLambda
- Code documentation:
- For PHP
- For JS
- Code coverage (PHP)
- function-evaluator service
- function-orchestrator service
- functon-schemata shared library
- Abstract Wikipedia Architecture
- Abstract Wikipedia developer cheatsheet
Subpages
- API
- Approving Implementations and Testers
- Approving Implementations and Testers/de
- Approving Implementations and Testers/en
- Approving Implementations and Testers/ru
- Approving Implementations and Testers/uk
- CLI
- Coding Conventions
- Core objects
- Creating Objects
- Development environment
- Discovery needs
- Frontend Architecture
- Granular Edit Authorization
- Jupyter kernel proposal
- Metrics
- Metrics Implementation
- User stories
- de
- en
- examples/multiply.json
- fr
- ja
- pl
- pt
- uk
- wikilambda zlanguages table
- wikilambda zobject function join table
- wikilambda zobject join table
- wikilambda zobject label conflicts table
- wikilambda zobject labels table
- wikilambda ztester results table
| Cette extension est utilisée par au moins un des projets Wikimédia. Cela signifie probablement que l’extension est assez stable et fonctionnelle pour être utilisée sur des sites à fort trafic. Recherchez le nom de cette extension dans le CommonSettings.php de Wikimédia et dans le fichier de configuration InitialiseSettings.php pour situer les endroits où elle est installée. Une liste complète des extensions installées sur un Wiki donné peut être visualisée sur la page Special:Version de ce wiki. |
- Experimental extensions/fr
- Parser function extensions/fr
- ContentHandler extensions/fr
- GetUserPermissionsErrors extensions/fr
- MultiContentSave extensions/fr
- NamespaceIsMovable extensions/fr
- ParserFirstCallInit extensions/fr
- HtmlPageLinkRendererEnd extensions/fr
- MIT licensed extensions/fr
- Extensions in Wikimedia version control/fr
- All extensions/fr
- Extensions requiring Composer with git/fr
- Extensions used on Wikimedia/fr
