[LyX/master] Merge branch 'features/indexmacros'
Scott Kostyshak
skostysh at lyx.org
Sat Dec 24 02:49:16 UTC 2022
On Fri, Dec 23, 2022 at 01:00:59AM +0100, Thibaut Cuvelier wrote:
> On Mon, 21 Nov 2022 at 08:56, Kornel Benko <kornel at lyx.org> wrote:
>
> > Am Sun, 20 Nov 2022 15:23:58 -0500
> > schrieb Scott Kostyshak <skostysh at lyx.org>:
> >
> > > On Sun, Nov 20, 2022 at 08:24:41PM +0100, Thibaut Cuvelier wrote:
> > > > On Sun, 20 Nov 2022 at 16:47, Scott Kostyshak <skostysh at lyx.org>
> > wrote:
> > > >
> > > > > On Sun, Nov 20, 2022 at 04:33:36PM +0100, Thibaut Cuvelier wrote:
> > > > > > > When I open the exported de Math.xhtml in Chromium, I get:
> > > > > > >
> > > > > > > "error on line 7159 at column 22: Entity 'imaginary' not
> > defined"
> > > > > > >
> > > > > >
> > > > > > That's unrelated to this branch, it was a problem in the MathML
> > > > > > configuration.
> > > > >
> > > > > Ah, I was wondering why xmllint didn't catch it but I guess it
> > doesn't
> > > > > catch MathML issues. Probably there is a way to catch them in the
> > > > > ctests, but I don't know if we want to make our ctests more strict.
> > If
> > > > > we make them more strict, I will bug you more about test failures :)
> > > > >
> > > >
> > > > xmllint is probably not the best tool for (X)HTML, it just validates
> > XML
> > > > syntax (HTML is not necessarily XML, but what LyX generates is; there
> > are
> > > > many constraints that xmllint doesn't know about).
> > > >
> > > > There are many tools to validate HTML as command-line utilities, but
> > most
> > > > of them are in JavaScript; maybe http://www.html-tidy.org/ could be
> > > > included as a test dependency? It should be more or less easy to
> > integrate,
> > > > as it's just C buildable with CMake and no dependency.
> > >
> > > I would be happy to help incorporate that if Kornel does not object (he
> > > knows the most about the ctest framework).
> >
> > Not objecting.
> >
> > > Let's first figure out whether we want the checks in the ctests though.
> > > I think a good rule of thumb is: if a test starts to fail (i.e., suppose
> > > the test with this stricter check used to pass, but some commit that
> > > affects XML output causes the test to fail), will you give priority to
> > > either quickly fixing things so that the test passes, or reverting the
> > > commits that caused the tests to fail? If yes, then they are a good
> > > candidate to be included in the ctests.
> > >
> > > If not, probably it is better for you to use the tool locally on your
> > > side. I can help figure out a script for this as well. For example, it
> > > could just loop through all the .lyx files in the repository, export
> > > with xhtml, and check which files pass the stricter test. It would be
> > > easy to set up an ignore list, etc. Or we could put the script in
> > > https://gitlab.com/scottkosty/lyx-tester which has various scripts for
> > > testing.
> > >
> > > Let me know what sounds best.
> > >
> > > Scott
> >
> > +1
> >
>
> Here is a patch that adds a script that validates every export LyX test
> case.
Nice, I like it!
> It's not fast to run, approximately 10 minutes (roughly 200 calls to
> LyX to get the HTML files, then 200 calls to the JVM for validation -- each
> time starting from scratch). The slowest part seems to be LyX, though, so
> that batching the calls to the validator will not drastically cut the run
> times (maybe 30%).
>
> The results are excellent: all files are valid with the current master :D!
> Running the script every so often would keep it that way.
That's great!
I suggest you run the tests locally every now and then, and then after
2.4.0 release we figure out how to get them into the main ctest
framework as long as others agree. It's fine that they're slow. As long
as we can easily choose to not run them (e.g., with the ctest regexes),
in my opinion it's no problem. Would this plan work for you?
> To make its output easier to understand, do you know if there is a way to
> remove these messages from LyX when it runs in CLI?
>
> Warning: Document class not available
> ----------------------------------------
> The selected document class
> Springer Monographs (svmono)
> requires external files that are not available.
> The document class can still be used, but the
> document cannot be compiled until the following
> prerequisites are installed:
> svmono.cls
> See section 3.1.2.2 (Class Availability) of the
> User's Guide for more information.
I don't know.
Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20221223/e830cc9f/attachment.asc>
More information about the lyx-devel
mailing list