NASA-PDS / deep-archive

PDS Open Archival Information System (OAIS) utilities, including Submission Information Package (SIP) and Archive Information Package (AIP) generators
https://nasa-pds.github.io/deep-archive/
Other
7 stars 4 forks source link

deep archive misses products that specify primary products using lower case 'p' #116

Closed jordanpadams closed 3 years ago

jordanpadams commented 3 years ago

šŸ› Describe the bug

The SIP/transfer/checksum manifest files in a Deep Archive package do not list a primary basic product designated by lowercase ā€œpā€ in the collection inventory file. The Standards do not appear to restrict the membership value to uppercase ā€œPā€ or ā€œSā€ in a collection inventory file.

šŸ“œ To Reproduce

Run pds-deep-archive against a collection specifying a primary product with P instead of p

šŸ•µļø Expected behavior

pds-deep-archive should be case agnostic when it comes to specifying primary/secondary products.


šŸ¦„ Related requirements

āš™ļø Engineering Details

nutjob4life commented 3 years ago

The code for "p-lines" currently is:

_pLineMatcher = re.compile(r'^P,\s*([^\s]+)::([^\s]+)')

So it currently matchies capital P. I think the issue title and "to reproduce" are flipped.

I'll add a test case that includes mixed case P/p to test in case (see what I did there šŸ˜) case-insensitivity is working.