Commit graph

2591 commits

Author SHA1 Message Date
Umherirrender 94ec268cb8 tests: Use correct expect message function in MathWikibaseConnectorTest
expectException needs expectExceptionMessage to be useful

Change-Id: Ic0b9d2e9ab05e958d86082886f1cef3f213919ad
2023-07-10 20:41:57 +02:00
Ed Sanders 149e5db0a0 Fix ContextItem documentation
* Be more specific about the type of context which a
  context item belongs to.
* Make grammar clearer.

Change-Id: I6f7abc777c378be2f1ac3f8db678363664d46ccd
2023-07-10 14:33:51 +01:00
Translation updater bot e64b976b69 Localisation updates from https://translatewiki.net.
Change-Id: Id2071ac366f78efa4a41b092ae09bc75d50e841e
2023-07-10 09:38:21 +02:00
Daimona Eaytoy 35d0f8ceb2 Update reference to tests/phpunit/phpunit.php
Bug: T90875
Change-Id: Ieee9a9bd8b24e42815fdbf98d374b54e084c8e9e
2023-07-02 18:27:24 +02:00
Moritz Schubotz (physikerwelt) 16d1fdacf4
Add WAN Cache for native MathML rendering
* Cache results for checked tex and MathML string in one cache.
* Remove access to parsetree
* Introduce run method to speed up service wiring

Note that the indirection table used in previous versions was
abandoned here. texvc does only little unification's of the
input string so that it is not expected that the overall savings
in space and compute time warrant the additional table.

Change-Id: Ib9ce3d2ab02bd9a2a0f9926db6b937435b7e5458
2023-06-19 23:04:08 +02:00
jenkins-bot ceea8068d0 Merge "Add MathML interface to LocalChecker" 2023-06-19 17:26:19 +00:00
Moritz Schubotz (physikerwelt) fc425b977c
Add MathML interface to LocalChecker
In preparation for caching we store the MathML fragment returned by
local checker. The rational is that the string serialization of the
parse tree is better chachable as the parsetree.

Change-Id: Ice2ef1f4f7b83ed187507d4d067f446603d0d6a5
2023-06-19 17:39:49 +02:00
Translation updater bot fd89b38374 Localisation updates from https://translatewiki.net.
Change-Id: I504b7005580616227df2a6793d666e37abbd7e01
2023-06-19 11:07:24 +02:00
Translation updater bot 05c897f168 Localisation updates from https://translatewiki.net.
Change-Id: I4e297529126333a21887169528ec62d05b5947ce
2023-06-14 13:07:21 +02:00
Translation updater bot a5eea48d1a Localisation updates from https://translatewiki.net.
Change-Id: Ifaad463bda7d7a045d635620d7b07ba98864c9cf
2023-06-12 13:07:43 +02:00
Daimona Eaytoy ce1078f7cf Catch more specific exception in MathRestbaseInterface
Follows-up: Ic44463e910911afe6395c38fd2f59b9bfa02a4f0
Change-Id: I95846304e2a81119df5a3785a3f30ae8349cc720
2023-06-09 13:01:53 +02:00
Daimona Eaytoy d06bd18532 Replace deprecated MWException
Introduce new classes for checked exceptions, and use SPL exceptions
for the unchecked ones.

Bug: T328220
Change-Id: Ic44463e910911afe6395c38fd2f59b9bfa02a4f0
2023-06-09 13:00:46 +02:00
Translation updater bot 7e54e8d7fd Localisation updates from https://translatewiki.net.
Change-Id: Ia697b5fd1cebdd1168d4f4d7d4419b06c10caf15
2023-06-08 10:39:44 +02:00
Moritz Schubotz (physikerwelt) 7c7b3324be Remove additional v1 suffix when computing internalRestbaseURL
Remove additional /v1 when computing internalRestbaseURL from
virtualRestConfig as this will be added in getUrl in MathRestbaseInterface.

internalRestbaseURL was introduced in I2fbc441955a1fe417f264f31f3729ce0715f7f16.

Bug: T334842
Bug: T338381
Change-Id: If2719fb9106e1414ce8814a2fbafa5dcedb84e39
2023-06-08 01:10:30 +00:00
jenkins-bot 03b185078b Merge "Create HookRunner class and the hook handler interfaces" 2023-06-07 09:39:56 +00:00
Ed Sanders bf9d8cef1d Always use the strict equality flag when using in_array
Change-Id: I555be3a62ee545304ea1ff7fdcffa3c4fbd25ab1
2023-06-06 13:35:12 +01:00
Umherirrender 28c5a67697 Create HookRunner class and the hook handler interfaces
Bug: T263353
Change-Id: I7ee943a262eba7d2f00fd05925676cc2351b7be9
2023-06-05 22:47:33 +02:00
Translation updater bot 3263379318 Localisation updates from https://translatewiki.net.
Change-Id: I407da55ece2e7c828a3acee0bdba21af6f764278
2023-06-05 08:40:59 +02:00
libraryupgrader 5f372144f7 build: Updating npm dependencies
* grunt-banana-checker: 0.10.0 → 0.11.0
* stylelint-config-wikimedia: 0.14.0 → 0.15.0

Change-Id: I09c6289cfe727fb2d545cbeeeac1a32c45ce9531
2023-06-02 14:27:02 +00:00
Umherirrender a967557107 tests: Call TestCase::createMock with $this
createMock is not a static function (like atLeastOnce)
It is easier to spot that this needs a TestCase when using $this

Change-Id: I6b738e31f43fd7ee2ecd608d0bb853a3ebac3121
2023-05-31 23:00:27 +00:00
jenkins-bot a4911d2283 Merge "Introduce MathInternalRestbaseURL setting." 2023-05-31 06:28:39 +00:00
daniel 43dd9c7f63 Introduce MathInternalRestbaseURL setting.
This new MathInternalRestbaseURL setting allows the internal URL of
Mathoid to be configured directly, instead of relying on
VirtualRestConfig.

This patch moves the fallback logic for the internal and external API
URL into an extension registration callback. This way, we can keep the
application logic simple, and we can issue config warnings that will
cause the updater to fail, forcing wiki owners to update their config.

Bug: T334842
Change-Id: I2fbc441955a1fe417f264f31f3729ce0715f7f16
2023-05-30 09:48:03 +00:00
Translation updater bot 095506a4ce Localisation updates from https://translatewiki.net.
Change-Id: I78d6e1b965ef524360e95c707654e6b0863c21b7
2023-05-29 09:59:32 +02:00
rrana-wmf c601e1d6f2 Add test case for MathRestbaseInterface.php
Add test case for getType() method.

This will improve the code coverage for this method from 0 to 100%.

Add test case for getTex() method.

This will improve the code coverage for this method from 0 to 100%.

Add test case for evaluateRestbaseCheckResponse() method.

This will improve the code coverage for this method from 0 to 100%.
And covers getIdentifiers(), getWarnings(), setErrorMessage(),
methods from 0 to 100%.

Change-Id: I6bdb6919126e5488838d4fba53eb2f74c89ee63d
2023-05-22 09:36:29 +00:00
Umherirrender 7a8d5b9dc4 tests: Make some PHPUnit data providers static
Initally used a new sniff with autofix (T333745)

Bug: T332865
Change-Id: I73d2903fed7523826b71fc452a846dc4c6e85802
2023-05-21 11:00:48 +02:00
rrana-wmf 5926f42b52 Use MultiHttpClient instead of VirtualRESTService.
This fixes the problems with If208753edfdb301 which was reverted
and adds a new test.

Bug: T335347
Co-Authored-By: <rrana-ctr@wikimedia.org>
Change-Id: I7ddb7b294cbccc4dab42e286fc270f438385bee5
2023-05-20 16:57:46 +00:00
jenkins-bot edc480ae62 Merge "Revert "Revert "Add getMultiHttpClient function to make HTTP requests to Mathoid.""" 2023-05-17 13:56:41 +00:00
Translation updater bot a0e0668726 Localisation updates from https://translatewiki.net.
Change-Id: I1f73c9df0ff9f22d1dcd91032a475da65155e3b2
2023-05-17 08:49:38 +02:00
Subramanya Sastry de76f99d3d Revert "Revert "Add getMultiHttpClient function to make HTTP requests to Mathoid.""
This reverts commit a38e56c3fc and
reapplies 38c73d9b7a

Bug: T335347
Change-Id: Ib5f82c022d6ff435a807f8f4128a308f3dacc455
2023-05-16 13:07:32 +00:00
Translation updater bot 865dc23a38 Localisation updates from https://translatewiki.net.
Change-Id: I37a10aed577279f9b37d81f401351d612a034681
2023-05-15 08:33:05 +02:00
Daniel Kinzler a38e56c3fc Revert "Add getMultiHttpClient function to make HTTP requests to Mathoid."
This reverts commit 38c73d9b7a.

Reason for revert: Breaks math on Beta, shouldn't go live.

Change-Id: I62c63e20c94ddc25c5c291ba42afd28e153b34a6
2023-05-12 10:23:31 +00:00
rrana-wmf 38c73d9b7a Add getMultiHttpClient function to make HTTP requests to Mathoid.
This add new function named "getMultiHttpClient" to the
MathRestbaseInterface.
The function creates a MultiHttpClient object using the HTTP
request factory.

This function will be useful for making HTTP requests to Mathoid.

Add test case for getUrl() method.

Bug: T335347
Change-Id: If208753edfdb3017f722c97cea7653170d05f8a5
2023-05-11 17:58:50 +00:00
daniel 3fa7837cee Add test case for MathRestbaseInterface::batchEvaluate
This test case ensures that responses from RESTbase are processed
correctly.

Change-Id: I5fbd45ac5e61a6294817617a6784846ae815fd6e
2023-05-11 19:58:26 +02:00
daniel 38e649c722 Math: test usage of URL in HttpMultiClient
Change-Id: I063319ad1b12d66d2054846e6c3b27c715ca3d31
Co-Authored-By: <rrana-ctr@wikimedia.org>
2023-05-08 18:19:30 +00:00
Umherirrender 35660f4e78 Replace deprecated Hooks::run
Bug: T335536
Change-Id: I6968c26df6819f0c83105e92c03d1d204f90db27
2023-05-06 23:11:13 +02:00
Translation updater bot 037830b2d4 Localisation updates from https://translatewiki.net.
Change-Id: I304a347139f9789a02d9182b2dc69b9d6bb99e81
2023-05-05 10:39:51 +02:00
libraryupgrader 6f89b61bca build: Updating eslint-config-wikimedia to 0.25.0
Change-Id: I561ffafc759f6d42f1203e99c62fa33aff6bde97
2023-05-04 06:05:24 +00:00
Translation updater bot cc4e91ed7f Localisation updates from https://translatewiki.net.
Change-Id: I93f4f009c3f3492493f09a49661b22f24f977a7f
2023-05-03 08:43:48 +02:00
jenkins-bot b17eec1bf5 Merge "Replace deprecated Hooks::run" 2023-05-02 14:11:46 +00:00
jenkins-bot 16b50090d4 Merge "build: Upgrade api-testing from 1.5.0 to 1.6.0" 2023-04-30 12:33:03 +00:00
libraryupgrader 7c267e83ff build: Updating dependencies
composer:
* mediawiki/mediawiki-phan-config: 0.12.0 → 0.12.1

npm:
* grunt-eslint: 24.0.0 → 24.0.1

Change-Id: I9cd23b8344fed2c69014b618f96f122823f4bed9
2023-04-29 06:56:04 +00:00
James D. Forrester 1211b68919 build: Upgrade api-testing from 1.5.0 to 1.6.0
Bug: T333134
Change-Id: I5eb7e7f2462b7cb116423b1f504bbaa50a5fa70b
2023-04-28 15:49:02 +00:00
Umherirrender b654cc2b0a Replace deprecated Hooks::run
Bug: T335536
Change-Id: I6ef724346dd82147ef22af23833c6a0af8bc9054
2023-04-27 22:51:38 +02:00
jenkins-bot be27ddb2f1 Merge "Fix issues with DQ" 2023-04-20 16:07:27 +00:00
Stegmujo b1edd31543
Fix issues with DQ
Bug: T315978
Change-Id: I04c9178ce5785f29ab79de6dc82070465efca611
2023-04-20 10:57:04 +02:00
gerritbot e492f9189e Update moved class TitleFactory
See T321882
Moved in Iac1688172ee457

Bug: T321681
Change-Id: I713374ad7f9cfe1ba476d2b8729b2164cb5a4f56
2023-04-19 17:16:36 +00:00
Translation updater bot ff9b622f62 Localisation updates from https://translatewiki.net.
Change-Id: I70d6599cdcfa2734348418268d3fae4930578e1f
2023-04-17 09:14:33 +02:00
Translation updater bot 9674a4ed36 Localisation updates from https://translatewiki.net.
Change-Id: I05552344203438a0bd1879fb0a2937850633ce6c
2023-04-11 09:14:03 +02:00
Translation updater bot d78ddf4768 Localisation updates from https://translatewiki.net.
Change-Id: I34a495d8e00af91fc1ebcb44fcc8136063a24245
2023-04-10 09:22:04 +02:00
Stegmujo 6e0427c2ba
Fix for attributes in named Operator
Bug: T315978
Change-Id: I7277d03bae031ffcb2995c097f92c795cc2637dd
2023-04-06 13:44:58 +02:00