-
Notifications
You must be signed in to change notification settings - Fork 11
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
Validate missing collections in bundle after CCB-282 updates #310
Comments
I am wondering if the name patterns are too strict. @jordanpadams Can you clarify? The SDR mentions bundle but quiet on collection page 14. vi ./src/main/java/gov/nasa/pds/tools/validate/BundleManager.java public class BundleManager { From what I can gather, the code looks for files that has "bundle_" or "collection_" which would explain why when Richard changed the name, it doesn't complain because it was found in the crawler. |
On page 15, there is an example of a collection that has the name "collection_browse.xml" |
@qchaupds we want to look for any file that is |
@qchaupds is looking at alternatives to crawl for the bundle and collection labels using apache library (fileUtil). |
The first listFiles() function here: https://commons.apache.org/proper/commons-io/javadocs/api-2.5/org/apache/commons/io/FileUtils.html with IOFilter as a parameter is causing the code to pause (possibly in an infinite loop). An alternate function listFiles() with extensions as an array of file extension ("xml") seems to work and get around the pause issue. Will give that a try to see the regression tests will run successful and the work for issue #310 can proceed. |
…ely after the "collection" token. 1. Add github310 to src/test/resources directory. 2. Use alternate listFiles() function to avoid infinite loop in BundleManager.java 3. Ease requirement for an underscore immediately after the "collection" token in BundleManager.java 4. Commented out extraneous println statements in FieldValueValidator.java 5. Add function signature for crawl() to use list of file extensions in Crawler.java 6. Add function to craw() to use list of file extensions in FileCrawler.java 7. Consolidate a block of code to refinedFoundList() function so it can be reused in FileCrawler.java 8. Ease requirement for an underscore immediately after the "collection" token in CollectionReferentialIntegrityRule.java 9. Use alternate listFiles() function to avoid infinite loop in CollectionReferentialIntegrityRule.java 10. Ease requirement for an underscore immediately after the "collection" token in FindUnreferencedIdentifiers.java 11. Use alternate listFiles() function to avoid infinite loop in FindUnreferencedIdentifiers.java 12. Add 3 new constants to consolidate the locations of patterns to one place in Constants.java 13. Add two new tests for github310 in feature file validate.feature Refs: #310 Validate missing collections in bundle after CCB-282 updates
…nting in many places 1. Use defined constants in and remove un-needed comments in BundleManager.java 2. Remove un-needed comments in FieldValueValidator.java 3. Remove un-used codes in FileCrawler.java 4. Use defined constants in CollectionReferentialIntegrityRule.java 5. Remove un-needed comments in FindUnreferencedIdentifiers.java 6. Add defined constants in Constants.java 7. Reduce test resources to zero size to reduce git repository. Modify file_size and checksum tags to reflect new parameters. Refs: #310 Validate missing collections in bundle after CCB-282 updates
Allows the name of a collection to not require an underscore immediat…
@jordanpadams During testing the underscore error doesn't show up but the test data doesn't pass, either: Is this OK? |
@jpl-jengelke we had a bug filed for this 1 day after you posted this comment :-) #408 . Can you try this again with the latest tagged version of validate? |
Describe the bug
See comment from @rchenatjpl at #192 (comment)
The text was updated successfully, but these errors were encountered: