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

SIP label contains invalid manifest URL using file path #44

Closed jordanpadams closed 4 years ago

jordanpadams commented 4 years ago

Describe the bug

<manifest_checksum>ee7049f6cc8688ac75e93527fe293541</manifest_checksum>
<checksum_type>MD5</checksum_type>
<manifest_url>file:/home/jpadams/insight.spice_v4.0_sip_v1.0.tab</manifest_url> << ERROR <<
<aip_lidvid>urn:nasa:pds:system_bundle:product_aip:insight.spice_v4.0::1.0</aip_lidvid>
<aip_label_checksum>bb5f119d287d01823a3d84f72608c23d</aip_label_checksum>

ERROR above needs to be a URL and should never be a file path

NOTE: This should really be validated in the Schematron / Schema formation rules, but it is indicated as a String field

nutjob4life commented 4 years ago

OK so it looks like I was trying to be anal retentive with

etree.SubElement(deep, prefix + 'manifest_url').text = 'file:' + os.path.abspath(manifestFile)

which is indeed a URL!

So should it just be manifestFile so it's a relative URI?

jordanpadams commented 4 years ago

@nutjob4life great questions. pinged the NSSDCA folks. standby....

jordanpadams commented 4 years ago

@nutjob4life lets use a default base URL of https://pds-gamma.jpl.nasa.gov/data/pds4/manifests/ for now