Skip to content

Commit

Permalink
Merge pull request #187 from psychoinformatics-de/towards-v1
Browse files Browse the repository at this point in the history
Introduce a `properties` schema
  • Loading branch information
mih authored Dec 10, 2024
2 parents fc923ff + afdfe53 commit d3292d3
Show file tree
Hide file tree
Showing 8 changed files with 199 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ try:
all: build/mkdocs-site

build/linkml-docs: \
build/linkml-docs/s/properties/unreleased \
build/linkml-docs/s/thing/unreleased \
build/linkml-docs/s/prov/unreleased \
build/linkml-docs/s/distribution/unreleased \
Expand Down Expand Up @@ -51,11 +52,12 @@ check: check-models check-validation

# add additional schemas to lint here
check-models: \
checkmodel/properties/unreleased \
checkmodel/thing/unreleased \
checkmodel/prov/unreleased \
checkmodel/distribution/unreleased \
checkmodel/datalad-dataset/unreleased
# checkmodel/sdd/unreleased
checkmodel/datalad-dataset/unreleased \
checkmodel/sdd/unreleased
checkmodel/%: src/%.yaml
@echo [Check $<]
@echo "Run linter"
Expand Down Expand Up @@ -83,7 +85,7 @@ checkmodel/%: src/%.yaml
# respective validation targets, because some tests rely on these
# converted formats
check-validation: \
convertexamples/thing/unreleased \
convertexamples/properties/unreleased \
checkvalidation/thing/unreleased \
convertexamples/prov/unreleased \
checkvalidation/prov/unreleased \
Expand All @@ -107,6 +109,7 @@ checkinvalid/%: src/%/validation src/%.yaml
done

convert-examples: \
convertexamples/properties/unreleased \
convertexamples/thing/unreleased \
convertexamples/prov/unreleased \
convertexamples/distribution/unreleased \
Expand Down
1 change: 1 addition & 0 deletions extra-docs/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ALL CONTENT HERE IS UNRELEASED AND MAY CHANGE ANY TIME

- [Thing schema](s/thing/unreleased/index.md)
- [Properties schema](s/properties/unreleased/index.md)
- [Provenance schema](s/prov/unreleased/index.md)
- [Data distribution schema](s/distribution/unreleased/index.md)
- [DataLad dataset schema](s/datalad-dataset/unreleased/index.md)
Expand Down
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ nav:
- About: about.md
- Schemas:
- Thing (unreleased): s/thing/unreleased/index.md
- Properties (unreleased): s/properties/unreleased/index.md
- Provenance (unreleased): s/prov/unreleased/index.md
- Distribution (unreleased): s/distribution/unreleased/index.md
- DataLad dataset (unreleased): s/datalad-dataset/unreleased/index.md
Expand All @@ -15,6 +16,7 @@ plugins:
redirect_maps:
# map unversioned URLs to the latest version
's/thing/index.md': 's/thing/unreleased/index.md'
's/properties/index.md': 's/properties/unreleased/index.md'
's/prov/index.md': 's/prov/unreleased/index.md'
's/distribution/index.md': 's/distribution/unreleased/index.md'
's/datalad-dataset/index.md': 's/datalad-dataset/unreleased/index.md'
Expand Down
172 changes: 172 additions & 0 deletions src/properties/unreleased.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
id: https://concepts.datalad.org/s/properties/unreleased
name: properties
version: UNRELEASED
status: bibo:status/draft
title: Collection of common properties for use in schemas
description: |
This schema provides a collection of common properties for use in other
schemas. It can be imported directly into other linkml schemas, or
any of its individual property definitions can be used by their
URI as vocabulary components or definitions (e.g., `dlprops:name`
identified by this [URI](`name`)).
Class definitions are only included insofar as they define ranges
for particular property slots.
Slot names use the plural form whenever they are directly declared as
"multivalued" in this schema, otherwise the singular form is used for
the slot name. The `slot_uri` always uses the singular form.
Every property declared here is mapped to standard/established vocabularies.
The schema definition is available as
- [JSON-LD context](../unreleased.jsonld)
- [LinkML YAML](../unreleased.yaml)
- [OWL TTL](../unreleased.owl.ttl)
comments:
- ALL CONTENT HERE IS UNRELEASED AND MAY CHANGE ANY TIME

license: MIT

prefixes:
ADMS: http://www.w3.org/ns/adms#
bibo: http://purl.org/ontology/bibo/
dcterms: http://purl.org/dc/terms/
dlprops: https://concepts.datalad.org/s/properties/unreleased/
foaf: http://xmlns.com/foaf/0.1/
linkml: https://w3id.org/linkml/
obo: http://purl.obolibrary.org/obo/
owl: http://www.w3.org/2002/07/owl#
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs: http://www.w3.org/2000/01/rdf-schema#
sio: http://semanticscience.org/resource/
skos: http://www.w3.org/2004/02/skos/core#

default_prefix: dlprops

imports:
- linkml:types

slots:
conforms_to:
slot_uri: dlprops:conforms_to
description: >-
An established standard to which the subject conforms.
range: uriorcurie
comments:
- This property SHOULD be used to indicate a model, schema, ontology, view or profile that the subject conforms to.
exact_mappings:
- dcterms:conformsTo

description:
slot_uri: dlprops:description
description: A free-text account of the subject.
exact_mappings:
- dcterms:description
- rdfs:comment
range: string

identifiers:
slot_uri: dlprops:identifier
description: An unambiguous reference to the subject within a given context.
exact_mappings:
- dcterms:identifier
- schema:identifier
- ADMS:identifier
range: Identifier
inlined: true
inlined_as_list: true
multivalued: true

is_about:
slot_uri: dlprops:is_about
description: >-
A relation of an information artifact to the subject, such as
a URL identifying the topic of a document.
range: uriorcurie
exact_mappings:
- schema:about
- obo:IAO_0000136

name:
slot_uri: dlprops:name
description: >-
Name of the subject. A name is closely related to a `title`, but often
more compact and identifier-like, but without the implication of
uniqueness of an identifier. A name is often used by technical systems
to display an item in an organizational structure, such as a file
in a directory hierarchy.
exact_mappings:
- rdfs:label
- schema:name
- foaf:name
close_mappings:
- dlprops:title
range: string

notation:
slot_uri: dlprops:notation
description: >-
String of characters such as "T58:5" or "30:4833" used to uniquely
identify a concept within the scope of a given concept scheme.
range: string
exact_mappings:
- skos:notation

same_as:
slot_uri: dlprops:same_as
description: >-
Declares that the subject and an object are equal.
Can be used to indicate a URL of a reference Web page that unambiguously
indicates the subject's identity. For example, the URL of the subject's
Wikipedia page, Wikidata entry, or official website.
range: uriorcurie
exact_mappings:
- owl:sameAs
close_mappings:
- schema:sameAs

schema_agency:
slot_uri: dlprops:schema_agency
description: >-
Name of the agency that issued an identifier.
range: uriorcurie
exact_mappings:
- ADMS:schemaAgency

title:
slot_uri: dlprops:title
description: >-
A summarily description of the subject. It is closely related to
a `name`, but often less compact and more descriptive. Typically used for
documents.
exact_mappings:
- dcterms:title
- sio:SIO_000185
related_mappings:
- schema:name
range: string


classes:
Identifier:
class_uri: dlprops:Identifier
description: >-
An identifier is a label that uniquely identifies an item in a
particular context. Some identifiers are globally unique. All
identifiers are unique within the scope of their issuing
agency.
slots:
- notation
- schema_agency
slot_usage:
notation:
required: true
schema_agency:
required: true
exact_mappings:
- ADMS:Identifier
see_also:
- https://semiceu.github.io/ADMS/releases/2.00/#Identifier
5 changes: 5 additions & 0 deletions src/properties/unreleased/examples/Identifier-01-minimal.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"notation": "0000-0001-6398-6370",
"schema_agency": "https://orcid.org",
"@type": "Identifier"
}
4 changes: 4 additions & 0 deletions src/properties/unreleased/examples/Identifier-01-minimal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# For any identifier, the actual notation and the issuing agency
# must be specified.
notation: 0000-0001-6398-6370
schema_agency: https://orcid.org
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
schema: src/properties/unreleased.yaml
target_class: Identifier
data_sources:
- src/properties/unreleased/examples/Identifier-01-minimal.yaml
plugins:
JsonschemaValidationPlugin:
closed: true
include_range_class_descendants: false
RecommendedSlotsPlugin:

0 comments on commit d3292d3

Please sign in to comment.