Capitains / HookTest

Testing script for Hook
Mozilla Public License 2.0
3 stars 3 forks source link

Don't know how to interpret failed tests #158

Closed mlampert84 closed 5 months ago

mlampert84 commented 5 months ago

Probably a beginner question here, but I haven't been able to figure it out: I get a number of error messages that I do not understand. Here the Failed Test "Available in inventory":

$ hooktest ./ --console --verbose 10 --scheme epidoc 
>>> Starting tests !
>>> Files to test : 4
..
All Metadata Files Passed
XX
+-----------------------------+---------+------------------------+
|          Identifier         |  Nodes  |      Failed Tests      |
+-----------------------------+---------+------------------------+
| tlg0057.tlg057.cmg-deu1.xml | 1;6;126 | Available in inventory |
+-----------------------------+---------+------------------------+
| tlg0057.tlg057.cmg-grc1.xml | 1;6;126 | Available in inventory |
+-----------------------------+---------+------------------------+

And here a number of other Failed Tests:

$ hooktest ./ --console --verbose 10 
>>> Starting tests !
>>> Files to test : 4
..
All Metadata Files Passed
XX
+-----------------------------+---------+----------------------------+
|          Identifier         |  Nodes  |        Failed Tests        |
+-----------------------------+---------+----------------------------+
| tlg0057.tlg057.cmg-deu1.xml | 1;6;126 |      URN informations      |
|                             |         | Correct xml:lang attribute |
|                             |         |   Available in inventory   |
|                             |         |     Naming conventions     |
+-----------------------------+---------+----------------------------+
| tlg0057.tlg057.cmg-grc1.xml | 1;6;126 |      URN informations      |
|                             |         | Correct xml:lang attribute |
|                             |         |   Available in inventory   |
|                             |         |     Naming conventions     |
+-----------------------------+---------+----------------------------+

I cannot seem to match the "Nodes" to a problem in the .xml files (does this mean the 1st node in the xml, and then its 6th child, and then that nodes 126th child? or does it mean something else?).

Nor do I understand what these tests are testing and why they are failing. The original xml that are failing these tests are here. I am running the hooktest against the root of that repository.

PonteIneptique commented 5 months ago

Can you check it is not an issue with guidelines ? Can you run it with ----guidelines 2.epidoc ?

Le mer. 3 juil. 2024 à 13:20, Marcus Lampert @.***> a écrit :

Probably a beginner question here, but I haven't been able to figure it out: I get a number of error messages that I do not understand. Here the Failed Test "Available in inventory":

$ hooktest ./ --console --verbose 10 --scheme epidoc

Starting tests ! Files to test : 4 .. All Metadata Files Passed XX +-----------------------------+---------+------------------------+ | Identifier | Nodes | Failed Tests | +-----------------------------+---------+------------------------+ | tlg0057.tlg057.cmg-deu1.xml | 1;6;126 | Available in inventory | +-----------------------------+---------+------------------------+ | tlg0057.tlg057.cmg-grc1.xml | 1;6;126 | Available in inventory | +-----------------------------+---------+------------------------+

And here a number of other Failed Tests:

$ hooktest ./ --console --verbose 10

Starting tests ! Files to test : 4 .. All Metadata Files Passed XX +-----------------------------+---------+----------------------------+ | Identifier | Nodes | Failed Tests | +-----------------------------+---------+----------------------------+ | tlg0057.tlg057.cmg-deu1.xml | 1;6;126 | URN informations | | | | Correct xml:lang attribute | | | | Available in inventory | | | | Naming conventions | +-----------------------------+---------+----------------------------+ | tlg0057.tlg057.cmg-grc1.xml | 1;6;126 | URN informations | | | | Correct xml:lang attribute | | | | Available in inventory | | | | Naming conventions | +-----------------------------+---------+----------------------------+

I cannot seem to match the "Nodes" to a problem in the .xml files (does this mean the 1st node in the xml, and then its 6th child, and then that nodes 126th child? or does it mean something else?).

Nor do I understand what these tests are testing and why they are failing. The original xml that are failing these tests are here https://github.com/telota/galen/tree/main/data/tlg0057/tlg057. I am running the hooktest against the root of that repository.

— Reply to this email directly, view it on GitHub https://github.com/Capitains/HookTest/issues/158, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOXEZXUC67S3DHPEQ6UCNTZKPNBLAVCNFSM6AAAAABKJLQ5SSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM4DQMZXGM2TKNA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

mlampert84 commented 5 months ago

Both $ hooktest ./ --console --verbose 10 --scheme epidoc --guidelines 2.epidoc and $ hooktest ./ --console --verbose 10 --guidelines 2.epidoc give the Available in inventory as Failed Tests

I don't have an idea of where the Failed Tests that are listed (i.e. Available in inventory, Correct xml:lang attribute, URN informations, Naming conventions) come from, where they are defined.

PonteIneptique commented 5 months ago

Ok, from what I see in your document, your document seem formed following the Capitains Epidoc guidelines. Hence not having the xml:lang, URN informations or naming conventions errors.

As a result, Naming conventions fails because naming convention relies on the URN value.

Available in the inventory means your file was not described within a __cts__.xml file.

You XML file gives urn:cts:greekLit:tlg0057.tlg057.cmg-grc and not grc1, same for deu vs deu1 :)

https://github.com/telota/galen/blob/cf168cb6d2182d9e1bc9683e635778acee3e3b48/data/tlg0057/tlg057/__cts__.xml#L3C20-L3C59

https://github.com/telota/galen/blob/cf168cb6d2182d9e1bc9683e635778acee3e3b48/data/tlg0057/tlg057/tlg0057.tlg057.cmg-grc1.xml#L106

mlampert84 commented 5 months ago

Thank you very much for investigating. I can confirm that when I use the correct grc1 filename in the __cts__.xml file, the Available in Inventory error goes away, so that hooktest ./ --console --verbose 10 --scheme epidoc has no more failed tests.

I still don't understand the other errors. After reading the guidelines (http://capitains.org/pages/guidelines#urn-information) the .xml files do have the urn and the xml:lang attributes in xpath TEI/text/body/div[@type="edition"], so I do not understand why the XML:lang attribute and the URN Informations tests are failing.

PonteIneptique commented 5 months ago

They are failing under TEI scheme (when you do not specify --scheme epidoc), which is normal, as you are using the epidoc encoding :)

mlampert84 commented 5 months ago

Okay, now I understand. Thank you very much for your patience and your help! Indeed, we are using as <?xml-model> the schema https://raw.githubusercontent.com/PatristicTextArchive/Schema/master/tei-pta.rng, which relies on the TEI scheme. I suppose the question for our project is which one we want to use, i.e. our TEI extension or epidoc, and if it is possible to use both without one failing, etc. But that is now our problem. Thanks again!