Skip to content
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

DocX tests break every time the Stylesheets version changes #646

Closed
raffazizzi opened this issue Nov 16, 2023 · 3 comments
Closed

DocX tests break every time the Stylesheets version changes #646

raffazizzi opened this issue Nov 16, 2023 · 3 comments
Assignees
Labels
status: Go Council has decided the ticket should proceed.

Comments

@raffazizzi
Copy link
Contributor

This issue only arises around release time, which makes it rare, but problematic if not documented as part of the release process. We should see whether it can be avoided.

The Stylesheets version gets baked into the expected results for docx transformations, so tests fail when the version is changed. This affects several files in Test and Test2, but it's always in the <appInfo>. One example is /Test2/testDocxIndexes1.xml:

<encodingDesc>
         <appInfo>
            <application xml:id="docxtotei" ident="TEI_fromDOCX" version="7.57.0a">
               <label>DOCX to TEI</label>
            </application>
         </appInfo>
      </encodingDesc>
@sydb
Copy link
Member

sydb commented Nov 17, 2023

[Here I am just excerpting a portion of the Slack discussion of earlier today, cleaning up and improving it a bit.]

In Test2/ we should be able to just update the "cleanForDiff" target [which is in Test2/build_utilities.xml] to knock that @version out, I think.

In Test/ I think (but am not sure) we just add it to Test/cleanup.pl. (Although I am not sure if there is any rhyme nor reason [in the Test/Makefile] for when cleanup.pl is run vs when it is not. But supposedly we could add it to any test runs that do not have it but need to ignore that attr.)


That Perl routine (Test/cleanup.pl) does not do any actual XML parsing, of course, it just does regular-expression find-and-replace. Of the 7 changes it currently makes, 6 of them (I claim) are actually best handled as they currently are: regex find-and-replace. But the 1st one of those, and this new one about @version, would be better handled with a true XML-based routine. Not at all sure it is worth the bother, though. After all, the files being processed are not hand-encoded, but rather are machine-generated, and thus completely predictable.

@trishaoconnor trishaoconnor self-assigned this Nov 20, 2023
@sydb sydb added the target: build Concerning the build process, e.g. the Makefile or build.xml label Nov 20, 2023
@trishaoconnor trishaoconnor added this to the Release 7.57.0 milestone Nov 20, 2023
@trishaoconnor trishaoconnor added status: Go Council has decided the ticket should proceed. and removed resp: council target: build Concerning the build process, e.g. the Makefile or build.xml labels Nov 20, 2023
@sydb
Copy link
Member

sydb commented Nov 29, 2023

See PR #650.

@sydb
Copy link
Member

sydb commented Nov 25, 2024

@raffazizzi — now that #650 is merged, can we close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: Go Council has decided the ticket should proceed.
Projects
None yet
Development

No branches or pull requests

5 participants