Gets warning information from restbase and adds tracking categories
for deprecated chemical syntax.
Refactor mechanism to add tracking categories, and avoiding rechecking
already checked formulae.
Depends on: Ieca66f45ae7685d61eece1624bd7ff65ccad2eaa
Change-Id: I10e78ab79015dc1331f645c60b25bbbd237e23fe
The comments behind @group Database prevented the tests from being run
as part of the --group Database phpunit jobs.
Bug: T202223
Change-Id: I8dc68d3d90502fa7bd691cf18f0e296d97d3c893
Create MathDataUpdater class that checks if statements
are using math and adds the stlyes required for math in that case.
This patch has no effect until
I5bc0622ee7338f3215d14e15331a0a1931ca1ae0
is merged.
After both changes are in effect
I0abd6acbfa12fd503d11476f0c8c8c8a8a851cdc
can be merged.
Bug: T173949
Change-Id: I0e24bbb53e6e01d549f534744780ca1afc49fdd7
Note that a class is not resolved this was. …::class is not a function
call. It's more like a named string constant. Technically still a
string. The advantage is that IDEs and tools like linters can much easier
understand that these strings refer to a class, and list them in usage
reports, renames, and such.
Change-Id: I5225543dbb837685a1840837cb2772dd576cca38
* deprecate and fix pickHost. It was broken and never used.
* simplify inputTypeSelection
* remove superfluous is_array check for the result of explode
Change-Id: I392f22f074facfe30b97d53a3002f464a471b67e
In T74240 support for LaTeX based rendering of the <math/>-tags was
removed. This change eliminates the unused code from the repository.
Bug: T195871
Change-Id: Ic57d83fa49f090b574ce8b82fd2ebc84a5350318
They are replaced by Selenuium tests in Node.js.
Bug: T162455
Change-Id: I1f5bc8f9c5cd687a6ba116f2f0461eb2992096c7
Depends-On: Ibd8a39cc75231932f872456b8d3ec1fe41ef23e2
* Use the exactly same routines to deliver png images that are used in
mathml mode.
* Change the output to use mathoids png image rather than the mathml
and svg output.
* Locally tested on Firefox and Chrome: Depending on the mode either
the SVG or the PNG path is used.
Bug: T74240
Change-Id: I4b1cac92eb9a02190f316faab6621940951603d5
* currently the phpunit tests are not triggered by jenkins
* some test can't be re-enabled possible reasons:
** the texvc and texvccheck binaries are not available from jenkins
** the binaries can not be generated
** the path to the binaries are not set up correctly
Bug: T142120
Change-Id: I0c8fe5ad652c4663eeb029781521acbf56e42bad
A formatter like this is not supposed to check if the format is known
or not. The code calling these formatters can introduce new (sub) formats
any time. What a formatter like this should do then are two things:
* If it's some HTML format, always return HTML.
* If you really can't identify the format, do a sensible fallback.
This currently blocks introducing a new format in Wikibase.
Bug: T46727
Change-Id: I585069e8f2ba33ec657ca4d514c6d502fe0f5ba3
This is obviously copy-pasted from somwhere else. Note that this tag
only appears in these two files. No other file does have it. It's not
useful for anything this way.
Change-Id: I7e0dcf0594fb59b396b1fd26b13383d59227b3f9
Documenting protected members as protected members is not really helpful.
One can see this by looking at the code.
Same for documenting a variable named "$html…" as "HTML". This does not
add anything.
Change-Id: I72364b6857166d77b9c85aa884cd139dc163c6bb
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.LicenseComment.InvalidLicenseTag
The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment
Change-Id: Ia8000677263c4150d4900526bcba1c0602664b8e
Renders formulae via mathoid without to run mathoid as a service.
Mathoid 0.7.1 or later must be installed locally and configured to be
accessed directly from the math extension. It has been tested with the
config.dev.yaml of version 0.7.1. If mathoid is installed in
'/srv/mathoid' the following line might be added to LocalSettings.php
$wgMathoidCli = ['/srv/mathoid/cli.js', '-c', '/srv/mathoid/config.dev.yaml'];
i.e., make sure to specify the -c parameter with an absolute path.
In addition mathoid uses more memory than the the default. With
the config.dev.yaml a value of
$wgMaxShellMemory = 2097152;
has been tested to work well.
Change-Id: I0600f056d21927963267cf979d342e313419e9fa
Phpunit now checks if the coverage annotations are reasonable.
This fix corrects unresolvable references in phpunit covers annotations.
Change-Id: I7eba10bd7dc445b175df750465bb80bd5ef0f4c6
The following sniffs are failing and were disabled:
* MediaWiki.Files.ClassMatchesFilename.NotMatch
* MediaWiki.Files.ClassMatchesFilename.WrongCase
* MediaWiki.Files.OneClassPerFile.MultipleFound
Change-Id: Ia2c06ebe33acefdf03625d86d98bf0dbaf826c4c
Display error message in the UI,
if the check command passes,
but the mml/svg/complete endpoints returns an valid json error.
Bug: T143225
Change-Id: I50776926e42f75a2c1e30fc9afe08baae3fcdbd1
The test is broken on beta cluster because the formula is rendered as
meta tag. It is rendered at img tag on my mediawiki-vagrant virtual
machine. The test now works on both environments.
Bug: T128190
Change-Id: I458d618af24533d104fcac25a8d8c6468b14605a
selenium* jobs are a new way of running Ruby based Selenium tests. The
jobs are triggered daily.
Bug: T128190
Change-Id: Ide349ea15e0c38ff9f61d348abd61cd2349a83f6
It was reported that under certain circumstances a semicolon was
missing from the SVG style.
Bug: T132563
Change-Id: I148433657848fdc74889fcaf6d883078c46a4006
Diffs should show the rendered output as well as the TeX source,
so changes that do not affect the output noticably can still be
assessed by looking at the diff.
Bug: T125712
Change-Id: I098d30ea3158ec34723bfca313cf2bcc4cbc591f
When user is logged in, visual editor is the default editor. When user
is not logged in, source editor is the default editor. When the test
does not log in, everything works just fine.
Bug: T126463
Change-Id: I1f15000a275657c0a92172781f57c5d1db537dcc
The problems was that visual editor is the default editor at
en.wikipedia.beta.wmflabs.org, and the test was expecting source editor.
The test now works also locally, using mediawiki-vagrant.
Removed headers from some files. We no longer use those headers.
Removed cucumber tags we no longer use, mostly internet explorer.
Added missing dependency (rake) to gemfile.
Bug: T126463
Change-Id: Ia5809f40719a2fe0c6c94338072a38765fa5c87b
* Add support for LaTeX package mhchem.
* Add hook <ce>
* Add format <math chem>
See bug description for the details.
Bug: T98306
Change-Id: I2ab80834edc5d071618bc52f133cfb2b7ece5016
This fixes some warnings in my PHPStorm, gets rid
of duplicate code, inlines constants that do not
make the code easier to read, and more.
Change-Id: I02f446491509043f5d3e51e26e932f76c9ecb6cf
This change implements all components to use the datatype 'Math' in Wikidata.
Because 'String 'is used as value type, only the Formatter and Validator are needed to be implemended.
The components are:
* hooks
* Formatter class
* Validator class
* Test cases
Bug: T67397
Change-Id: Ic64fd6c8560f48052e2db24ae1f013d48a82b5e9
The simple math test failed to find the edit link on a non existent
page. It was looking for the text 'Create source' from Vector which is
now simply 'Create'.
Change the PageObject selector to use a CSS selector, more robust to
text changes.
Change-Id: Ifcbd07da8e343b5697fcff6af6ffac90ff4d6420
* This will increase the performance of tex rendering for all
rendering modes since no shell access is required anymore.
Merge with caution. If the connection to restbase fails, rendering
of new formulae will be completely disabled i.e. broken.
Change-Id: I1982612e8c6a356e3dbdf447724ac82e5968cc77
This change only connects the restbase and the mathinput interfaces
but does not change any functionality.
Change-Id: I3a23e5008c26c5f14ad842dcb5d22906a8aff33c
Tex validation should be skipped if checking is disabled.
Consequently if 'disable tex filter' is set to 'never' it's a double
negation and tex should always be checked.
If 'disable tex filter' is set to always, never check tex.
Change-Id: Ic6fda8016838eae03a0ed36e3d8d4f35423ba8b1
* Use string constants instead of integers
* Derive new names from old via conversion of constant
naming convention to CamelCase.
* Replace old constant string e.g. 'MW_MATH_ABC_DEF'
with new string 'abcDef'
* Replace old constant value with new string.
* Tests to demonstrates what is actually done.
* Rename constants
Bug: T106630
Bug: T106631
Bug: T87941
Change-Id: I6d1094ece79e912d9ddbef6681a25196c7a6e801
* MathDebug was intended to provide advanced debugging functionality
for the math extension. However, the interesting debugging and
logging feature never made it from the debug branch to the master.
* The current debug functionality is mostly useless. Only some values
are written to memory and never used thereafter.
* This change moves the existing functionality to the MathSearch
extension and introduced the required hook for that.
Details:
* $wgMathDebug is removed
* A new Hook MathRenderingResultRetrieved is created
* The math rendering object is printed to the svg error
page if wgDebugComments is active (instead of wgMathDebug)
Change-Id: I6fad69b5d9b9ca8a7d12c7e410d3ae6180fbddbf
The integration tests depend on the presence of external servers
and the user settings.
First, people are bothered by failing test due to problems with
those servers and second, administrators need to run phpunit tests
to verify the configuration settings.
Therefore, we move the integration tests to a special page.
Bug: T87389
Change-Id: If66f13fe7fa16868cd4b1d8f0e0a6e3d49448b27
MathCoverageTest::testProvider -> MathCoverageTest::provideCoverage
'test*' reserved for PHPUnit tests and have to make assertions.
Change-Id: If46684eb27a2282b4cd6261bd0a19dba9bc20e27
* Handle-error-first approach for consistent function body
termination at the root with the main intend, and less indention.
* __DIR__ instead of dirname( __FILE__ )
* Single quotes.
* Correct pickHost documentation: wgMathMathMLUrl is not an array,
and is not used in this method, that's at a different level
of abstraction (via the constructor).
* White spacing.
* require_once is not a function.
Change-Id: Id4bec8415893245e2569a39ab5406a0820238ae4
In the most recent version of ubuntu14 the outputhash of the
png images for some math objects has changed.
However, the rendered images seem to look ok.
Bug: T86309
Change-Id: I52dbdefdcfa19c10f1d9d1a43369aabe8bfd92bf
A recent change in mathoid, i.e.
I8d3cec0ee8a8c9368b7dca89e1d5e0c5683f946c
removed the margins. This causes breaking unit tests.
Change-Id: I312d6226c6f24c84254b99ee6292564a421133c3
Add new option to filter only new input.
Now the complete list of possible settings is:
MW_MATH_CHECK_ALWAYS backwards compatible to false
MW_MATH_CHECK_NEVER backwards compatible to true
MW_MATH_CHECK_NEW new option
Change-Id: I455b41c8b8d918f4c34f6c115194d227a8394e0a