Skip to content

Commit

Permalink
ruuts-c04-metadata (#57)
Browse files Browse the repository at this point in the history
* added C04 credit class metadata, ops, amended shacl graphs

* ops file for credit class

* updated credit class jsonld to conform to shacl graph

* updated with @blushi's suggestions

* changed verificationMethod to verificationMethods

* removed duplicate verification method

* refactor: remove C04 class example and refactor ttls

* fix: use verificationMethod or plural

---------

Co-authored-by: blushi <[email protected]>
  • Loading branch information
S4mmyb and blushi committed Aug 14, 2023
1 parent c43f5ec commit 43d2b8a
Show file tree
Hide file tree
Showing 5 changed files with 331 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ RUN ./verify_jena.sh
ENV PATH="${PATH}:/app/apache-jena/bin/"
ENV PYTHONUNBUFFERED=1
COPY . .
ENTRYPOINT ["/app/shacl_validate.py"]
ENTRYPOINT ["/app/shacl_validate.py"]
134 changes: 134 additions & 0 deletions ops/C04/credit-class-metadata/C04-ruuts-credit-class.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"@context": {
"schema": "http://schema.org/",
"regen": "https://schema.regen.network#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"schema:itemListElement": {
"@container": "@list"
},
"schema:url": {
"@type": "schema:URL"
},
"regen:sectoralScope": {
"@container": "@list"
},
"regen:offsetGenerationMethod": {
"@container": "@list"
},
"regen:measuredGHGs": {
"@container": "@list"
},
"regen:coBenefits": {
"@container": "@list"
},
"regen:eligibleActivities": {
"@container": "@list"
},
"regen:landOwnershipType": {
"@container": "@list"
},
"regen:ecosystemType": {
"@container": "@list"
},
"regen:verificationMethods": {
"@container": "@list"
},
"regen:additionalityApproach": {
"@container": "@list"
},
"regen:leakageApproach": {
"@container": "@list"
},
"regen:creditingTerm": {
"@type": "schema:activityDuration"
},
"regen:lookbackPeriod": {
"@type": "schema:activityDuration"
},
"regen:permanencePeriod": {
"@type": "schema:activityDuration"
},
"regen:monitoringFrequency": {
"@type": "schema:frequency"
},
"regen:verificationFrequency": {
"@type": "schema:frequency"
}
},
"@type": "regen:C04-CreditClass",
"schema:name": "Ruuts Credit Class for Soil Carbon Sequestration through Regenerative Grazing",
"schema:description": "The Credit Class and its accompanying methodology provide farmers with a measuring and monitoring process for soil organic carbon sequestration in regenerative grazing systems, enabling them to generate carbon credits that also include robust ecological co-benefits such as water infiltration and biodiversity.",
"schema:url": "https://library.regen.network/v/regen-registry-credit-classes/regen-registry-credit-classes-1/ruuts-credit-class-for-soil-carbon-sequestration-through-regenerative-grazing",
"regen:sourceRegistry": {
"schema:name": "Regen Registry",
"schema:url": "https://library.regen.network/v/regen-registry-guide/"
},
"regen:sectoralScope": [
"Livestock & Manure Management"
],
"regen:offsetGenerationMethod": [
"Carbon Removal"
],
"regen:measuredGHGs": [
"Carbon Dioxide (CO2)",
"Nitrous Oxide (NO2)",
"Methane (CH4)"
],
"regen:coBenefits": [
"Water Infultration",
"Biodiversity"
],
"regen:geographicApplicability": "Global",
"regen:eligibleActivities": [
"Improved Grazing",
"Rotational Grazing"
],
"regen:landOwnershipType": [
"Public",
"Private"
],
"regen:ecosystemType": [
"Pasture",
"Native Grasslands",
"Integrated Cro-Livestock (ICL)"
],
"regen:creditingTerm": "P10Y",
"regen:lookbackPeriod": "P-14Y",
"regen:permanencePeriod": "P20Y",
"regen:aggregatedProjects": true,
"regen:monitoringFrequency": "Annual",
"regen:verificationFrequency": "Five year",
"regen:verificationMethods": [
"Ruuts Internal Quality Assurance",
"Third-Party ISO 14064-3 Verification"
],
"regen:approvedMethodologies": {
"@type": "schema:ItemList",
"schema:itemListElement": [
{
"schema:name": "Ruuts Protocol Soil Carbon Sequestration Methodology v1",
"schema:url": "https://library.regen.network/v/methodology-library/published-methodologies/ruuts-methodology-for-soil-carbon-sequestration",
"schema:identifier": "",
"schema:version": "V1.0"
}
],
"schema:url": ""
},
"regen:bufferPoolAccounts": {
"@type": "schema:ItemList",
"schema:itemListElement": [
{
"schema:name": "Credit Class (Pooled) Buffer Pool",
"regen:walletAddress": "regen17pmq7hp4upvmmveqexzuhzu64v36re3w3447n7dt46uwp594wtpsuuh7f6",
"regen:poolAllocation": "5%"
}
]
},
"regen:additionalityApproach": [
"Common Practice Analysis",
"Regulatory Additionality"
],
"regen:leakageApproach": [
"Activity Shifting Leakage"
]
}
3 changes: 2 additions & 1 deletion shacl/common.ttl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix regen: <https://schema.regen.network#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
Expand Down Expand Up @@ -81,4 +82,4 @@ regen:RequiredUrlPropertyShape sh:path schema:url ;
sh:maxCount 1 ;
sh:minLength 1 ;
sh:datatype schema:URL ;
.
.
170 changes: 170 additions & 0 deletions shacl/credit-classes/C04-ruuts-credit-class.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix regen: <https://schema.regen.network#> .
@prefix dash: <http://datashapes.org/dash#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

regen:C04-CreditClassShape a sh:NodeShape ;
sh:targetClass regen:C04-CreditClass ;
sh:property [
sh:path regen:measuredGHGs ;
sh:node dash:ListShape ;
sh:property [
sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
sh:datatype xsd:string ;
sh:minLength 1 ;
] ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path regen:coBenefits ;
sh:node dash:ListShape ;
sh:property [
sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
sh:datatype xsd:string ;
sh:minLength 1 ;
] ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path regen:geographicApplicability ;
sh:datatype xsd:string ;
] ;
sh:property [
sh:path regen:eligibleActivities ;
sh:node dash:ListShape ;
sh:property [
sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
sh:datatype xsd:string ;
sh:minLength 1 ;
] ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path regen:landOwnershipType ;
sh:node dash:ListShape ;
sh:property [
sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
sh:datatype xsd:string ;
sh:minLength 1 ;
] ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path regen:ecosystemType ;
sh:node dash:ListShape ;
sh:property [
sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
sh:datatype xsd:string ;
sh:minLength 1 ;
] ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path regen:creditingTerm ;
sh:node schema:activityDuration ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:minLength 1 ;
] ;
sh:property [
sh:path regen:lookbackPeriod ;
sh:node schema:activityDuration ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:minLength 1 ;
] ;
sh:property [
sh:path regen:aggregatedProjects ;
sh:node schema:Boolean ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:minLength 1 ;
] ;
sh:property [
sh:path regen:monitoringFrequency ;
sh:datatype schema:frequency ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:minLength 1 ;
] ;
sh:property [
sh:path regen:verificationFrequency ;
sh:node schema:frequency ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:minLength 1 ;
] ;
sh:property regen:BufferPoolAccountsShape ;
sh:property [
sh:path regen:additionalityApproach ;
sh:node dash:ListShape ;
sh:property [
sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
sh:datatype xsd:string ;
sh:minLength 1 ;
] ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path regen:leakageApproach ;
sh:node dash:ListShape ;
sh:property [
sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
sh:datatype xsd:string ;
sh:minLength 1 ;
] ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property [
sh:path regen:permanencePeriod ;
sh:node schema:activityDuration ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:minLength 1 ;
] ;
.

regen:BufferPoolAccountShape a sh:NodeShape ;
sh:property [
sh:path schema:name ;
sh:datatype xsd:string ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:minLength 1 ;
] ;
sh:property [
sh:path regen:walletAddress ;
sh:datatype xsd:string ;
sh:minCount 1 ;
] ;
sh:property [
sh:path regen:poolAllocation ;
sh:datatype xsd:string ;
sh:minCount 1 ;
] ;
.

regen:BufferPoolAccountsShape sh:path regen:bufferPoolAccounts ;
sh:node dash:ItemList ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:property [
sh:path schema:itemListElement ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:property [
sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
sh:node regen:BufferPoolAccountShape ;
sh:minCount 1 ;
] ;
]
.
32 changes: 24 additions & 8 deletions shacl/credit-classes/credit-class.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

regen:CreditClassShape a sh:NodeShape ;
sh:targetClass regen:CreditClass, regen:C01-CreditClass, regen:C02-CreditClass, regen:C03-CreditClass;
sh:targetClass regen:CreditClass, regen:C01-CreditClass, regen:C02-CreditClass, regen:C03-CreditClass, regen:C04-CreditClass;
sh:property [
sh:path schema:name ;
sh:minCount 1 ;
Expand Down Expand Up @@ -46,13 +46,29 @@ regen:CreditClassShape a sh:NodeShape ;
sh:maxCount 1 ;
] ;
sh:property regen:OffsetGenerationMethodPropertyShape ;
sh:property [
sh:path regen:verificationMethod ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:minLength 1 ;
sh:datatype xsd:string ;
] ;
sh:or (
[
sh:property [
sh:path regen:verificationMethod ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:minLength 1 ;
sh:datatype xsd:string ;
] ;
] [
sh:property [
sh:path regen:verificationMethods ;
sh:node dash:ListShape ;
sh:property [
sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
sh:datatype xsd:string ;
sh:minLength 1 ;
] ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
]
) ;
sh:property regen:ApprovedMethodologiesPropertyShape ;
sh:property [
sh:path regen:certifications;
Expand Down

0 comments on commit 43d2b8a

Please sign in to comment.