pkiraly / qa-catalogue

QA catalogue – a metadata quality assessment tool for library catalogue records (MARC, PICA)
GNU General Public License v3.0
82 stars 17 forks source link

Need help with Java build errors #503

Closed TobiasNx closed 3 months ago

TobiasNx commented 3 months ago

In my attempt to add new elements for a hbz catalogue somehow there were a couple of java tests that were failing. We could solve them and could understand the relation to the changes I added.

But one test and an error we do not understand

https://github.com/hbz/qa-catalogue/pull/1#issuecomment-2298942849

 Results :

Failed tests:   testPatternMatchingWithSubfield(de.gwdg.metadataqa.marc.analysis.bl.UseCaseTest): expected:<[110$e, 111$e, 100$e, 700$e, 710$e, 711$e, 720$e, 751$e, 752$e, 775$e, 788$e]> but was:<[100$e, 110$e, 111$e, 700$e, 710$e, 711$e, 720$e, 751$e, 752$e, 775$e, 788$e]>

Tests in error: 
  testListTag(de.gwdg.metadataqa.marc.utils.MarcTagListerTest): Cannot invoke "de.gwdg.metadataqa.marc.definition.structure.DataFieldDefinition.getTag()" because "definition" is null

Build here: https://github.com/hbz/qa-catalogue/actions/runs/10472986275/job/29003791025#step:4:16623

@pkiraly or @nichtich can you help us?

Ping @Phu2

pkiraly commented 3 months ago

@TobiasNx I am checking it.

The root of the second is that in de.gwdg.metadataqa.marc.definition.tags.hbztags.TagHOL and de.gwdg.metadataqa.marc.definition.tags.hbztags.TagMNG you missed cardinality flag from a particular subfield:

      "c", "Updated by subfield",

it should be

      "c", "Updated by subfield", "R",

or

      "c", "Updated by subfield", "NR",

This two errors prevents the initialization of these tags, and it causes another issue when we calculate the number of metadata elements. I do not know the root of other issue, but it can be easily fixed by changing the order of expected elements.

Here I send you a patch file with the necessary changes need-help-with-java-build-errors-503.txt

Plese check it. You can apply it with

git apply need-help-with-java-build-errors-503.txt

Note: In the patch I use "R" - supposing that it is repeatable subfield. Please adjust it if they aren't.

TobiasNx commented 3 months ago

Thanks