Last modified: 2013-09-07 07:22:51 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T45222, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43222 - Review LaTeXML branch of Extension:Math for deployment
Review LaTeXML branch of Extension:Math for deployment
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Math (Other open bugs)
master
All All
: High normal with 2 votes (vote)
: ---
Assigned To: Matthew Flaschen
:
Depends on:
Blocks: 31235
  Show dependency treegraph
 
Reported: 2012-12-18 08:18 UTC by Ori Livneh
Modified: 2013-09-07 07:22 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Math parser tests on patch set 21 (5.56 KB, text/plain)
2013-02-07 00:14 UTC, Matthew Flaschen
Details
Math parser tests on patch set 20 (1.98 KB, text/plain)
2013-02-08 05:24 UTC, Matthew Flaschen
Details
mylyn/context/zip (1.01 KB, application/octet-stream)
2013-05-10 10:37 UTC, physikerwelt
Details

Description Ori Livneh 2012-12-18 08:18:12 UTC
"<physikerwelt> Hi, I have created a new version of the Math extension that allows displaying mathml using the latexml converter instead of rendered images. Furthermore I have created a test wiki that contains all pages of the English Wikipedia Project that contain math. Now Iā€™d be interested to test this feature inside the Wikimedia framework. Do you have a proposal how to do that."

See https://gerrit.wikimedia.org/r/gitweb?p=mediawiki%2Fextensions%2FMath.git;a=shortlog;h=refs%2Fheads%2FLaTeXML
Comment 1 Ori Livneh 2012-12-18 08:22:19 UTC
Part of the change is already under review: https://gerrit.wikimedia.org/r/#/c/30177/.
Comment 2 Ori Livneh 2012-12-18 08:34:43 UTC
The author wrote a paper about this change, "Making Math Searchable in Wikipedia":  http://wiki.physikerwelt.de/images/text_math_search.pdf
Comment 3 physikerwelt 2012-12-21 15:19:11 UTC
See also 
http://www.mediawiki.org/wiki/Extension:Math/Roadmap
Comment 4 Matthew Flaschen 2013-02-07 00:14:01 UTC
Created attachment 11739 [details]
Math parser tests on patch set 21

This attachment is the result of running:

php tests/parserTests.php --file=extensions/Math/mathParserTests.txt > mathParserPatchSet21.txt 2>&1

on patch set 21 of https://gerrit.wikimedia.org/r/#/c/30177/ in my Vagrant install.
Comment 5 Ori Livneh 2013-02-08 04:37:49 UTC
All tests pass! With the installation of 'texlive-lang-greek' and 'texlive-fonts-recommended', I was able to get 12/13 tests to pass. The remaining test failure was due to the srset attribute getting added to img tags, so I updated the expected output.

I documented the dependencies in README.
Comment 6 Ori Livneh 2013-02-08 04:41:52 UTC
Merged. Thanks very much physikerwelt for your patience and fixes and thanks Matt for the reviews. This is now in the deployment queue.
Comment 7 Matthew Flaschen 2013-02-08 05:16:50 UTC
What about the nullLockManager I asked about?

I'm not totally comfortable with the change from nullLockManager to fsLockManager (https://gerrit.wikimedia.org/r/#/c/30177/20..24/MathTexvc.php).

In theory it should be okay on the WMF cluster, since it looks like it only applies if wgMathFileBackend is not set.

In mediawiki-config, there is:

$wgMathFileBackend = $wmgMathFileBackend;

in CommonSettings.php

and:

'wmgMathFileBackend' => array(
	'default' => 'global-multiwrite'
),

in LocalSetting.php.

However, it could affect other installations.
Comment 8 Matthew Flaschen 2013-02-08 05:24:13 UTC
Created attachment 11755 [details]
Math parser tests on patch set 20

This is for background on the lock manager discussion.
Comment 9 Matthew Flaschen 2013-02-08 05:38:51 UTC
There's a thread on this on wikitech-l under "NullLockManager and the math extension"
Comment 10 MZMcBride 2013-02-08 17:46:28 UTC
(In reply to comment #9)
> There's a thread on this on wikitech-l under "NullLockManager and the math
> extension"

http://lists.wikimedia.org/pipermail/wikitech-l/2013-February/066265.html
Comment 11 Matthew Flaschen 2013-02-10 04:56:01 UTC
Reopening.  One commit was merged, but there's still the branch at https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/Math.git;a=shortlog;h=refs/heads/LaTeXML
Comment 12 Matthew Flaschen 2013-02-13 22:52:47 UTC
I've recommended that physikerwelt squash some of the commits on the branch, so there won't be quite so many to review.
Comment 13 physikerwelt 2013-02-14 16:48:44 UTC
Thanks a lot Matthew. I want to do some meaningful unit tests for the module. I would be quite happy if you could provide some input for that task. Is there a general stategy at the WMF to structured tests. In the end we should come up with a mutually orthogonal set of tests, some integration tests in addition and furthermore tests that check for the expected bugs.
Thus I'd be happy to collect a list of required test at 
http://www.mediawiki.org/wiki/Extension:Math/Roadmap
After that the time is ready for merge.
Comment 14 Matthew Flaschen 2013-02-14 22:37:29 UTC
Generally we have parser tests, which you've already seen, PHPUnit tests (can be used for unit or integration tests on server), QUnit (JavaScript unit tests), and Cucumber for integration tests (testing the overall user experience through the web browser).

Probably, PHPUnit would be most important for your stuff, but if you want to add some QUnit or Cucumber, that would be a bonus, particularly for the MathJax stuff.

See https://www.mediawiki.org/wiki/PHPUnit, https://www.mediawiki.org/wiki/QUnit and https://www.mediawiki.org/wiki/Cucumber

I've done a lot of QUnit here, and some PHPUnit, so I can definitely help with those.  I'm working on a Cucumber test right now, but I haven't committed anything yet.
Comment 15 physikerwelt 2013-02-16 21:26:18 UTC
(In reply to comment #14)
Thanks for these hints. However I was aware of the technical aspects.
Maybe to be more precise. Is there a prototpe extension that comes up with good unit tests. Especially the database stuff is something that is not trival to test.


> Generally we have parser tests, which you've already seen, PHPUnit tests (can
> be used for unit or integration tests on server), QUnit (JavaScript unit
> tests), and Cucumber for integration tests (testing the overall user
> experience
> through the web browser).
> 
> Probably, PHPUnit would be most important for your stuff, but if you want to
> add some QUnit or Cucumber, that would be a bonus, particularly for the
> MathJax
> stuff.
> 
> See https://www.mediawiki.org/wiki/PHPUnit,
> https://www.mediawiki.org/wiki/QUnit and
> https://www.mediawiki.org/wiki/Cucumber
> 
> I've done a lot of QUnit here, and some PHPUnit, so I can definitely help
> with
> those.  I'm working on a Cucumber test right now, but I haven't committed
> anything yet.
Comment 16 Matthew Flaschen 2013-02-16 22:15:25 UTC
(In reply to comment #15)
> (In reply to comment #14)
> Thanks for these hints. However I was aware of the technical aspects.
> Maybe to be more precise. Is there a prototpe extension that comes up with
> good
> unit tests. Especially the database stuff is something that is not trival to
> test.


There probably are extensions with good database tests, but I can't pinpoint one offhand.  However, if you go into the test directory of MediaWiki core, you can do:

git grep db

That will give you an indication of how databases are used for core tests.  Extension tests generally subclass the same class, MediaWikiTestCase, which provides some of the database functionality you'll need.
Comment 17 physikerwelt 2013-02-17 12:16:33 UTC
Thanks.
I tried to figure out how to set up the database tables for testing. As far as I did understand there must be a way to clone the table structure with a prefix.
However if I tied to do this, I get a warning the table "_prefix_math" does already exist.
See
https://gerrit.wikimedia.org/r/#/c/49477/1/tests/MathRendererTest.php
Comment 18 physikerwelt 2013-02-17 19:44:03 UTC
Unfortunately there are some bugs in the master version. Is there a way to get them fixed faster than the via the normal review process.
See https://gerrit.wikimedia.org/r/#/q/status:open+project:mediawiki/extensions/Math,n,z
Comment 19 physikerwelt 2013-04-19 14:57:17 UTC
It would be grate to be able to test LaTeXML in the context of the WMF.
see
https://wikitech.wikimedia.org/wiki/New_Project_Request/Math

I think it is very important to do tests there before committing something to the main branch.
Comment 20 Matthew Flaschen 2013-04-19 22:01:50 UTC
I pinged the Wikimedia Labs mailing list (https://lists.wikimedia.org/mailman/listinfo/labs-l), and Daniel Zahn created it.
Comment 21 physikerwelt 2013-05-10 10:37:32 UTC
This is now adressed by
Comment 22 physikerwelt 2013-05-10 10:37:37 UTC
Created attachment 12290 [details]
mylyn/context/zip
Comment 23 physikerwelt 2013-05-10 10:40:34 UTC
(In reply to comment #21)
Sorry wrong link:
This is now adressed by
https://gerrit.wikimedia.org/r/#/c/61987/
Comment 24 Andre Klapper 2013-07-25 09:28:35 UTC
(In reply to comment #23 by physikerwelt)
> This is now adressed by
> https://gerrit.wikimedia.org/r/#/c/61987/

Patch merged on 2013-05-26. What's the next steps?
Comment 25 physikerwelt 2013-07-25 09:58:02 UTC
Since mathml is not supported by manny browseres
This change is also important to reach a wide audience
https://gerrit.wikimedia.org/r/#/c/69298/
Comment 26 Matthew Flaschen 2013-07-26 04:02:36 UTC
There is still an open LaTeXML branch (https://git.wikimedia.org/log/mediawiki%2Fextensions%2FMath.git/refs%2Fheads%2FLaTeXML), with recent commits

However, I'm not sure if this bug is still helpful.  Commits to master are being reviewed on a case-by-case basis.
Comment 27 physikerwelt 2013-09-06 17:31:39 UTC
Since LaTeXML is merged and there are some users that use it actively this bug can be closed. Unfortunately I can not do that;-)

To avoid confusion I deleted the LaTeXML branch and renamed it to dev.

Just as information: The next step towards MathML are the deployment of the LaTeXML package. operations/debs/latexml
Comment 28 Matthew Flaschen 2013-09-07 07:22:51 UTC
Marked fixed. :)

Do you have editbugs yet?  If not, you can ask on IRC for someone to give it to you.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links