Skip to content

Commit

Permalink
Merge pull request #104 from psychoinformatics-de/bf-103
Browse files Browse the repository at this point in the history
Improve `size[bytes]` definition
  • Loading branch information
mih authored Jul 28, 2023
2 parents 3149927 + 8f411d8 commit e3aaf3b
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 16 deletions.
2 changes: 1 addition & 1 deletion datalad_tabby/io/conventions/tby-ds1/authors.ctx.jsonld
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"schema": "https://schema.org",
"schema": "https://schema.org/",
"email": "schema:email",
"name": "schema:name"
}
2 changes: 1 addition & 1 deletion datalad_tabby/io/conventions/tby-ds1/dataset.ctx.jsonld
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dcterms": "https://purl.org/dc/terms/",
"schema": "https://schema.org",
"schema": "https://schema.org/",
"author": "schema:author",
"description": "schema:description",
"hasPart": "dcterms:hasPart",
Expand Down
9 changes: 7 additions & 2 deletions datalad_tabby/io/conventions/tby-ds1/files.ctx.jsonld
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"afo": "http://purl.allotrope.org/ontologies/result#",
"nfo": "https://www.semanticdesktop.org/ontologies/2007/03/22/nfo/#",
"obo": "https://purl.obolibrary.org/obo/",
"schema": "https://schema.org",
"size[bytes]": "schema:contentSize",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"size[bytes]": {
"@id": "nfo:fileSize",
"@type": "xsd:integer"
},
"checksum[md5]": "obo:NCIT_C171276",
"path[POSIX]": {
"@id": "schema:name",
Expand Down
1 change: 0 additions & 1 deletion datalad_tabby/io/conventions/tby-ds1/files.override.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"@id": "{checksum_md5_[0]}",
"@type": "schema:DigitalDocument"
}
2 changes: 1 addition & 1 deletion datalad_tabby/io/conventions/tby-sd1/authors.ctx.jsonld
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"bibo": "https://purl.org/ontology/bibo/",
"obo": "https://purl.obolibrary.org/",
"schema": "https://schema.org",
"schema": "https://schema.org/",
"affiliation": "schema:affiliation",
"email": "schema:email",
"name": "schema:name",
Expand Down
2 changes: 1 addition & 1 deletion datalad_tabby/io/conventions/tby-sd1/dataset.ctx.jsonld
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"bibo": "https://purl.org/ontology/bibo/",
"obo": "https://purl.obolibrary.org/",
"schema": "https://schema.org",
"schema": "https://schema.org/",
"author": "schema:author",
"citation": "schema:citation",
"description": "schema:description",
Expand Down
2 changes: 1 addition & 1 deletion datalad_tabby/io/conventions/tby-sd1/funding.ctx.jsonld
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"schema": "https://schema.org",
"schema": "https://schema.org/",
"funder": "schema:funder",
"grant_id": "schema:identifier",
"title": "schema:title"
Expand Down
2 changes: 1 addition & 1 deletion datalad_tabby/tests/data/demorecord/tabbydemo.ctx.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"bibo": "https://purl.org/ontology/bibo/",
"dpv": "https://w3id.org/dpv#",
"obo": "https://purl.obolibrary.org/",
"schema": "https://schema.org"
"schema": "https://schema.org/"
}
2 changes: 1 addition & 1 deletion datalad_tabby/tests/test_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_load_compaction(tabby_tsv_record, tmp_path):
# but compaction takes it out, when we define all relevant IRIs
# in a global compaction context
compaction = {
"schema": "https://schema.org",
"schema": "https://schema.org/",
}
compaction_fname = tmp_path / 'compact.jsonld'
compaction_fname.write_text(json.dumps(compaction))
Expand Down
16 changes: 11 additions & 5 deletions docs/source/conventions/tby-ds1_demo/compacted.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,37 @@
"@context": {
"afo": "http://purl.allotrope.org/ontologies/result#",
"dcterms": "https://purl.org/dc/terms/",
"nfo": "https://www.semanticdesktop.org/ontologies/2007/03/22/nfo/#",
"obo": "https://purl.obolibrary.org/obo/",
"schema": "https://schema.org"
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"@type": "schema:Dataset",
"dcterms:hasPart": [
{
"@id": "529ff606a38b37a2e5478c1abfeca231",
"@type": "schema:DigitalDocument",
"obo:NCIT_C171276": "529ff606a38b37a2e5478c1abfeca231",
"schema:contentSize": "1300",
"schema:contentUrl": "https://raw.githubusercontent.com/psychoinformatics-de/datalad-tabby/2738d8a12fb138d3fe107c6bee443c13c9f4f6ea/LICENSE",
"schema:name": {
"@type": "afo:AFR_0001928",
"@value": "LICENSE"
},
"nfo:fileSize": {
"@type": "xsd:integer",
"@value": "1300"
}
},
{
"@id": "ef2979a70a8d95a24cd1402bd68e1c4a",
"@type": "schema:DigitalDocument",
"obo:NCIT_C171276": "ef2979a70a8d95a24cd1402bd68e1c4a",
"schema:contentSize": "1755",
"schema:contentUrl": "https://raw.githubusercontent.com/psychoinformatics-de/datalad-tabby/2738d8a12fb138d3fe107c6bee443c13c9f4f6ea/docs/README.md",
"schema:name": {
"@type": "afo:AFR_0001928",
"@value": "docs/README.md"
},
"nfo:fileSize": {
"@type": "xsd:integer",
"@value": "1755"
}
}
],
Expand Down
4 changes: 3 additions & 1 deletion docs/source/conventions/tby-ds1_demo/ds1-compact.jsonld
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"afo": "http://purl.allotrope.org/ontologies/result#",
"dcterms": "https://purl.org/dc/terms/",
"nfo": "https://www.semanticdesktop.org/ontologies/2007/03/22/nfo/#",
"obo": "https://purl.obolibrary.org/obo/",
"schema": "https://schema.org"
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#"
}

0 comments on commit e3aaf3b

Please sign in to comment.