Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement versioning ontology #979

Open
rjyounes opened this issue Oct 1, 2023 · 16 comments · May be fixed by #982
Open

Implement versioning ontology #979

rjyounes opened this issue Oct 1, 2023 · 16 comments · May be fixed by #982
Assignees

Comments

@rjyounes
Copy link
Collaborator

rjyounes commented Oct 1, 2023

The primary value is for managing dependencies in ontologies importing gist (sub-gists, client ontologies).

See https://github.com/semanticarts/versioning-ontology.

gist will declare its version (X.x.x) and the dependency on the versioning ontology.

We also need to include the validation queries in the repository.

@Jamie-SA We will need to make the operators-ontology and the versioning ontology downloadable to enable a Protege import of gist, since gist will import the versioning ontology, which imports the operators ontology.

@rjyounes
Copy link
Collaborator Author

rjyounes commented Oct 12, 2023

Protege needs the versioned imports.

DECISION:
Implement the versioning ontology and use versioned IRIs in owl:imports.

To dos:
I will submit a single PR for those assigned to me:

I've added separate issues for these:

@Jamie-SA #983 Make the operators and versioning ontologies accessible over HTTP for gist users. I forgot to mention this one today - I believe it's needed.
@rjyounes @dylan-sa Update materialize subclass inference script to include version and version dependencies. Dylan, I have an approach in mind that will work for this.

@rjyounes rjyounes self-assigned this Oct 12, 2023
@pmcb55
Copy link

pmcb55 commented Oct 12, 2023

It's great to see an explicit effort at vocab versioning - so congrats on this work!

But I notice that even though your Versioning vocab does use a prefix (i.e., @prefix ver: <https://w3id.org/semanticarts/ns/ontology/versioning/> .), it's not declaring that prefix (or it's namespace IRI) using the SHACL PrefixDeclaration class. Is this a deliberate omission, or an oversight...?

Also, just for information, but were you guys aware of the work on PLOW from Field33 (paper here: https://ebooks.iospress.nl/pdf/doi/10.3233/SSW220015), with GitHub repo here: https://github.com/field33/plow

I'm not very familiar with PLOW myself (and the Field33 website seems to have disappeared!), but I'd assume there might be some interesting overlap...

@uscholdm
Copy link
Contributor

But I notice that even though your Versioning vocab does use a prefix (i.e., @Prefix ver: https://w3id.org/semanticarts/ns/ontology/versioning/ .), it's not declaring that prefix (or it's namespace IRI) using the SHACL PrefixDeclaration class. Is this a deliberate omission, or an oversight...?

@rjyounes, I don't know whether we want it or not. What do you think?

@rjyounes
Copy link
Collaborator Author

I don't know either. That was something we implemented in gist, we haven't done it for our ontologies across the board. I don't have strong feelings either way.

@uscholdm
Copy link
Contributor

I don't know either. That was something we implemented in gist, we haven't done it for our ontologies across the board. I don't have strong feelings either way.

Should we bring this to the group?

@rjyounes
Copy link
Collaborator Author

It's not a gist issue. Why don't you ask Boris and the two of you can make a decision?

@pmcb55
Copy link

pmcb55 commented Oct 18, 2023

Just my 2c-worth of input to the above decision, but if you guys 'preferred' to define and use a prefix for this ontology (and you clearly did with ver:), i.e.:

@prefix ver: <https://w3id.org/semanticarts/ns/ontology/versioning/> .

ver:SemanticVersionNumber
	a owl:Class ;

...then wouldn't you assume consumers of the terms defined in this ontology might 'prefer' to do likewise (I sure would), so I'd like if this ontology explicitly provided that 'preference' in a machine-readable way. We all know it is just a 'preference' anyways, so where's the harm!?

@uscholdm
Copy link
Contributor

Also, just for information, but were you guys aware of the work on PLOW from Field33 (paper here: https://ebooks.iospress.nl/pdf/doi/10.3233/SSW220015), with GitHub repo here: https://github.com/field33/plow

No I had not heard of this, most interesting. Thanks for the reference. @sa-bpelakh, what do you think?

@uscholdm
Copy link
Contributor

uscholdm commented Oct 18, 2023

...then wouldn't you assume consumers of the terms defined in this ontology might 'prefer' to do likewise (I sure would), so I'd like if this ontology explicitly provided that 'preference' in a machine-readable way. We all know it is just a 'preference' anyways, so where's the harm!?

I'm not sure exactly what you are proposing. Are you saying to declare the namespace and ver: prefix using the SHACL PrefixDeclaration. Where would that declaration go?

BTW, the ver: prefix is introduced in the separate versioning ontology which we wanted to keep independent from gist. See: https://github.com/semanticarts/versioning-ontology/

@sa-bpelakh
Copy link
Collaborator

Also, just for information, but were you guys aware of the work on PLOW from Field33 (paper here: https://ebooks.iospress.nl/pdf/doi/10.3233/SSW220015), with GitHub repo here: https://github.com/field33/plow

No I had not heard of this, most interesting. Thanks for the reference. @sa-bpelakh, what do you think?

It's pretty neat, basically what we did but with a nice tool wrapping it. The dependencies are flatter than ours, e.g.

registry:dependency "@other/other_ontology =0.1.2" ;

as opposed to our operator-based structure. This wasn't around when we came up with this 4-5 years ago, or I would have used it. Didn't cover the other parts, i.e. application versioning and data sets.

@pmcb55
Copy link

pmcb55 commented Oct 19, 2023

Hiya Michael,

I'm not sure exactly what you are proposing.

Oh, all I'm proposing is adding some extra metadata to the Versioning ontology itself - i.e., just adding these triples:

<https://w3id.org/semanticarts/ontology/versioning> sh:declare ver:_PrefixDeclaration_versioning .

ver:_PrefixDeclaration_versioning a sh:PrefixDeclaration ;
    sh:namespace "https://w3id.org/semanticarts/ns/ontology/versioning/"^^xsd:anyURI;
    sh:prefix "ver".  

...so that the ontology itself is described like this (new triples added to the end):

<https://w3id.org/semanticarts/ontology/versioning>
	a owl:Ontology ;
	owl:imports <https://w3id.org/semanticarts/ontology/operators1.0.0> ;
	owl:versionIRI <https://w3id.org/semanticarts/ontology/versioningX.x.x> ;
	skos:definition "Generic concepts for semantic versioning of a suite of artifacts for semantic systems in production."^^xsd:string ;
	skos:editorialNote "Although this was originally intended for semantic version numbers, the ontology could be tweaked in a very small way to use different version numbers, so long as they are ordered."^^xsd:string ;
	skos:example "The semantic version number for the disease taxonomy is 6.3.0. This version depends on the version of the imported disease ontology being at least 3.1.0 and less than 4.0.0. It also depends on the version of gist core being at least 12.1.0 and less than 13.0.0."^^xsd:string ;
	skos:prefLabel "Semantic Versioning Ontology"^^xsd:string ;
	ver:hasVersionNumber [
		a ver:SemanticVersionNumber ;
		ver:uniqueText "X.x.x"^^xsd:string ;
	] ;
        sh:declare ver:_PrefixDeclaration_versioning .

ver:_PrefixDeclaration_versioning a sh:PrefixDeclaration ;
    sh:namespace "https://w3id.org/semanticarts/ns/ontology/versioning/"^^xsd:anyURI;
    sh:prefix "ver".

@sa-bpelakh
Copy link
Collaborator

@pmcb55 Usually we do not include SHACL dependencies in the ontology itself but include an auxiliary annotation file like https://github.com/semanticarts/gist/blob/develop/gistPrefixDeclarations.ttl instead. Would that be sufficient?

@pmcb55
Copy link

pmcb55 commented Oct 23, 2023

Hiya @sa-bpelakh - so I think I get why you have that separate gistPrefixDeclarations.ttl file, as it (at the moment) only contains declarations for common and standard vocabs that don't provide any preferred prefix or namespace triples themselves (since they're all so 'old'!). So that makes perfect sense to me - I've no problem with that at all.

But when creating a new ontology (like this versioning ontology), or evolving an existing one (like gist itself), I don't see any reason not to include the PrefixDeclaration triples directly in the ontology itself, since it's just more descriptive metadata about the ontology itself, just like skos:definition or owl:versionIRI (i.e., I don't think anyone would expect those triples to be in separate file, so what's different for the PrefixDeclaration triples that would justify moving them out into a separate file...?)

@Jamie-SA
Copy link
Contributor

Usually we do not include SHACL dependencies in the ontology itself but include an auxiliary annotation file like https://github.com/semanticarts/gist/blob/develop/gistPrefixDeclarations.ttl instead. Would that be sufficient?

@sa-bpelakh we do have a SHACL PrefixDeclaration in gistCore now.

gist:_PrefixDeclaration_gist
	a sh:PrefixDeclaration ;
	sh:namespace "https://w3id.org/semanticarts/ns/ontology/gist/"^^xsd:anyURI ;
	sh:prefix "gist"^^xsd:string ;

The gistPrefixDeclarations.ttl file includes declarations for all the ontologies that we use that don't have their own PrefixDeclarations. But I think we would recommend putting the declaration in the actual ontology.

As discussed elsewhere, we have discussed, and decided against, importing SHACL (and SKOS).

@rjyounes
Copy link
Collaborator Author

Moved to 12.2.0

@rjyounes rjyounes moved this from In Triage to In Progress in gist Version 12.2.0 Feb 26, 2024
@kchastain703 kchastain703 moved this to In Progress in gist Version 13.0.0 Feb 28, 2024
@rjyounes
Copy link
Collaborator Author

rjyounes commented Mar 7, 2024

I am now realizing that we should have minimally added gist's declaration of its own version so that importing ontologies can implement the versioning ontology by stating their dependencies. We are looking to do this in one of our client projects. @sa-bpelakh @uscholdm What do you think of issuing a 12.1.1 release (it can legitimately be considered an oversight and therefore a patch release) to add this? Aside from the overhead of the new release, is there any difficulty caused by having only that small part of the framework implemented?

@rjyounes rjyounes moved this from In Triage to In Progress in gist Version 13.1.0 Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

5 participants