-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testing Suite for PGF/TikZ? #666
Comments
I'm going to look at extending |
Over SciPy we are also dealing with a manual of 2500 pages. I've seen that you have been playing around with github pages. I am pretty positive about having an online manual together with the pdf version instead. Sphinx can be used to define the rulesets for generation of the manual. Actually it would make things much much easier for everyone one in 2019 if there is an online source instead. We basically have negligible users downloading the pdf out of 50k nonunique visits per week. |
Thank you for offering your support Ilhan. There is already some continuous integration running on Travis CI, see Currently the “tests” are limited to building the manual with various different engines, apart from On top of the tests there is continuous deployment for every commit to In the future, with Joseph's help I hope to get regressions testing working. To this end I want to write (and already have partly written) a parser for the manual that extracts all |
I must be blind. I don't know how I missed the CI part. Sorry about that. The manual parsing can be left to the doc generation tools such as Sphinx. Basically this is kind of a solved problem now (making it work is a different story of course). You basically define what your rubric structure looks like and it basically parses them. I know TeX world doesn't want to deal with other pieces of software but Python can parse these blocks quite quickly, it can even do it once and can check for only the changed parts etc. I think this part of the development is too modern for anything related to TeX. Something we like to have is parsing pieces in parallel that increases the compile speed on Travis. But that's a decision for devs to make so a passing suggestion. But yes, vtex, thistex, thattex obscurity problem is something I always tend to forget in TeX world. So anyways if I can be of use please ping me and let me know. Here is some description of a admittedly simpler setup http://www.sphinx-doc.org/en/master/latex.html |
I think the major challenge here, as for LaTeX itself, is getting tests written. I have the ones I've done for |
@hmenke Perhaps I should try making the change in |
@josephwright what is the assertion syntax for the tests ? Writing small TeX documents and running them one by one and error out if desired \neq actual? |
@ilayn It's not as easy as just checking whether to code compiles. You have to check whether the resulting image still looks the same. For that you could diff the output of |
There are many options on that front including comparing instructions on the system layer. At some point you have to trust upstream mechanism which doesn't change very often. For image comparison you can do what matplotlib or any other plotting lib does, say, https://matplotlib.org/3.1.1/devel/testing.html#writing-an-image-comparison-test But comparing at system layer seems pretty robust to me. Also pgfkeys and pgfmath can be tested pretty throughly just by comparing the results and macro testing. The most boring part of testing is writing the tests and once it is in, it takes care most of the issues before it happens. We can ask the community to help us writing the tests. I think code coverage is not really that useful since it is a dummy metric and the tools are not that reliable. We already gave up paying attention to it over SciPy. Note that the testing tools don't need to be written in TeX only the compilation of the test snippets require TeX. |
@hmenke If requiring LuaTeX is an option, one approach would be to do as much possible in Lua, and have the TeX macros be thin wrappers around Lua function calls. Then the Lua could be tested normally. |
Hi this is percusse-on-TeX-SX speaking
First Welcome to and thanks for switching to here. I have some PRs from old times (some are couple of years old). I'd like to see if they are still useful and I'd be really happy to get rid of them but I can't see any CI jobs running somewhere.
Are there any plans for it? I can help set it up if needed or maybe contribute some tests. We can at least start making a job for generating the manual just to give an example.
best,
The text was updated successfully, but these errors were encountered: