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

Handle bundle/collection files as input with bundle/collection rule #656

Merged
merged 10 commits into from
Jun 14, 2023

Conversation

al-niessner
Copy link
Contributor

🗒️ Summary

The current behavior was inconsistent and the users wanted to specify bundle/collection files. Reworked AggregateManager (mostly) to support the user desire and make the handling consistent for them both.

⚙️ Test Data and/or Report

See unit tests below.

♻️ Related Issues

Close #649

Al Niessner added 8 commits May 31, 2023 09:45
Found the existing code used TargetExaminer to determine if a target is a bundle or collection so got rid of the same checks in AggregateManager and moved the code to use the check for better uniform behavior.
Found the existing code used TargetExaminer to determine if a target is a bundle or collection so got rid of the same checks in AggregateManager and moved the code to use the check for better uniform behavior.
Found the existing code used TargetExaminer to determine if a target is a bundle or collection so got rid of the same checks in AggregateManager and moved the code to use the check for better uniform behavior.
Found the existing code used TargetExaminer to determine if a target is a bundle or collection so got rid of the same checks in AggregateManager and moved the code to use the check for better uniform behavior.
Upgraded AggregationManager to handle bundle and collection XML files instead of just directories. Still end up with lots of skipped files if they exist in the directories because that is hard to fix. Would have to process the older versions like when a directory is specified to build up the list of older versions or do some other strange processing to know they are old versions at the place where the skipped files pop up. Seems like the skipped messages should remain because they tell the user that validate knows they are there but not part of the collection/bundle that they were specifically told to process.
@al-niessner al-niessner self-assigned this Jun 5, 2023
@al-niessner al-niessner marked this pull request as draft June 5, 2023 17:40
@sonatype-lift
Copy link
Contributor

sonatype-lift bot commented Jun 5, 2023

🛠 Lift Auto-fix

Some of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.1

# Download the patch
curl https://lift.sonatype.com/api/patch/github.com/NASA-PDS/validate/656.diff -o lift-autofixes.diff

# Apply the patch with git
git apply lift-autofixes.diff

# Review the changes
git diff

Want it all in a single command? Open a terminal in your project's directory and copy and paste the following command:

curl https://lift.sonatype.com/api/patch/github.com/NASA-PDS/validate/656.diff | git apply

Once you're satisfied, commit and push your changes in your project.

Footnotes

  1. You can preview the patch by opening the patch URL in the browser.

@nutjob4life nutjob4life removed their request for review June 5, 2023 19:18
@jordanpadams jordanpadams marked this pull request as ready for review June 14, 2023 20:13
@jordanpadams jordanpadams changed the title Issue 649: handle bundle/collection files as input with bundle/collection rule Handle bundle/collection files as input with bundle/collection rule Jun 14, 2023
@jordanpadams jordanpadams merged commit 2ac2cc2 into main Jun 14, 2023
@jordanpadams jordanpadams deleted the issue_649 branch June 14, 2023 20:13
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.

validate does not validate a collection if collection.xml pointed to
2 participants