Skip to content

Commit

Permalink
Wip/report shape (#67)
Browse files Browse the repository at this point in the history
* feat (report): add report shape

* feat (report): add report shape

* feat (report): add report shape

* feat (report): add report shape
  • Loading branch information
tobiasschweizer authored Jan 29, 2025
1 parent 3b9aa59 commit 31719de
Show file tree
Hide file tree
Showing 5 changed files with 159 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
# You can use PyPy versions in python-version.
# For example, pypy2 and pypy3
matrix:
python-version: ["3.9"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v3
Expand Down
9 changes: 8 additions & 1 deletion ontology/ontology.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"rdfs:label": "RESCS SHACL Shapes",
"owl:versionInfo": {
"@type": "xsd:date",
"@value": "2024-09-02"
"@value": "2025-01-29"
}
},
{
Expand Down Expand Up @@ -59,6 +59,13 @@
"@id": "schema:Article"
}
},
{
"@id": "schema:Report",
"@type": "rdfs:Class",
"rdfs:subClassOf": {
"@id": "schema:Article"
}
},
{
"@id": "schema:Dataset",
"@type": "rdfs:Class",
Expand Down
1 change: 1 addition & 0 deletions scripts/test_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ validate "creativework" "creativework"
validate "book" "book"
validate "article" "article"
validate "scholarlyarticle" "scholarlyarticle"
validate "report" "report"
validate "datadownload" "datadownload"
validate "dataset" "dataset"
validate "mediaobject" "mediaobject"
Expand Down
27 changes: 27 additions & 0 deletions shapes/report/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"@context": [
"https://incf.github.io/neuroshapes/contexts/schema.json",
{
"this": "http://rescs.org/dash/report/"
}
],
"@type": "nxv:Schema",
"@id": "http://rescs.org/dash/report",
"imports": [
"http://rescs.org/dash/article"
],
"shapes": [
{
"@id": "this:ReportShape",
"@type": "sh:NodeShape",
"label": "Report",
"comment": "A Report generated by governmental or non-governmental organization.",
"targetClass": "schema:Report",
"and": [
{
"node": "http://rescs.org/dash/article/ArticleShape"
}
]
}
]
}
122 changes: 122 additions & 0 deletions test/report/report.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"@context": {
"@vocab": "http://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"@type": "Report",
"alternateName": "My alias name",
"description": "a description",
"identifier": {
"@id": "http://www.example.com/1"
},
"image": {
"@id": "http://www.example.com/2"
},
"name": "a name",
"sameAs": {
"@id": "http://www.example.com/3"
},
"url": {
"@id": "http://www.example.com/4"
},
"about": {
"@id": "http://www.example.com/5",
"@type": "Thing",
"name": "another thing"
},
"abstract": "a short summary",
"author": {
"@id": "http://www.example.com/6",
"@type": "Person",
"name": "John Doe",
"additionalName": "Joe",
"address": "Fakestreet, Faketown",
"email": "[email protected]",
"familyName": "Doe",
"givenName": "John",
"jobTitle": "developer",
"affiliation": {
"@id": "http://www.example.com/17",
"@type": "Organization",
"name": "my org",
"address": "Fakestreet, Faketown",
"email": "[email protected]",
"contactPoint": {
"@id": "http://www.contact.com/1",
"@type": "ContactPoint",
"name": "a contact point,",
"availableLanguage": "eng",
"contactType": "sales",
"email": "[email protected]"
}
}
},
"citation": "a reference to another work",
"conditionsOfAccess": "CC",
"copyrightHolder": {
"@id": "http://www.example.com/6",
"@type": "Person"
},
"copyrightNotice": "my copyright",
"copyrightYear": 2022,
"creativeWorkStatus": "published",
"dateCreated": {
"@type": "xsd:date",
"@value": "2021-09-23Z"
},
"dateModified": {
"@type": "xsd:date",
"@value": "2021-09-25Z"
},
"datePublished": {
"@type": "xsd:date",
"@value": "2021-09-27Z"
},
"editor": {
"@id": "http://www.example.com/6",
"@type": "Person"
},
"encodingFormat": "text/plain",
"genre": "creative",
"hasPart": {
"@id": "http://www.example.com/8",
"@type": "CreativeWork",
"name": "another work",
"conditionsOfAccess": "CC",
"author": {
"@id": "http://www.example.com/6",
"@type": "Person"
},
"inLanguage": "eng"
},
"inLanguage": "eng",
"isAccessibleForFree": true,
"keywords": [
"creative",
"work",
{
"@id": "http://www.taxonomy.com/1"
}
],
"license": {
"@id": "http://www.creativecommons.com/cc"
},
"maintainer": {
"@id": "http://www.example.com/6",
"@type": "Person",
"name": "John Doe"
},
"mentions": {
"@id": "http://www.example.com/5",
"@type": "Thing",
"name": "another thing"
},
"position": 1,
"publisher": {
"@id": "http://www.example.com/6",
"@type": "Person"
},
"articleBody": "The article's content ...",
"pageEnd": 100,
"pageStart": 50
}

0 comments on commit 31719de

Please sign in to comment.