Closed rsjoyner closed 2 years ago
The doi-service
LID field validation regex pattern [a-z0-9][a-z0-9-._]{0,31}
imposes length constraint of [1,32]
value 'saturn_thermosphere_h2_density_temp' has length 35
The PDS4 Standards Reference Sec. 6D.2 does not appear to impose any constraint on the length of any LID field, but Sec 6D does impose a length constraint of 255 characters total on any identifier (ie LID or LIDVID)
The doi-service
pattern also applies the constraint that the first field character must be alphanumeric, though the SR does not impose such a constraint.
Suggest
@jordanpadams just wanna run this by you first, as I might be missing some context
Have implemented suggested fixes, but will hold off on modifying tests and opening a PR until Jordan has confirmed.
There's a test which is now failing due to removal of the requirement that the first character of each chunk be alphanumeric. Seems like there should be a check that the first three chunks are ['urn', 'nasa', 'pds']
?
# Test invalid field tokens (invalid characters)
doi_obj.pds_identifier = "urn:nasa:_pds:lab_shocked_feldspars"
with self.assertRaises(InvalidIdentifierException):
self._doi_validator._check_lidvid_field(doi_obj)
@alexdunnjpl
Have implemented suggested fixes, but will hold off on modifying tests and opening a PR until Jordan has confirmed.
this looks great. you are go for PR 🚀
Seems like there should be a check that the first three chunks are ['urn', 'nasa', 'pds']?
I like it. let's add this check as well.
🐛 Describe the bug
The DOI-service s/w inaccurately identified this LID as being invalid – but I think not….
The DOI was successfully minted…
📜 To Reproduce
Steps to reproduce the behavior: mkdir ATM/Bundles_20220606
🕵️ Expected behavior
The expected behavior is that the application does not inaccurately report the valid LID as being an invalid LIDVID
📚 Version of Software Used
🩺 Test Data / Additional context
see enclosure zip file
🏞Screenshots
🖥 System Info
ATMOS_Bundles_20220606.zip
🦄 Related requirements
⚙️ Engineering Details