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

issue 529: do decimal test then string based on significant digits #582

Merged
merged 5 commits into from
Dec 23, 2022

Conversation

al-niessner
Copy link
Contributor

🗒️ Summary

This is a patch rather than fix. Doing the checks as given is not as simple as the code is leading on to be. Probably tests to because it will not really work that well when it becomes 1e-6 or some other random representation does not match well. Almost need to update the XML to specify the number of significant digits to do it right.

⚙️ Test Data and/or Report

Ignoring the product not found because it does not seem to be part of this ticket and is really that the supplied data is incomplete.

PDS Validate Tool Report

Configuration:
   Version                       3.1.0-SNAPSHOT
   Date                          2022-12-22T19:39:51Z

Parameters:
   Targets                       [file:/tmp/test/m0123063425f4_2p_iof_gbl.xml, file:/tmp/test/m0124982735f4_2p_iof_gbl.xml, file:/tmp/test/m0126360726f4_2p_cif_gbl.xml, file:/tmp/test/m0128490206f4_2p_iof_gbl.xml, file:/tmp/test/m0134536742f4_2p_cif_gbl.xml, file:/tmp/test/m0151681034f4_2p_cif_gbl.xml, file:/tmp/test/m0154760995f1_2p_cif_gbl.xml, file:/tmp/test/m0157417198f3_2p_iof_gbl.xml]
   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:/tmp/test/m0123063425f4_2p_iof_gbl.xml
      ERROR  [error.label.context_ref_not_found]   line 84: 'Context product not found: urn:nasa:pds:context:instrument:near.msi
        1 product validation(s) completed

  FAIL: file:/tmp/test/m0124982735f4_2p_iof_gbl.xml
      ERROR  [error.label.context_ref_not_found]   line 84: 'Context product not found: urn:nasa:pds:context:instrument:near.msi
        2 product validation(s) completed

  FAIL: file:/tmp/test/m0126360726f4_2p_cif_gbl.xml
      ERROR  [error.label.context_ref_not_found]   line 84: 'Context product not found: urn:nasa:pds:context:instrument:near.msi
        3 product validation(s) completed

  FAIL: file:/tmp/test/m0128490206f4_2p_iof_gbl.xml
      ERROR  [error.label.context_ref_not_found]   line 84: 'Context product not found: urn:nasa:pds:context:instrument:near.msi
        4 product validation(s) completed

  FAIL: file:/tmp/test/m0134536742f4_2p_cif_gbl.xml
      ERROR  [error.label.context_ref_not_found]   line 84: 'Context product not found: urn:nasa:pds:context:instrument:near.msi
        5 product validation(s) completed

  FAIL: file:/tmp/test/m0151681034f4_2p_cif_gbl.xml
      ERROR  [error.label.context_ref_not_found]   line 84: 'Context product not found: urn:nasa:pds:context:instrument:near.msi
        6 product validation(s) completed

  FAIL: file:/tmp/test/m0154760995f1_2p_cif_gbl.xml
      ERROR  [error.label.context_ref_not_found]   line 84: 'Context product not found: urn:nasa:pds:context:instrument:near.msi
        7 product validation(s) completed

  FAIL: file:/tmp/test/m0157417198f3_2p_iof_gbl.xml
      ERROR  [error.label.context_ref_not_found]   line 84: 'Context product not found: urn:nasa:pds:context:instrument:near.msi
        8 product validation(s) completed

Summary:

  8 error(s)
  0 warning(s)

  Product Validation Summary:
    0          product(s) passed
    8          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:
    8            error.label.context_ref_not_found

End of Report
Completed execution in 12303 ms

♻️ Related Issues

#529

@al-niessner al-niessner requested a review from a team as a code owner December 22, 2022 19:46
@al-niessner al-niessner self-assigned this Dec 22, 2022
@al-niessner
Copy link
Contributor Author

@jordanpadams @nutjob4life @tloubrieu-jpl ready for review

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.

Legit 👍

@jordanpadams
Copy link
Member

@al-niessner the regression test looks to be failing because this specific case I don't believe this product should be valid?

  FAIL: file:/Users/jpadams/proj/pds/pdsen/workspace/validate/src/test/resources/github529/fail/m0126360726f4_2p_cif_gbl.xml
    Begin Content Validation: file:/Users/jpadams/proj/pds/pdsen/workspace/validate/src/test/resources/github529/fail/m0126360726f4_2p_cif_gbl.fit
      ERROR  [error.array.value_out_of_min_max_range]   array 1, location (349, 345): Value is greater than the maximum value in the label (max=0.0014194, actual=0.0014194006).
    End Content Validation: file:/Users/jpadams/proj/pds/pdsen/workspace/validate/src/test/resources/github529/fail/m0126360726f4_2p_cif_gbl.fit
        1 product validation(s) completed

@jordanpadams
Copy link
Member

I am assuming actual=0.0014194006 is a real value, and not some funkiness in how the double was stored in memory. If that is also not correct, and that product is valid, then we can fix that test

@jordanpadams
Copy link
Member

per offline discussions, actual=0.0014194006 is an inaccurate value, and that error should not occur

@jordanpadams jordanpadams merged commit e7e4abd into main Dec 23, 2022
@jordanpadams jordanpadams deleted the issue_529 branch December 23, 2022 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants