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

Fixes for supporting NaNs and INF per IEEE754 and schematron exception handling #765

Merged
merged 3 commits into from
Nov 21, 2023

Conversation

al-niessner
Copy link
Contributor

@al-niessner al-niessner commented Nov 17, 2023

🗒️ Summary

Changed the problem report not to think all URLs are files. Corrected the array value checker so that NANs and INFs are detected.

⚙️ Test Data and/or Report

Automate unit tests below are successful

Same test data used in #760 comments that with nan/inf checker for arrays produces:

Nov 17, 2023 1:33:12 PM gov.nasa.pds.tools.label.LocationValidator setLabelExtension
INFO: setLabelExtension: xml
Nov 17, 2023 1:33:12 PM gov.nasa.pds.tools.label.LocationValidator validate
INFO: location file:/home/niessner/Projects/PDS/validate/src/test/resources/github760/227RI_PROPRETRG001_IS____680_F1_039R.xml
Nov 17, 2023 1:33:12 PM gov.nasa.pds.tools.label.LocationValidator validate
INFO: Using validation style 'PDS4 Label' for location file:/home/niessner/Projects/PDS/validate/src/test/resources/github760/227RI_PROPRETRG001_IS____680_F1_039R.xml
Nov 17, 2023 1:33:12 PM gov.nasa.pds.tools.validate.task.ValidationTask execute
INFO: Starting validation task for location 'file:/home/niessner/Projects/PDS/validate/src/test/resources/github760/227RI_PROPRETRG001_IS____680_F1_039R.xml'

PDS Validate Tool Report

Configuration:
   Version                       3.4.0-SNAPSHOT
   Date                          2023-11-17T21:33:09Z

Parameters:
   Targets                       [file:/home/niessner/Projects/PDS/validate/src/test/resources/github760/227RI_PROPRETRG001_IS____680_F1_039R.xml]
   User Specified Schemas        [file:/home/niessner/Projects/PDS/validate/src/test/resources/github760/PDS4_CASSINI_1J00_1700.xsd]
   User Specified Schematrons    [file:/home/niessner/Projects/PDS/validate/src/test/resources/github760/PDS4_CASSINI_1D00_1500.sch]
   Severity Level                WARNING
   Recurse Directories           true
   File Filters Used             [*.xml, *.XML]
   Data Content Validation       on
   Product Level Validation      on
   Max Errors                    100000
   Registered Contexts File      /home/niessner/Projects/PDS/validate/src/main/resources/util/registered_context_products.json



Product Level Validation Results

  FAIL: file:/home/niessner/Projects/PDS/validate/src/test/resources/github760/227RI_PROPRETRG001_IS____680_F1_039R.xml
      ERROR  [error.label.schema]   line 103, 25: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'cart:Cartography'.
      ERROR  [error.label.schema]   line 126, 22: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'geom:Geometry'.
      ERROR  [error.label.schema]   line 160, 36: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'sp:Spectral_Characteristics'.
      ERROR  [error.label.schema]   line 186, 30: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'disp:Display_Settings'.
      ERROR  [error.label.missing_file]   URI reference does not exist: file:/home/niessner/Projects/PDS/validate/src/test/resources/github760/227RI_PROPRETRG001_IS____680_F1_039R.LBL
        1 product validation(s) completed
Nov 17, 2023 1:33:16 PM gov.nasa.pds.tools.validate.task.ValidationTask execute
INFO: Validation complete for location 'file:/home/niessner/Projects/PDS/validate/src/test/resources/github760/227RI_PROPRETRG001_IS____680_F1_039R.xml'

Summary:

  5 error(s)
  0 warning(s)

  Product Validation Summary:
    0          product(s) passed
    1          product(s) failed
    0          product(s) skipped

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

  Message Types:
    4            error.label.schema
    1            error.label.missing_file

End of Report
Completed execution in 7474 ms

The 9500 NaN false positive messages are gone.

♻️ Related Issues

Closes #761
Closes #760
Closes #747

@al-niessner al-niessner self-assigned this Nov 17, 2023
@al-niessner al-niessner requested a review from a team as a code owner November 17, 2023 21:04
@al-niessner al-niessner marked this pull request as draft November 17, 2023 21:04
Copy link
Member

@nutjob4life nutjob4life left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@al-niessner al-niessner marked this pull request as ready for review November 17, 2023 21:35
@jordanpadams jordanpadams changed the title schematron and nans Fixes for supporting NaNs and INF per IEEE754 and schematron exception handling Nov 21, 2023
@jordanpadams jordanpadams merged commit 544f14f into main Nov 21, 2023
2 checks passed
@jordanpadams jordanpadams deleted the issue_760 branch November 21, 2023 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants