Skip to content

Commit

Permalink
Merge pull request #191 from psychoinformatics-de/towards-v1
Browse files Browse the repository at this point in the history
Factor out a roles schema
  • Loading branch information
mih authored Dec 13, 2024
2 parents 323397d + 854958d commit 0c96efa
Show file tree
Hide file tree
Showing 38 changed files with 1,828 additions and 1,778 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ all: build/mkdocs-site
build/linkml-docs: \
build/linkml-docs/s/properties/unreleased \
build/linkml-docs/s/thing/unreleased \
build/linkml-docs/s/roles/unreleased \
build/linkml-docs/s/prov/unreleased \
build/linkml-docs/s/identifiers/unreleased \
build/linkml-docs/s/distribution/unreleased \
Expand Down Expand Up @@ -55,6 +56,7 @@ check: check-models check-validation
check-models: \
checkmodel/properties/unreleased \
checkmodel/thing/unreleased \
checkmodel/roles/unreleased \
checkmodel/prov/unreleased \
checkmodel/identifiers/unreleased \
checkmodel/distribution/unreleased \
Expand Down Expand Up @@ -89,6 +91,8 @@ checkmodel/%: src/%.yaml
check-validation: \
convertexamples/thing/unreleased \
checkvalidation/thing/unreleased \
convertexamples/roles/unreleased \
checkvalidation/roles/unreleased \
convertexamples/prov/unreleased \
checkvalidation/prov/unreleased \
convertexamples/identifiers/unreleased \
Expand All @@ -114,6 +118,7 @@ checkinvalid/%: src/%/validation src/%.yaml

convert-examples: \
convertexamples/thing/unreleased \
convertexamples/roles/unreleased \
convertexamples/prov/unreleased \
convertexamples/identifiers/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
Expand Up @@ -3,6 +3,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)
- [Identifiers schema](s/identifiers/unreleased/index.md)
- [Roles schema](s/roles/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 @@ -7,6 +7,7 @@ nav:
- Thing (unreleased): s/thing/unreleased/index.md
- Properties (unreleased): s/properties/unreleased/index.md
- Identifiers (unreleased): s/identifiers/unreleased/index.md
- Roles (unreleased): s/roles/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 @@ -19,6 +20,7 @@ plugins:
's/thing/index.md': 's/thing/unreleased/index.md'
's/properties/index.md': 's/properties/unreleased/index.md'
's/identifiers/index.md': 's/identifiers/unreleased/index.md'
's/roles/index.md': 's/roles/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
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"qualified_part": [
{
"name": "README.md",
"entity": "gitsha:f776e30f386b83e13196eab6445f30d3ab54c155"
"object": "gitsha:f776e30f386b83e13196eab6445f30d3ab54c155"
}
],
"@type": "Distribution"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ has_part:
- https://github.com/datalad-datasets/machinelearning-books.git
qualified_part:
name: README.md
entity: gitsha:f776e30f386b83e13196eab6445f30d3ab54c155
object: gitsha:f776e30f386b83e13196eab6445f30d3ab54c155
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"qualified_part": [
{
"name": "table.csv",
"entity": "annex-key:MD5E-s3214--ba1f2511fc30423bdbb183fe33f3dd0f.csv"
"object": "annex-key:MD5E-s3214--ba1f2511fc30423bdbb183fe33f3dd0f.csv"
},
{
"name": "index.html",
"entity": "gitsha:e12e9505cff5417f594d719b99720b4c39d86434"
"object": "gitsha:e12e9505cff5417f594d719b99720b4c39d86434"
}
],
"@type": "Distribution"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ id: gitsha:9a48c2bf7e97a081f2b1ab68eb909bbfc86267be
# of metadata records on dataset aspects) there is no need to
# reiterate any information here: just link content under a name
qualified_part:
- entity: annex-key:MD5E-s3214--ba1f2511fc30423bdbb183fe33f3dd0f.csv
- object: annex-key:MD5E-s3214--ba1f2511fc30423bdbb183fe33f3dd0f.csv
name: table.csv
- entity: gitsha:e12e9505cff5417f594d719b99720b4c39d86434
- object: gitsha:e12e9505cff5417f594d719b99720b4c39d86434
name: index.html
# this tree is the top-level tree of a particular commit
is_distribution_of: gitsha:8d6f033bb2a6109b2c4d64d6f27b0feb181e4d0f
4 changes: 3 additions & 1 deletion src/distribution/unreleased.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -579,11 +579,13 @@ classes:
- dcat:Relationship
slots:
- name
- entity
- object
slot_usage:
name:
description: >-
The name of the part within the containing entity.
object:
range: Entity
comments:
- This class is a key element of the data model. It enables referencing
a particular resource (e.g., a file's content, or versioned directory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@
}
],
"schema_type": "dldist:Distribution",
"qualified_relation": [
"qualified_relations": [
{
"had_role": [
"object": "obo:NCIT_C95650",
"had_roles": [
"obo:NCIT_C42645"
],
"entity": [
"obo:NCIT_C95650"
],
"schema_type": "dlprov:EntityInfluence"
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
id: exthisdsver:./file.jpeg
# two approaches:
# first using the common qualified-relation pattern.
qualified_relation:
- entity:
# encapsulated image data
- obo:NCIT_C95650
had_role:
qualified_relations:
# encapsulated image data
- object: obo:NCIT_C95650
had_roles:
# data type
- obo:NCIT_C42645
# when standardized terms for identifying data types are not available,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"qualified_part": [
{
"name": "table.csv",
"entity": "https://concepts.datalad.org/ns/annex-key/MD5E-s3214--ba1f2511fc30423bdbb183fe33f3dd0f.csv"
"object": "https://concepts.datalad.org/ns/annex-key/MD5E-s3214--ba1f2511fc30423bdbb183fe33f3dd0f.csv"
},
{
"name": "index.html",
"entity": "https://concepts.datalad.org/ns/gitsha/e12e9505cff5417f594d719b99720b4c39d86434"
"object": "https://concepts.datalad.org/ns/gitsha/e12e9505cff5417f594d719b99720b4c39d86434"
}
],
"@type": "Distribution"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ id: https://concepts.datalad.org/ns/gitsha/9a48c2bf7e97a081f2b1ab68eb909bbfc8626
# of metadata records on dataset aspects) there is no need to
# reiterate any information here: just link content under a name
qualified_part:
- entity: https://concepts.datalad.org/ns/annex-key/MD5E-s3214--ba1f2511fc30423bdbb183fe33f3dd0f.csv
- object: https://concepts.datalad.org/ns/annex-key/MD5E-s3214--ba1f2511fc30423bdbb183fe33f3dd0f.csv
name: table.csv
- entity: https://concepts.datalad.org/ns/gitsha/e12e9505cff5417f594d719b99720b4c39d86434
- object: https://concepts.datalad.org/ns/gitsha/e12e9505cff5417f594d719b99720b4c39d86434
name: index.html
# this tree is the top-level tree of a particular commit
is_distribution_of: https://concepts.datalad.org/ns/gitsha/8d6f033bb2a6109b2c4d64d6f27b0feb181e4d0f
4 changes: 2 additions & 2 deletions src/distribution/unreleased/examples/Distribution-parts.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
"qualified_part": [
{
"name": "file.txt",
"entity": "exthisdsver:./archive.zip/subdir/file.txt"
"object": "exthisdsver:./archive.zip/subdir/file.txt"
}
]
}
],
"qualified_part": [
{
"name": "subdir",
"entity": "exthisdsver:./archive.zip/subdir"
"object": "exthisdsver:./archive.zip/subdir"
}
],
"@type": "Distribution"
Expand Down
4 changes: 2 additions & 2 deletions src/distribution/unreleased/examples/Distribution-parts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ has_part:
value: "A file"
qualified_part:
- name: file.txt
entity: exthisdsver:./archive.zip/subdir/file.txt
object: exthisdsver:./archive.zip/subdir/file.txt
qualified_part:
- name: subdir
entity: exthisdsver:./archive.zip/subdir
object: exthisdsver:./archive.zip/subdir
18 changes: 8 additions & 10 deletions src/distribution/unreleased/examples/Resource-gitcommit.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"type": "obo:NCIT_C25625",
"qualified_association": [
{
"had_role": [
"object": "exthisds:#[email protected]",
"had_roles": [
"marcrel:aut"
],
"agent": "exthisds:#[email protected]"
]
}
],
"ended_at": "2001-02-28T18:27:04+02:00"
Expand All @@ -21,10 +21,10 @@
"type": "obo:NCIT_C42882",
"qualified_association": [
{
"had_role": [
"object": "exthisds:#[email protected]",
"had_roles": [
"marcrel:cre"
],
"agent": "exthisds:#[email protected]"
]
}
],
"was_informed_by": [
Expand Down Expand Up @@ -67,12 +67,10 @@
"schema_type": "dldist:Resource",
"qualified_derivation": [
{
"had_role": [
"object": "https://concepts.datalad.org/ns/gitsha/a52963ce19a3e3628e9976555ffc8c422b29f054",
"had_roles": [
"owl:priorVersion"
],
"entity": [
"https://concepts.datalad.org/ns/gitsha/a52963ce19a3e3628e9976555ffc8c422b29f054"
],
"schema_type": "dlprov:Derivation",
"had_activity": "obo:NCIT_C25446"
}
Expand Down
14 changes: 6 additions & 8 deletions src/distribution/unreleased/examples/Resource-gitcommit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,14 @@ has_attributes:
version: 8d6f033bb2a6109b2c4d64d6f27b0feb181e4d0f
qualified_derivation:
# parent commit(s)
- entity:
# in a derivation any number of entities can play a role
- https://concepts.datalad.org/ns/gitsha/a52963ce19a3e3628e9976555ffc8c422b29f054
- object: https://concepts.datalad.org/ns/gitsha/a52963ce19a3e3628e9976555ffc8c422b29f054
# "change", ie. unknown what was done
# there are plenty of terms to drill down on the nature
# of the derivation
# - obo:NCIT_C64266: merge
# - obo:NCIT_C64911: add
had_activity: obo:NCIT_C25446
had_role:
had_roles:
- owl:priorVersion
relations:
# author activity
Expand All @@ -49,8 +47,8 @@ relations:
ended_at: "2001-02-28T18:27:04+02:00"
qualified_association:
# author of the commit
- agent: exthisds:#[email protected]
had_role:
- object: exthisds:#[email protected]
had_roles:
- marcrel:aut
# commit activity
- id: https://concepts.datalad.org/ns/gitsha/8d6f033bb2a6109b2c4d64d6f27b0feb181e4d0f#committing
Expand All @@ -61,8 +59,8 @@ relations:
ended_at: "2002-05-30T09:30:10+06:00"
qualified_association:
# creator of the commit
- agent: exthisds:#[email protected]
had_role:
- object: exthisds:#[email protected]
had_roles:
- marcrel:cre
was_informed_by:
- https://concepts.datalad.org/ns/gitsha/8d6f033bb2a6109b2c4d64d6f27b0feb181e4d0f#authoring
Expand Down
12 changes: 6 additions & 6 deletions src/distribution/unreleased/examples/Resource-study.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,18 @@
"type": "obo:NCIT_C71104",
"qualified_association": [
{
"had_role": [
"object": "exthisds:#s001",
"had_roles": [
"obo:NCIT_C142710",
"obo:NCIT_C94342"
],
"agent": "exthisds:#s001"
]
},
{
"had_role": [
"object": "exthisds:#s002",
"had_roles": [
"obo:NCIT_C142710",
"obo:NCIT_C173188"
],
"agent": "exthisds:#s002"
]
}
]
}
Expand Down
8 changes: 4 additions & 4 deletions src/distribution/unreleased/examples/Resource-study.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ relations:
# registered clinical trial
type: obo:NCIT_C71104
qualified_association:
- agent: exthisds:#s001
had_role:
- object: exthisds:#s001
had_roles:
# study participant
- obo:NCIT_C142710
# healthy control
- obo:NCIT_C94342
- agent: exthisds:#s002
had_role:
- object: exthisds:#s002
had_roles:
- obo:NCIT_C142710
# subject Assigned to Protocol Treatment Arm
- obo:NCIT_C173188
Expand Down
6 changes: 6 additions & 0 deletions src/identifiers/unreleased/examples/DOI-02-complete.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"notation": "10.2760/271009",
"creator": "https://op.europa.eu",
"schema_agency": "Publications Office of the European Union",
"@type": "DOI"
}
Loading

0 comments on commit 0c96efa

Please sign in to comment.