-
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 does not allow ".XML" as an extension for a label file #364
Comments
…/LF is included in field value, modify unallowed name message to be warning instead of error 1. Add test artifact for github356 to src/test/resources. Cucumber requires a directory for a test to exist eventhough the test uses another input directory 2. Add test artifact for github357 to src/test/resources 3. Add test artifact for github364 to src/test/resources 4. Modify from error to warning for sub_directory.unallowed_name flag in ProblemType.java 5. Add logic to check for CR/LF in field value for Table_Delimited table and add ogic to break out of loop if error is fatal to avoid reporting same error in FieldValueValidator.java 6. Add logic to allow '.XML' to be an extension for a label in LabelValidationRule.java 7. Modify message to include: "with the extension '.xml' or '.XML'" in PDS4Problems.java 8. Add debug statements and logic to report warning if read too many records to TableDataContentValidationRule.java 9. Add BAD_EXTENSION type to support new errors detected to StepDefs.java 10. Add new tests to validate.feature Refs: #355 Improve validate reporting when trying to read a null row #356 validate labels error.sub_directory.unallowed_name as a warning #357 Validate allows CRLF within a Table_Delimited field #364 validate does not allow ".XML" as an extension for a label file
…/LF is included in field value, modify unallowed name message to be warning instead of error 1. Add test artifact for github356 to src/test/resources. Cucumber requires a directory for a test to exist eventhough the test uses another input directory 2. Add test artifact for github357 to src/test/resources 3. Add test artifact for github364 to src/test/resources 4. Modify from error to warning for sub_directory.unallowed_name flag in ProblemType.java 5. Add logic to check for CR/LF in field value for Table_Delimited table and add ogic to break out of loop if error is fatal to avoid reporting same error in FieldValueValidator.java 6. Add logic to allow '.XML' to be an extension for a label in LabelValidationRule.java 7. Modify message to include: "with the extension '.xml' or '.XML'" in PDS4Problems.java 8. Add debug statements and logic to report warning if read too many records to TableDataContentValidationRule.java 9. Add BAD_EXTENSION type to support new errors detected to StepDefs.java 10. Add new tests to validate.feature Refs: #355 Improve validate reporting when trying to read a null row #356 validate labels error.sub_directory.unallowed_name as a warning #357 Validate allows CRLF within a Table_Delimited field #364 validate does not allow ".XML" as an extension for a label file
@seanhardman this should be fixed in our latest release: https://github.com/NASA-PDS/validate/releases/tag/v2.0.7 |
Looks good. Thanks. |
@jordanpadams Executing the test fails with validate 2.1.0 SNAPSHOT, but it does not fail for the stated reason of ALL CAPS: Is this OK? |
@jpl-jengelke that is fine. we should really update that test data to actually be valid though. can you create a ticket for that? https://github.com/NASA-PDS/validate/issues |
🐛 Describe the bug
Validate Tool generates an error when the extension of a PDS4 label file is capitalized ".XML". After reviewing the Standards Reference and the Data Provider's Handbook, it appears that there are no restrictions on the capitalization of PDS4 label extensions. In fact, capitalized extensions are allowed on other validation target files.
📜 To Reproduce
Steps to reproduce the behavior (notice the inconsistency in the "File Filters Used" parameter:
(base) MT-202412:bin shardman$ ./validate --skip-context-validation --skip-content-validation --target ../../test/MIS000XXX_2021001T000000_DEV0_2021001T0000_RAW010.XML
PDS Validate Tool Report
Configuration:
Version 2.1.0-SNAPSHOT
Date 2021-06-23T15:28:30Z
Parameters:
Targets [file:/Users/shardman/dev/eurc/test/MIS000XXX_2021001T000000_DEV0_2021001T0000_RAW010.XML]
Severity Level WARNING
Recurse Directories true
File Filters Used [*.xml, *.XML]
Data Content Validation off
Product Level Validation on
Max Errors 100000
Registered Contexts File /Users/shardman/dev/eurc/validate-2.1.0-SNAPSHOT/resources/registered_context_products.json
Product Level Validation Results
FAIL: file:/Users/shardman/dev/eurc/test/MIS000XXX_2021001T000000_DEV0_2021001T0000_RAW010.XML
ERROR [error.label.bad_extension] Label file names must end with the extension '.xml'
1 product validation(s) completed
Summary:
1 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:
1 error.label.bad_extension
End of Report
Completed execution in 4817 ms
🕵️ Expected behavior
I expect the label to validate successfully.
📚 Version of Software Used
This behavior has been seen in versions 2.0.6 as well as 2.1.0-SNAPSHOT.
🩺 Test Data / Additional context
MIS000XXX_2021001T000000_DEV0_2021001T0000_RAW010.XML.zip
🏞Screenshots
N/A
🖥 System Info
🦄 Applicable requirements**
The text was updated successfully, but these errors were encountered: