Jenkins Hygiene Tests

Jenkins Hygiene Tests

Brief Guide to Enabling Hygiene Tests and Viewer

During development, you may want to get your ontology visible in the viewer and have it go through the hygiene tests in preparation for release. This can all be done with some introduction of various changes to specific files. Below is a guide to help you through this process.

The metadata files

The fist file that needs to be modified is MetadataIOF.rdf. This file is the root of the view and analysis for the IOF ontologies. You need to create a part that points to your metadata file in your ontology domain directory.

For this example, we will be adding the ProductSystemService ontologies to the hygiene and viewer systems. The IRI for this ontology is: https://spec.industrialontologies.org/ontology/productservicesystems/Metadataproductservicesystems/

The file currently looks like this:

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE rdf:RDF [ <!ENTITY dct "http://purl.org/dc/terms/"> <!ENTITY iof-av "https://spec.industrialontologies.org/ontology/core/meta/AnnotationVocabulary/"> <!ENTITY iof-core-mod "https://spec.industrialontologies.org/ontology/core/Metadatacore/"> <!ENTITY iof-maintenance-mod "https://spec.industrialontologies.org/ontology/maintenance/MetadataISO/"> <!ENTITY iof-spec "https://spec.industrialontologies.org/ontology/MetadataIOF/"> <!ENTITY iof-supplychain-mod "https://spec.industrialontologies.org/ontology/supplychain/Metadatasupplychain/"> <!ENTITY owl "http://www.w3.org/2002/07/owl#"> <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#"> <!ENTITY skos "http://www.w3.org/2004/02/skos/core#"> <!ENTITY sm "http://www.omg.org/techprocess/ab/SpecificationMetadata/"> <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#"> ]> <rdf:RDF xml:base="https://spec.industrialontologies.org/ontology/MetadataIOF/" xmlns:dct="http://purl.org/dc/terms/" xmlns:iof-av="https://spec.industrialontologies.org/ontology/core/meta/AnnotationVocabulary/" xmlns:iof-core-mod="https://spec.industrialontologies.org/ontology/core/Metadatacore/" xmlns:iof-maintenance-mod="https://spec.industrialontologies.org/ontology/maintenance/MetadataISO/" xmlns:iof-spec="https://spec.industrialontologies.org/ontology/MetadataIOF/" xmlns:iof-supplychain-mod="https://spec.industrialontologies.org/ontology/supplychain/Metadatasupplychain/" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:sm="http://www.omg.org/techprocess/ab/SpecificationMetadata/" xmlns:xsd="http://www.w3.org/2001/XMLSchema#"> <owl:Ontology rdf:about="https://spec.industrialontologies.org/ontology/MetadataIOF/"> <rdfs:label>Metadata for the IOF Ontology</rdfs:label> <dct:abstract>The IOF Metadata Ontology describes the various modules that make up the IOF ontology library.</dct:abstract> <dct:issued rdf:datatype="&xsd;dateTime">2023-01-20T00:00:00</dct:issued> <dct:license rdf:datatype="&xsd;anyURI">http://opensource.org/licenses/MIT</dct:license> <owl:imports rdf:resource="https://spec.industrialontologies.org/ontology/core/Metadatacore/"/> <owl:imports rdf:resource="https://spec.industrialontologies.org/ontology/maintenance/Metadatamaintenance/"/> <owl:imports rdf:resource="https://spec.industrialontologies.org/ontology/supplychain/Metadatasupplychain/"/> <owl:versionIRI rdf:resource="https://spec.industrialontologies.org/ontology/202401/MetadataIOF/"/> <iof-av:copyright>Copyright (c) 2023, 2023, Open Applications Group</iof-av:copyright> </owl:Ontology> <owl:NamedIndividual rdf:about="&iof-spec;IOFSpecification"> <rdf:type rdf:resource="&sm;Specification"/> <rdfs:label>IOF Specification</rdfs:label> <dct:abstract>The IOF Specification comprises all metadata describing the various modules and ontologies that make up the IOF ontology library.</dct:abstract> <dct:hasPart rdf:resource="&iof-core-mod;coreModule"/> <dct:hasPart rdf:resource="https://spec.industrialontologies.org/ontology/maintenance/Metadatamaintenance/maintenanceModule"/> <dct:hasPart rdf:resource="&iof-supplychain-mod;supplychainModule"/> <dct:license rdf:datatype="&xsd;anyURI">http://opensource.org/licenses/MIT</dct:license> <dct:title>IOF Specification</dct:title> </owl:NamedIndividual> </rdf:RDF>

You need to make the following modification to the MetadataIOF.rdf file

<!ENTITY iof-maintenance-mod "https://spec.industrialontologies.org/ontology/maintenance/MetadataISO/"> <!ENTITY iof-spec "https://spec.industrialontologies.org/ontology/MetadataIOF/"> <!ENTITY iof-supplychain-mod "https://spec.industrialontologies.org/ontology/supplychain/Metadatasupplychain/"> + <!ENTITY pss "https://spec.industrialontologies.org/ontology/productservicesystems/Metadataproductservicesystems/"> <!ENTITY owl "http://www.w3.org/2002/07/owl#"> <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#"> @@ -20,6 +21,7 @@ xmlns:iof-maintenance-mod="https://spec.industrialontologies.org/ontology/maintenance/MetadataISO/" xmlns:iof-spec="https://spec.industrialontologies.org/ontology/MetadataIOF/" xmlns:iof-supplychain-mod="https://spec.industrialontologies.org/ontology/supplychain/Metadatasupplychain/" + xmlns:pss="https://spec.industrialontologies.org/ontology/productservicesystems/Metadataproductservicesystems/" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" @@ -35,6 +37,7 @@ <owl:imports rdf:resource="https://spec.industrialontologies.org/ontology/core/Metadatacore/"/> <owl:imports rdf:resource="https://spec.industrialontologies.org/ontology/maintenance/Metadatamaintenance/"/> <owl:imports rdf:resource="https://spec.industrialontologies.org/ontology/supplychain/Metadatasupplychain/"/> + <owl:imports rdf:resource="https://spec.industrialontologies.org/ontology/productservicesystems/Metadataproductservicesystems/"/> <owl:versionIRI rdf:resource="https://spec.industrialontologies.org/ontology/202401/MetadataIOF/"/> <iof-av:copyright>Copyright (c) 2023, 2023, Open Applications Group</iof-av:copyright> </owl:Ontology> @@ -46,6 +49,7 @@ <dct:hasPart rdf:resource="&iof-core-mod;coreModule"/> <dct:hasPart rdf:resource="https://spec.industrialontologies.org/ontology/maintenance/Metadatamaintenance/maintenanceModule"/> <dct:hasPart rdf:resource="&iof-supplychain-mod;supplychainModule"/> + <dct:hasPart rdf:resource="&pss;productServiceSystemsModule"/> <dct:license rdf:datatype="&xsd;anyURI">http://opensource.org/licenses/MIT</dct:license> <dct:title>IOF Specification</dct:title> </owl:NamedIndividual>

Now you need to tell the infrastructure where to find the Metadata ontology. This is done in the catalog-v001.xml file:

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <catalog prefer="public" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/bfo.owl" uri="./cache/bfo/2020/bfo.rdf"/> <uri id="User Entered Import Resolution" name="https://www.omg.org/spec/Commons/AnnotationVocabulary/" uri="./cache/CMNS/AnnotationVocabulary.rdf"/> <uri id="User Entered Import Resolution" name="https://www.omg.org/spec/Commons/TextDatatype/" uri="./cache/CMNS/TextDatatype.rdf"/> <uri id="User Entered Import Resolution" name="https://www.omg.org/spec/Commons/Collections/" uri="./cache/CMNS/Collections.rdf"/> <uri id="User Entered Import Resolution" name="https://www.omg.org/spec/Commons/Designators/" uri="./cache/CMNS/Designators.rdf"/> <uri id="User Entered Import Resolution" name="https://www.omg.org/spec/Commons/Identifiers/" uri="./cache/CMNS/Identifiers.rdf"/> <uri id="User Entered Import Resolution" name="https://spec.industrialontologies.org/ontology/supplychain/SupplyChain/" uri="./supplychain/SupplyChain.rdf"/> <uri id="User Entered Import Resolution" name="https://spec.industrialontologies.org/ontology/maintenance/Maintenance/" uri="./maintenance/Maintenance.rdf"/> <uri id="User Entered Import Resolution" name="https://spec.industrialontologies.org/ontology/core/Core/" uri="./core/Core.rdf"/> <uri id="User Entered Import Resolution" name="https://spec.industrialontologies.org/ontology/core/meta/AnnotationVocabulary/" uri="./core/meta/AnnotationVocabulary.rdf"/> <uri id="User Entered Import Resolution" name="https://spec.industrialontologies.org/ontology/MetadataIOF/" uri="./MetadataIOF.rdf"/> <uri id="User Entered Import Resolution" name="https://spec.industrialontologies.org/ontology/core/Metadatacore/" uri="./core/Metadatacore.rdf"/> <uri id="User Entered Import Resolution" name="https://spec.industrialontologies.org/ontology/maintenance/Metadatamaintenance/" uri="./maintenance/Metadatamaintenance.rdf"/> <uri id="User Entered Import Resolution" name="https://spec.industrialontologies.org/ontology/supplychain/Metadatasupplychain/" uri="./supplychain/Metadatasupplychain.rdf"/> <uri id="User Entered Import Resolution" name="https://spec.industrialontologies.org/ontology/core/commonstocoremapping/MappingCommonsToIOF/" uri="./core/commonstocoremapping/MappingCommonsToIOF.rdf"/> <uri id="User Entered Import Resolution" name="https://spec.industrialontologies.org/ontology/core/commonstocoremapping/meta/MappingAnnotationVocabularyToCommons/" uri="./core/commonstocoremapping/meta/MappingAnnotationVocabularyToCommons.rdf"/> </catalog>

Add the following line before line 19:

+ <uri id="User Entered Import Resolution" name="https://spec.industrialontologies.org/ontology/productservicesystems/Metadataproductservicesystems/" uri="./productservicesystems/Metadataproductservicesystems.rdf"/>

It is now necessary to create the Metadataproductservicesystems.rdf file referenced in the catalog file:

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE rdf:RDF [ <!ENTITY dct "http://purl.org/dc/terms/"> <!ENTITY iof-av "https://spec.industrialontologies.org/ontology/core/meta/AnnotationVocabulary/"> <!ENTITY iof-pss-mod "https://spec.industrialontologies.org/ontology/productservicesystems/Metadataproductservicesystems/"> <!ENTITY owl "http://www.w3.org/2002/07/owl#"> <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#"> <!ENTITY skos "http://www.w3.org/2004/02/skos/biopharma#"> <!ENTITY sm "http://www.omg.org/techprocess/ab/SpecificationMetadata/"> <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#"> ]> <rdf:RDF xmlns:dct="http://purl.org/dc/terms/" xmlns:iof-av="https://spec.industrialontologies.org/ontology/core/meta/AnnotationVocabulary/" xmlns:iof-pss-mod="https://spec.industrialontologies.org/ontology/productservicesystems/Metadataproductservicesystems/" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:sm="http://www.omg.org/techprocess/ab/SpecificationMetadata/" xmlns:xsd="http://www.w3.org/2001/XMLSchema#"> <owl:Ontology rdf:about="https://spec.industrialontologies.org/ontology/productservicesystems/Metadataproductservicesystems/"> <rdfs:label xml:lang="en-US">IOF Product Service System Ontology (PSS Ontology)</rdfs:label> <dct:abstract>The PSS Ontology aims to support the software platforms being developed to support the product service systems' from design to EOL</dct:abstract> <dct:issued rdf:datatype="&xsd;dateTime">2025-08-08T00:00:00Z</dct:issued> <dct:license rdf:datatype="&xsd;anyURI">http://opensource.org/licenses/MIT</dct:license> <owl:imports rdf:resource="https://spec.industrialontologies.org/ontology/productservicesystems/ProductServiceSystem/"/> <iof-av:copyright>Copyright (c) 2022, 2023, 2024, 2025 Open Applications Group</iof-av:copyright> </owl:Ontology> <owl:NamedIndividual rdf:about="&iof-pss-mod;productServiceSystemsModule"> <rdf:type rdf:resource="&sm;Module"/> <rdfs:label xml:lang="en-US">IOF Product Service System Ontology</rdfs:label> <dct:abstract>The PSS Ontology aims to support the software platforms being developed to support the product service systems' from design to EOL</dct:abstract> <dct:hasPart rdf:resource="https://spec.industrialontologies.org/ontology/productservicesystems/ProductServiceSystem/"/> </owl:NamedIndividual> </rdf:RDF>

You need to make sure the module names match the MetadataIOF.rdf declarations, and you have referenced NamedIndividual. List all your ontologies as parts with the dct:hasPart property.

Make sure you have a catalog file and it has the following line:

 

<uri id="User Entered Import Resolution" name="https://spec.industrialontologies.org/ontology/productservicesystems/ProductServiceSystem/" uri="ProductServiceSystem.rdf"/>

This will ensure that the system will know where to find your ontology.

If your ontology is provisional, you will need to have an AboutIOFDev.rdf file that references your ontology and all dependencies:

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE rdf:RDF [ <!ENTITY dct "http://purl.org/dc/terms/"> <!ENTITY owl "http://www.w3.org/2002/07/owl#"> <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#"> <!ENTITY skos "http://www.w3.org/2004/02/skos/core#"> <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#"> <!ENTITY iof-av "https://spec.industrialontologies.org/ontology/core/meta/AnnotationVocabulary/"> <!ENTITY dcterms "http://purl.org/dc/terms/"> ]> <rdf:RDF xml:base="https://spec.industrialontologies.org/ontology/productservicesystems/AboutIOFDev/" xmlns:dct="http://purl.org/dc/terms/" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:iof-av="https://spec.industrialontologies.org/ontology/core/meta/AnnotationVocabulary/" xmlns:dcterms="http://purl.org/dc/terms/"> <owl:Ontology rdf:about="https://spec.industrialontologies.org/ontology/productservicesystems/AboutIOFDev/"> <rdfs:label xml:lang="en-US">About IOF Development</rdfs:label> <dcterms:abstract>This ontology defines the scope of development maturity level IOF ontologies.</dcterms:abstract> <dcterms:license rdf:datatype="&xsd;anyURI">http://opensource.org/licenses/MIT</dcterms:license> <dcterms:title>Industrial Ontology Foundry (IOF) Ontology - Development</dcterms:title> <iof-av:copyright>Copyright (c) 2022, 2023, Open Applications Group</iof-av:copyright> <owl:versionIRI rdf:resource="https://spec.industrialontologies.org/ontology/202401/productservicesystems/AboutIOFDev/"/> <iof-av:maturity rdf:resource="&iof-av;Provisional"/> <!-- load from the cache --> <owl:imports rdf:resource="https://spec.industrialontologies.org/iof/ontology/release/202401/cache/bfo/2020/bfo.rdf"/> <!-- load from normative locations --> <owl:imports rdf:resource="https://spec.industrialontologies.org/ontology/core/Core/"/> <owl:imports rdf:resource="https://spec.industrialontologies.org/ontology/core/meta/AnnotationVocabulary/"/> <owl:imports rdf:resource="https://spec.industrialontologies.org/ontology/productservicesystems/ProductServiceSystem/"/> </owl:Ontology> </rdf:RDF>

Checking to see if everything worked

The following link will take you to the Jenkins CI/CD system: Releases · iofoundry/ontology

When the scan is completed (or if you sign in you can force the scan to start with the button: “Scan Repository Now”. You can view the status when the branch is building by following this link: Releases · iofoundry/ontology

This is for the product-service-system-dev branch in this case.

When it is building, you can view the console logs by clicking on “⌄“ and then the “Console Output”

image-20250808-125252.png

If all went well, you should see the following in Jenkins:

image-20250808-125934.png

 

And you should be able to go to the OntoViewer: `https://spec.industrialontologies.org/iof/ontology

And select your branch:

image-20250808-130104.png

And see it in the left hand side of the tree:

image-20250808-130304.png

You can then browse your classe.