EpiDoc / EFES

EFES (EpiDoc Front End Services) is a custom and readily customizable platform for publication and search/indexing of EpiDoc files, based on the Kiln platform
Apache License 2.0
31 stars 38 forks source link

Test suite for EpiDoc XSLT #19

Closed gabrielbodard closed 5 years ago

ajenhl commented 7 years ago

r2658 in the Epidoc SVN repository provides a start for this.

ajenhl commented 7 years ago

The current script has one significant issue: speed. It calls out to the OS to run the Saxon XSLT processor for each transformation, which incurs the cost of starting up the JVM each time. Hugh Cayless has noted that he knows some potential workarounds for this issue. I intend to refactor the script so that it performs multiple transformations at once, which should improve matters. If and as the test suite grows, this will need dealing with; currently it's not a particular impediment.

Thomas Elliott requested that the scripts be written for Python 3.6. My development environment currently uses 3.5 (and 3.6 is only six months old at this point), and makes use of nothing that is changed or removed in 3.6. There is a question about encoding of paths on Windows, that has changed in 3.6, but it appears that that only involves using bytes for file paths, which the scripts do not.

ajenhl commented 7 years ago

r2660 in the Epidoc SVN repository provides the aforementioned refactoring of the test script to perform multiple XSLT transformations at once, greatly improving the speed of the test.

Currently this test checks only the full HTML output for the supported edition structures, using default values for every other parameter.

gabrielbodard commented 6 years ago

@ajenhl: how is this test suite currently used/accessed by developers? Is this process documented? It wasn't discussed in either of the EFES workshops, so I very much doubt it's being used or even known about by any EpiDoc users. Is there therefore a documentation step to complete on this task, or can we close the ticket as done?

ajenhl commented 6 years ago

The tests directory of the EpiDoc XSLT repository contains a README that specifies the requirements (Python 3 and Saxon) and how to run the tests. The tests are really only useful for EpiDoc XSLT developers, since the tests operate on those XSLT and in EFES, all customisations should be done outside of that. That's the standard Kiln model - stylesheets/ is the entrypoint that imports and provides overrides for material in kiln/stylesheets/.

If you think the existence of the tests should be made more widely known, we could mention it in the wiki (though quite where it would fit, I don't know):

The EpiDoc XSLT responsible for converting EpiDoc XML into HTML comes with a set of tests (in webapps/ROOT/kiln/stylesheets/epidoc/tests/) that can be used as an exemplar or basis for creating your own tests if you wish to modify the behaviour of those XSLT through extension.

Is that the sort of thing you're thinking of?

gabrielbodard commented 5 years ago

Test suite was deployed to EpiDoc Stylesheets repo, and is now in the hands of the EpiDoc Action Group to improve and deploy further. Closing ticket.