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

Fix bug for duplicate filenames used in different sub-directories #886

Merged
merged 3 commits into from
May 2, 2024

Conversation

al-niessner
Copy link
Contributor

🗒️ Summary

Was using just filename to look for duplicates. Now use path when given as well.

⚙️ Test Data and/or Report

Unit tests below should pass

♻️ Related Issues

Closes #873

@al-niessner al-niessner self-assigned this May 1, 2024
@al-niessner al-niessner requested a review from a team as a code owner May 1, 2024 18:04
@al-niessner
Copy link
Contributor Author

@jordanpadams @nutjob4life @tloubrieu-jpl

Ooops. Merge this one first because I accidentally merged off 832. Once this is merged, then merge 832. I guess could also merge 832 then rebase this one but seems like more work.

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.

lgtm 👍

@jordanpadams jordanpadams changed the title 873: include path as part of filename Fix bug for duplicate filenames used in different sub-directories May 2, 2024
@jordanpadams
Copy link
Member

Shrunk test data down, but still replicated the issue with the older version of validate:

$ validate-3.5.0-SNAPSHOT/bin/validate -t github873/

PDS Validate Tool Report

Configuration:
   Version     3.5.0-SNAPSHOT
   Date        2024-05-02T18:01:20Z

Parameters:
   Targets                      [file:/Users/jpadams/proj/pds/pdsen/workspace/validate/github873/]
   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     /Users/jpadams/proj/pds/pdsen/workspace/validate/validate-3.5.0-SNAPSHOT/resources/registered_context_products.json



Product Level Validation Results

  PASS: file:/Users/jpadams/proj/pds/pdsen/workspace/validate/github873/InSight_EastWestMGA.xml
        1 product validation(s) completed

  FAIL: file:/Users/jpadams/proj/pds/pdsen/workspace/validate/github873/RISE_InSight_SIS_Raw.xml
      ERROR  [error.label.file_areas_duplicated_reference]   This file area references image002.png that is already used by label urn:nasa:pds:insight_documents:document_rise:east_west_mga in file /Users/jpadams/proj/pds/pdsen/workspace/validate/github873/InSight_EastWestMGA.xml
        2 product validation(s) completed

Summary:

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

  Product Validation Summary:
    1          product(s) passed
    1          product(s) failed
    0          product(s) skipped
    2          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.file_areas_duplicated_reference

End of Report
Completed execution in 5930 ms

@jordanpadams jordanpadams merged commit 99002c9 into issue_832 May 2, 2024
2 checks passed
@jordanpadams jordanpadams deleted the issue_873 branch May 2, 2024 18:03
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