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

Regression in schematron improvements for references (#795) #819

Closed
jordanpadams opened this issue Oct 18, 2024 · 0 comments Β· Fixed by #828
Closed

Regression in schematron improvements for references (#795) #819

jordanpadams opened this issue Oct 18, 2024 · 0 comments Β· Fixed by #828

Comments

@jordanpadams
Copy link
Member

jordanpadams commented Oct 18, 2024

Checked for duplicates

Yes - I've already checked

πŸ› Describe the bug

When I did tried testing #795 action, I noticed the expected outcomes do not occur when running with the schema/schematron generated from lddtool -p

πŸ•΅οΈ Expected behavior

I expected the schema/schematron produced would match that included in the repo.

When

πŸ“œ To Reproduce

$ lddtool -p
...

$ validate --target model-lddtool/src/test/resources/github795/bundle.xml -S export/PDS4_PDS_1N00.sch -x export/PDS4_PDS_1N00.xsd
...
  PASS: file:/Users/jpadams/proj/pds/pdsen/workspace/pds4-information-model/model-lddtool/src/test/resources/github795/bundle.xml
        1 product validation(s) completed
...

When I execute this with the schema/schematron generated and manually delivered to @rchenatjpl, it validates as expected:

$ validate --target model-lddtool/src/test/resources/github795/bundle.xml -S model-lddtool/src/test/resources/github795/xml_schema/PDS4_PDS_1N00.sch -x model-lddtool/src/test/resources/github795/xml_schema/PDS4_PDS_1N00.xsd
...
  FAIL: file:/Users/jpadams/proj/pds/pdsen/workspace/pds4-information-model/model-lddtool/src/test/resources/github795/bundle.xml
      ERROR  [error.label.schematron]   line 86, 33: The attribute reference_type must be set to one of the following values 'bundle_to_target'.
        1 product validation(s) completed
...

More clearly, this applies to everything in that directory.

This is what I get from the current IM I generate from the repo.

$ validate --schema export/PDS4_PDS_*.xsd --schematron export/PDS4_PDS_*.sch --target model-lddtool/src/test/resources/github795/
...
Summary:

  10 product(s)
  2 error(s)
  0 warning(s)

  Product Validation Summary:
    8          product(s) passed
    2          product(s) failed
    0          product(s) skipped
    10         product(s) total

  Referential Integrity Check Summary:
    0          check(s) passed
    0          check(s) failed
    0          check(s) skipped
    0          check(s) total

  Message Types:
    1            error.label.schematron
    1            error.validation.internal_error

But this is what Richard got: https://github.com/NASA-PDS/pds4-information-model/blob/main/model-lddtool/src/test/resources/github795/00notes.txt

Summary:
  11 product(s)
  12 error(s)
  0 warning(s)
  Product Validation Summary:
    0          product(s) passed
    11         product(s) failed
    0          product(s) skipped
    11         product(s) total
  Referential Integrity Check Summary:
    11         check(s) passed
    0          check(s) failed
    0          check(s) skipped
    11         check(s) total
  Message Types:
    11           error.label.schematron
    1            error.validation.internal_error
End of Report
Completed execution in 3977 ms

πŸ–₯ Environment Info

πŸ“š Version of Software Used

main as of today

🩺 Test Data / Additional context

model-lddtool/src/test/resources/github795/ on rchenatjpl-patch-1 branch.

Data is more specifically here: https://github.com/NASA-PDS/pds4-information-model/tree/main/model-lddtool/src/test/resources/github795

πŸ¦„ Related requirements

πŸ¦„ #795

βš™οΈ Engineering Details

@jshughes it looks like you send over some schema/schematrons that include the necessary rules to check for these reference_types, but those same things are not included when I run lddtool -p. Not sure what is going on there.

πŸŽ‰ Integration & Test

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment