-
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 Table_Character groups and their specified lengths match the specified group_length #63
Comments
@msbentley i'm getting a following error, when I try to fix this issue. Do you have an updated test file with 'https'? |
Hi @hhlee445 I'm afraid not - we are currently in the process of upgrading the PSA server to support a higher TLS version and getting the certificate for https. In the meantime, here is a version with the PSA classes removed: validate_test_group_len_nopsa.zip Thanks! |
@hhlee445 you can specify the schemas and schematrons via the command-line for testing purposes. |
Added a warning message before the report generation. WARNING: GroupFieldCharacter attribute group_length is larger than size of contained fields: 690>680 |
Replaced a warning message to an error message. % ./bin/validate -t /Users/hyunlee/dev/pds_en/validate/issue_63/validate_test_group_len_nopsa/isa_raw_sc_nominal_obs_00013_20190801.xml ERROR: GroupFieldCharacter attribute group_length is larger than size of contained fields: 690>680. |
@jordanpadams do you want to see the exception as java.lang.Exception: ERROR: GroupFieldCharacter attribute group_length is larger than size of contained fields: 690>680.
and exit before writing the report? |
@hhlee445 I was thinking the method would throw the error, and then the validate code would catch the exception, and add a new depending on where this happens in validate, there are couple of examples around the code for creating a new
or maybe
|
Validate now complains about the attached, presumably because repetitions*field_length=20 while group_length=32. However, both pds4_viewer and PDSView display the data correctly. Are the viewers behaving correctly by skipping the extra 3 bytes between repetitions? |
Actually, I guess it's ok for the viewers to be more lenient. It seems strange that both would be lenient in a way that requires more math in figuring out what the spacing between repetitions is. |
@rchenatjpl they both use the same library to read the PDS4 labels, so that is most likely why they are both lenient. As long as the invalidity is valid (that made sense, right?), then I think this is OK? |
Describe the bug
I am validating a Table_Character using one group with 6 fields, having a total length of 69 bytes and 10 repetitions. The label wrongly specified group_length to be 699 bytes and validation was successful. The python PDS4 tool, however, flags this as invalid and will not open it.
To Reproduce
See the attached sample product - group_length is incorrectly set but validation passes. In fact any value between 690 and 699 (inclusive) results in validate passing the product, not only the correct value of 690.
validate_test_group_len.zip
Expected behavior
validate should check the group_length against the total length of the fields declared in the label.
Version of Software Used
1.15.0
Applicable Requirements
L5.PRP.VA.18
The text was updated successfully, but these errors were encountered: