edmcouncil / ontology-publisher

The owl-builder "builds" publishable / deployable versions (and derived products) of a given set of ontologies (such as FIBO)
MIT License
7 stars 6 forks source link

Missing files in .zip archives when versionIRI is missing #130

Closed przemekgradzki closed 1 year ago

przemekgradzki commented 1 year ago

owl:imports are always "versioned": https://github.com/edmcouncil/ontology-publisher/blob/18f73e336a607ccf4d2530c32067dfa752d68cdf/publisher/product/ontology/build.sh#L360-L368

however, when the file containing the ontology does not have owl:versionIRI, it is not added to the ontology file by default.

As a result, the catalog-v001.xml files do not contain entries that have "versioned" IRIs, and when another ontology imports a given ontology (one without owl:versionIRI), the file must be fetched from the Internet.

.zip archives are generated based on owl:import entries (getOwlImports function), which are "versioned": https://github.com/edmcouncil/ontology-publisher/blob/18f73e336a607ccf4d2530c32067dfa752d68cdf/publisher/product/ontology/build.sh#L584-L590 so if there are no "versioned" IRIs in the catalog-v001.xml file, ontology files without owl:versionIRI are not added to .zip archives.

mereolog commented 1 year ago

We should never add a versionIRI even if it means that some file will be missing in the zip. I will add a hygiene test to warn us about such issues.