Skip to content

Commit

Permalink
Break the spell
Browse files Browse the repository at this point in the history
This is a fairly dirty commit that implements the conclusions from
#30 (comment)

This shows the path forward, but it does it by cutting quite a few
corners that need fixing in subsequent changes (e.g., dataset can only
have annexed files right now).

However, none of these missing changes should be problematic -- merely
laborious. I do not know when I can come back to this, to I prefer
committing this state. it should pass all tests.
  • Loading branch information
mih committed Feb 14, 2024
1 parent f768643 commit 124253c
Show file tree
Hide file tree
Showing 31 changed files with 417 additions and 97 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ build/context.jsonld: src/linkml/ontology.yaml
build/linkml-docs: \
build/linkml-docs/ontology \
build/linkml-docs/data-access-schema \
build/linkml-docs/git-provenance-schema \
build/linkml-docs/datalad-dataset-version-schema
# build/linkml-docs/git-provenance-schema
build/linkml-docs/%: src/linkml/%.yaml src/extra-docs/%
gen-doc \
--mergeimports \
Expand All @@ -51,9 +51,9 @@ check: check-models check-validation
# add additional schemas to lint here
check-models: \
check-model-data-access-schema \
check-model-git-provenance-schema \
check-model-datalad-dataset-version-schema \
check-model-ontology
# check-model-git-provenance-schema
check-model-%: src/linkml/%.yaml
@echo [Check $<]
@echo "Run linter"
Expand Down Expand Up @@ -82,11 +82,11 @@ check-model-%: src/linkml/%.yaml
check-validation: \
convert-examples-data-access-schema \
check-validation-data-access-schema \
convert-examples-git-provenance-schema \
check-validation-git-provenance-schema \
convert-examples-datalad-dataset-version-schema \
check-validation-datalad-dataset-version-schema \
convert-examples-ontology
# convert-examples-git-provenance-schema
# check-validation-git-provenance-schema
check-validation-%:
$(MAKE) check-valid-validation-$* check-invalid-validation-$*
check-valid-validation-%: tests/%/validation src/linkml/%.yaml
Expand All @@ -103,8 +103,8 @@ check-invalid-validation-%: tests/%/validation src/linkml/%.yaml
convert-examples: \
convert-examples-data-access-schema \
convert-examples-datalad-dataset-version-schema \
convert-examples-git-provenance-schema \
convert-examples-ontology
# convert-examples-git-provenance-schema
convert-examples-%: src/linkml/%.yaml src/examples/%
# loop over all examples, skip the schema file itself
for ex in $^/*.yaml; do \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"meta_id": "annex:0b76362c-aa27-11ee-be29-b3b123281259",
"uuid": "0b76362c-aa27-11ee-be29-b3b123281259",
"endpoint_url": "s3://obj.example.com/v3",
"@type": "AnnexRemoteSE"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@prefix annex: <https://concepts.datalad.org/namespace/annex-uuid/> .
@prefix dlco: <https://concepts.datalad.org/ontology/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

annex:0b76362c-aa27-11ee-be29-b3b123281259 a dlco:AnnexRemoteSE ;
dlco:endpoint_url "s3://obj.example.com/v3"^^xsd:anyURI ;
dlco:uuid "0b76362c-aa27-11ee-be29-b3b123281259"^^<http://purl.obolibrary.org/obo/NCIT_C54100> .


Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
meta_id: annex:0b76362c-aa27-11ee-be29-b3b123281259
uuid: 0b76362c-aa27-11ee-be29-b3b123281259
# uses a standard DataService slot to encode the remote
# access target
endpoint_url: s3://obj.example.com/v3
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"meta_id": "annex:0b76362c-aa27-11ee-be29-b3b123281259",
"uuid": "0b76362c-aa27-11ee-be29-b3b123281259",
"@type": "AnnexRemoteSE"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@prefix annex: <https://concepts.datalad.org/namespace/annex-uuid/> .
@prefix dlco: <https://concepts.datalad.org/ontology/> .

annex:0b76362c-aa27-11ee-be29-b3b123281259 a dlco:AnnexRemoteSE ;
dlco:uuid "0b76362c-aa27-11ee-be29-b3b123281259"^^<http://purl.obolibrary.org/obo/NCIT_C54100> .


Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
meta_id: annex:0b76362c-aa27-11ee-be29-b3b123281259
uuid: 0b76362c-aa27-11ee-be29-b3b123281259
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"is_version_of": {
"uuid": "0b76362c-aa27-11ee-be29-b3b123281259"
},
"has_annex_remote": {
"annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf": {
"meta_id": "annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf",
"uuid": "7e0bf3e7-7d46-4093-813e-b4009826c3bf"
}
},
"has_part": {
"gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58": {
"meta_id": "gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58",
"gitsha": "b94ef1797f7bfc1ac979be122e1b538bbb0d1d58",
"distribution": {
"qualified_access": {
"relation": "annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf",
"access_id": "MD5E-s3425--32a617360d10e3dcbfdd0885e8d64ab8.txt"
},
"byte_size": 3425,
"checksum": {
"algorithm": "md5",
"digest": "32a617360d10e3dcbfdd0885e8d64ab8"
}
},
"meta_type": "dlco:AnnexedFileSE"
}
},
"qualified_part": [
{
"relation": "gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58",
"at_location": "README.txt"
}
],
"meta_type": "dlco:DataladDatasetVersionSE",
"@type": "DataladDatasetVersionSE"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@prefix DCAT: <http://www.w3.org/ns/dcat#> .
@prefix annex: <https://concepts.datalad.org/namespace/annex-uuid/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix dlco: <https://concepts.datalad.org/ontology/> .
@prefix gitsha: <https://concepts.datalad.org/namespace/gitsha/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix spdx: <http://spdx.org/rdf/terms#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf a dlco:AnnexRemoteSE ;
dlco:uuid "7e0bf3e7-7d46-4093-813e-b4009826c3bf"^^<http://purl.obolibrary.org/obo/NCIT_C54100> .

gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58 dlco:distribution [ a dlco:AnnexDistributionSE ;
spdx:checksum [ a spdx:Checksum ;
spdx:algorithm "md5"^^xsd:anyURI ;
spdx:checksumValue "32a617360d10e3dcbfdd0885e8d64ab8"^^xsd:hexBinary ] ;
DCAT:byteSize "3425"^^xsd:nonNegativeInteger ;
dlco:qualified_access [ a dlco:QualifiedAnnexAccessSE ;
dct:relation annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf ;
dlco:access_id "MD5E-s3425--32a617360d10e3dcbfdd0885e8d64ab8.txt" ] ] ;
dlco:gitsha "b94ef1797f7bfc1ac979be122e1b538bbb0d1d58"^^dlco:sha1 ;
dlco:meta_type "dlco:AnnexedFileSE"^^xsd:anyURI .

[] dct:hasPart gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58 ;
DCAT:isVersionOf [ a dlco:DataladDatasetSE ;
dlco:uuid "0b76362c-aa27-11ee-be29-b3b123281259"^^<http://purl.obolibrary.org/obo/NCIT_C54100> ] ;
dlco:has_annex_remote annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf ;
dlco:meta_type "dlco:DataladDatasetVersionSE"^^xsd:anyURI ;
dlco:qualified_part [ a dlco:QualifiedPartSE ;
dct:relation gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58 ;
prov:atLocation "README.txt"^^dlco:PosixRelPath ] .


Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ has_annex_remote:
uuid: 7e0bf3e7-7d46-4093-813e-b4009826c3bf
has_part:
gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58:
meta_type: dlco:AnnexedFile
meta_type: dlco:AnnexedFileSE
gitsha: b94ef1797f7bfc1ac979be122e1b538bbb0d1d58
distribution:
byte_size: 3425
Expand All @@ -17,4 +17,4 @@ has_part:
relation: annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf
qualified_part:
- at_location: README.txt
# relation: gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58
relation: gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"is_version_of": {
"uuid": "0b76362c-aa27-11ee-be29-b3b123281259"
},
"meta_type": "dlco:DataladDatasetVersionSE",
"@type": "DataladDatasetVersionSE"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@prefix DCAT: <http://www.w3.org/ns/dcat#> .
@prefix dlco: <https://concepts.datalad.org/ontology/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

[] DCAT:isVersionOf [ a dlco:DataladDatasetSE ;
dlco:uuid "0b76362c-aa27-11ee-be29-b3b123281259"^^<http://purl.obolibrary.org/obo/NCIT_C54100> ] ;
dlco:meta_type "dlco:DataladDatasetVersionSE"^^xsd:anyURI .


Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
is_version_of:
uuid: 0b76362c-aa27-11ee-be29-b3b123281259
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"is_version_of": {
"uuid": "0b76362c-aa27-11ee-be29-b3b123281259"
},
"has_annex_remote": {
"annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf": {
"meta_id": "annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf",
"uuid": "7e0bf3e7-7d46-4093-813e-b4009826c3bf"
}
},
"has_part": {
"gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58": {
"meta_id": "gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58",
"gitsha": "b94ef1797f7bfc1ac979be122e1b538bbb0d1d58",
"distribution": {
"qualified_access": {
"relation": "annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf",
"access_id": "MD5E-s3425--32a617360d10e3dcbfdd0885e8d64ab8.txt"
}
},
"meta_type": "dlco:AnnexedFileSE"
}
},
"meta_type": "dlco:DataladDatasetVersionSE",
"@type": "DataladDatasetVersionSE"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@prefix DCAT: <http://www.w3.org/ns/dcat#> .
@prefix annex: <https://concepts.datalad.org/namespace/annex-uuid/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix dlco: <https://concepts.datalad.org/ontology/> .
@prefix gitsha: <https://concepts.datalad.org/namespace/gitsha/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58 dlco:distribution [ a dlco:AnnexDistributionSE ;
dlco:qualified_access [ a dlco:QualifiedAnnexAccessSE ;
dct:relation annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf ;
dlco:access_id "MD5E-s3425--32a617360d10e3dcbfdd0885e8d64ab8.txt" ] ] ;
dlco:gitsha "b94ef1797f7bfc1ac979be122e1b538bbb0d1d58"^^dlco:sha1 ;
dlco:meta_type "dlco:AnnexedFileSE"^^xsd:anyURI .

annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf a dlco:AnnexRemoteSE ;
dlco:uuid "7e0bf3e7-7d46-4093-813e-b4009826c3bf"^^<http://purl.obolibrary.org/obo/NCIT_C54100> .

[] dct:hasPart gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58 ;
DCAT:isVersionOf [ a dlco:DataladDatasetSE ;
dlco:uuid "0b76362c-aa27-11ee-be29-b3b123281259"^^<http://purl.obolibrary.org/obo/NCIT_C54100> ] ;
dlco:has_annex_remote annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf ;
dlco:meta_type "dlco:DataladDatasetVersionSE"^^xsd:anyURI .


Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
is_version_of:
uuid: 0b76362c-aa27-11ee-be29-b3b123281259
has_annex_remote:
annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf:
uuid: 7e0bf3e7-7d46-4093-813e-b4009826c3bf
has_part:
gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58:
meta_type: dlco:AnnexedFileSE
gitsha: b94ef1797f7bfc1ac979be122e1b538bbb0d1d58
distribution:
qualified_access:
access_id: MD5E-s3425--32a617360d10e3dcbfdd0885e8d64ab8.txt
relation: annex:7e0bf3e7-7d46-4093-813e-b4009826c3bf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"is_version_of": {
"uuid": "0b76362c-aa27-11ee-be29-b3b123281259"
},
"has_part": {
"gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58": {
"meta_id": "gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58",
"gitsha": "b94ef1797f7bfc1ac979be122e1b538bbb0d1d58",
"meta_type": "dlco:AnnexedFileSE"
}
},
"qualified_part": [
{
"relation": "gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58",
"at_location": "README.txt"
}
],
"meta_type": "dlco:DataladDatasetVersionSE",
"@type": "DataladDatasetVersionSE"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@prefix DCAT: <http://www.w3.org/ns/dcat#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix dlco: <https://concepts.datalad.org/ontology/> .
@prefix gitsha: <https://concepts.datalad.org/namespace/gitsha/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58 dlco:gitsha "b94ef1797f7bfc1ac979be122e1b538bbb0d1d58"^^dlco:sha1 ;
dlco:meta_type "dlco:AnnexedFileSE"^^xsd:anyURI .

[] dct:hasPart gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58 ;
DCAT:isVersionOf [ a dlco:DataladDatasetSE ;
dlco:uuid "0b76362c-aa27-11ee-be29-b3b123281259"^^<http://purl.obolibrary.org/obo/NCIT_C54100> ] ;
dlco:meta_type "dlco:DataladDatasetVersionSE"^^xsd:anyURI ;
dlco:qualified_part [ a dlco:QualifiedPartSE ;
dct:relation gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58 ;
prov:atLocation "README.txt"^^dlco:PosixRelPath ] .


Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
is_version_of:
uuid: 0b76362c-aa27-11ee-be29-b3b123281259
has_part:
gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58:
meta_type: dlco:AnnexedFileSE
gitsha: b94ef1797f7bfc1ac979be122e1b538bbb0d1d58
qualified_part:
- at_location: README.txt
# key aspect is this reference-by-id of the inline part specification
# above
relation: gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"is_version_of": {
"uuid": "0b76362c-aa27-11ee-be29-b3b123281259"
},
"has_part": {
"gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58": {
"meta_id": "gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58",
"gitsha": "b94ef1797f7bfc1ac979be122e1b538bbb0d1d58",
"meta_type": "dlco:AnnexedFileSE"
}
},
"meta_type": "dlco:DataladDatasetVersionSE",
"@type": "DataladDatasetVersionSE"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@prefix DCAT: <http://www.w3.org/ns/dcat#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix dlco: <https://concepts.datalad.org/ontology/> .
@prefix gitsha: <https://concepts.datalad.org/namespace/gitsha/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58 dlco:gitsha "b94ef1797f7bfc1ac979be122e1b538bbb0d1d58"^^dlco:sha1 ;
dlco:meta_type "dlco:AnnexedFileSE"^^xsd:anyURI .

[] dct:hasPart gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58 ;
DCAT:isVersionOf [ a dlco:DataladDatasetSE ;
dlco:uuid "0b76362c-aa27-11ee-be29-b3b123281259"^^<http://purl.obolibrary.org/obo/NCIT_C54100> ] ;
dlco:meta_type "dlco:DataladDatasetVersionSE"^^xsd:anyURI .


Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
is_version_of:
uuid: 0b76362c-aa27-11ee-be29-b3b123281259
has_part:
gitsha:b94ef1797f7bfc1ac979be122e1b538bbb0d1d58:
# this type-designator slot determines the object type used to
# interpret this inline record
meta_type: dlco:AnnexedFileSE
gitsha: b94ef1797f7bfc1ac979be122e1b538bbb0d1d58

This file was deleted.

Loading

0 comments on commit 124253c

Please sign in to comment.