Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ruuts-c04-metadata #57

Merged
merged 8 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
},
Comment on lines +42 to +50
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those should be of type schema:Duration https://schema.org/Duration (and not schema:activityDuration which is not a type but a property that such a schema:Duration can take: https://schema.org/activityDuration)

Suggested change
"regen:creditingTerm": {
"@type": "schema:activityDuration"
},
"regen:lookbackPeriod": {
"@type": "schema:activityDuration"
},
"regen:permanencePeriod": {
"@type": "schema:activityDuration"
},
"regen:creditingTerm": {
"@type": "schema:Duration"
},
"regen:lookbackPeriod": {
"@type": "schema:Duration"
},
"regen:permanencePeriod": {
"@type": "schema:Duration"
},

"regen:monitoringFrequency": {
"@type": "schema:frequency"
},
"regen:verificationFrequency": {
"@type": "schema:frequency"
}
Comment on lines +51 to +56
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

schema:frequency is not a type but a property: https://schema.org/frequency
there's no such thing as a frequency type in schema.org it seems...

Suggested change
"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": [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@S4mmyb why not using regen:projectActivities as in existing credit classes metadata?
or should we use regen:eligibleActivities everywhere instead ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to separate out from the set of activities a credit class allows for and the specific activities a project actually engages in (which could be a subset). Right now we use regen:projectActivity in the project metadata to indicate the list of activities a project is implementing. I was thinking we could use regen:eligibleActivities to indicate the list of activities approved by that credit class a project could choose from. Open to other terms, but I think distinguishing the could be nice?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do already use regen:projectActivities too in existing credit class metadata: C02 and C03
so I believe we should use the same naming in all credit classes

"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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is what we've been using so far

Suggested change
"regen:walletAddress": "regen17pmq7hp4upvmmveqexzuhzu64v36re3w3447n7dt46uwp594wtpsuuh7f6",
"regen:address": "regen17pmq7hp4upvmmveqexzuhzu64v36re3w3447n7dt46uwp594wtpsuuh7f6",

"regen:poolAllocation": "5%"
}
]
},
Comment on lines +117 to +126
Copy link
Member

@blushi blushi Jul 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just using a @list here? are we expecting regen:bufferPoolAccounts to have other properties than schema:itemListElement like schema:url or schema:name for instance?

"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