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

Content validation does not work properly #55

Closed
jordanpadams opened this issue Jul 23, 2019 · 0 comments
Closed

Content validation does not work properly #55

jordanpadams opened this issue Jul 23, 2019 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@jordanpadams
Copy link
Member

Describe the bug
Ever since ceb1dda it appears that content validation no longer works (at least for table data).

To Reproduce
Run validate with current version on attached XML (be sure to change filename to .xml instead of .xml.txt):

./validate-1.16.0-SNAPSHOT/bin/validate ladee_mission_bundle_SIP_4col_manifest_v1.0.xml

Expected behavior
Ran with validate-1.15.0 (last working version I was able to test was fa57004)

./validate-1.15.0/bin/validate ladee_mission_bundle_SIP_4col_manifest_v1.0.xml

Which gives the following output:

PDS Validate Tool Report

Configuration:
   Version                       1.15.0
   Date                          2019-07-23T19:55:43Z
   Core Schemas                  [PDS4_PDS_1C00.xsd]
   Core Schematrons              [PDS4_PDS_1C00.sch]
   Model Version                 1C00

Parameters:
   Targets                       [file:/Users/jpadams/Downloads/manifests_ladee_mission_bundle_20190717/ladee_mission_bundle_SIP_4col_manifest_v1.0.xml]
   Severity Level                WARNING
   Recurse Directories           true
   File Filters Used             [*.xml, *.XML]
   Force Mode                    off
   Data Content Validation       on
   Max Errors                    100000
   Registered Contexts File      /Users/jpadams/Downloads/validate-1.15.0/resources/registered_context_products.json



Product Level Validation Results

  FAIL: file:/Users/jpadams/Downloads/manifests_ladee_mission_bundle_20190717/ladee_mission_bundle_SIP_4col_manifest_v1.0.xml
    Begin Content Validation: file:/Users/jpadams/Downloads/manifests_ladee_mission_bundle_20190717/ladee_mission_bundle_SIP_4col_manifest_v1.0.tab
      ERROR  [error.table.record_length_mismatch]   table 1, record 1: Record length exceeds the max defined record length (expected 59, got 156).
      ERROR  [error.table.record_length_mismatch]   table 1, record 2: Record length exceeds the max defined record length (expected 59, got 185).
      ERROR  [error.table.record_length_mismatch]   table 1, record 3: Record length exceeds the max defined record length (expected 59, got 195).
      ERROR  [error.table.record_length_mismatch]   table 1, record 4: Record length exceeds the max defined record length (expected 59, got 188).
      ERROR  [error.table.record_length_mismatch]   table 1, record 5: Record length exceeds the max defined record length (expected 59, got 198).
      ERROR  [error.table.record_length_mismatch]   table 1, record 6: Record length exceeds the max defined record length (expected 59, got 184).
      ERROR  [error.table.record_length_mismatch]   table 1, record 7: Record length exceeds the max defined record length (expected 59, got 184).
      ERROR  [error.table.record_length_mismatch]   table 1, record 8: Record length exceeds the max defined record length (expected 59, got 190).
      ERROR  [error.table.record_length_mismatch]   table 1, record 9: Record length exceeds the max defined record length (expected 59, got 190).
      ERROR  [error.table.record_length_mismatch]   table 1, record 10: Record length exceeds the max defined record length (expected 59, got 194).
      ERROR  [error.table.record_length_mismatch]   table 1, record 11: Record length exceeds the max defined record length (expected 59, got 204).
      ERROR  [error.table.record_length_mismatch]   table 1, record 12: Record length exceeds the max defined record length (expected 59, got 175).
      ERROR  [error.table.record_length_mismatch]   table 1, record 13: Record length exceeds the max defined record length (expected 59, got 175).
    End Content Validation: file:/Users/jpadams/Downloads/manifests_ladee_mission_bundle_20190717/ladee_mission_bundle_SIP_4col_manifest_v1.0.tab

Summary:

  13 error(s)
  0 warning(s)

  Message Types:
    13           error.table.record_length_mismatch

End of Report

ladee_mission_bundle_SIP_4col_manifest_v1.0.xml.txt
ladee_mission_bundle_SIP_4col_manifest_v1.0.tab.txt

@jordanpadams jordanpadams added the bug Something isn't working label Jul 23, 2019
jordanpadams added a commit to NASA-PDS/pds4-jparser that referenced this issue Jul 23, 2019
Previous solution would not allow validate to properly use methods that depended on VICAR. This method appears to work properly after testing.

Refs NASA-PDS/validate#55
jordanpadams added a commit that referenced this issue Jul 23, 2019
Bug is fixed in PDS4-JParser and the way it handles the VICAR dependency. No idea why the software wasn't catching the error, but I couldn't seem to track down the reason why it was failing validation but no errors were thrown. Punting that down the road in the event another issue arises.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants