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

Add credit class schemas to LinkML model #28

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f9623f8
Add initial BT01CreditClass
paul121 Dec 27, 2024
d00a358
Rename TerrasosProjectInfo to BT01ProjectInfo
paul121 Dec 27, 2024
bd6f48a
Add abstract base CreditClassInfo class
paul121 Feb 24, 2025
f673a16
Add BT01 directory in sidebar
paul121 Feb 24, 2025
0d3eedd
use relative project info import
paul121 Feb 24, 2025
f46ab05
Remove nested BT01 directory
paul121 Feb 24, 2025
f50078e
remove unnecessary slot_uri and class_uri usage
clevinson Mar 13, 2025
9f8e430
update root schema/index.md to render properly in astro dev
clevinson Mar 14, 2025
7ee3104
reorganize slots, remove BT01CreditClassInfo, and add carbon & biodiv…
clevinson Mar 14, 2025
fd7a55b
standardize ProjectImpact as single linkml class
clevinson Mar 14, 2025
07ccd43
add program and creditProtocol to CreditClassInfo
clevinson Mar 15, 2025
fd258af
fix bug where /schema/ was not loading properly in astro dev
clevinson Mar 15, 2025
ddb32f9
refactor SDG to own file, change ProjectImpact -> Impact
clevinson Mar 20, 2025
d220a8c
updates to CreditingProgram and sourceRegistry
clevinson Mar 20, 2025
50712eb
require name in registry
clevinson Mar 20, 2025
a4ee32e
remove biodiversity credit class
clevinson Mar 20, 2025
4f65bde
drop geographicApplicability
clevinson Mar 20, 2025
0080ce3
refactor eligible environment and activities in credit class info
clevinson Mar 20, 2025
e4ab90e
refactor files
clevinson Mar 20, 2025
20c461c
updates on framework wg call
clevinson Mar 20, 2025
1f405e2
cleanup environmentTypeTypes to singular
clevinson Mar 20, 2025
7aea8c1
final changes from wg call
clevinson Mar 20, 2025
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
26 changes: 21 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions schema/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ lint:
linkml-lint --validate src/ -a

gen-doc:
gen-doc src/schemas.yaml --directory generated --diagram-type er_diagram -v
gen-doc src/schema.yaml --directory generated --diagram-type er_diagram -v

gen-jsonld:
linkml-convert --input-format yaml --output-format json-ld --schema src/TerrasosProjectInfo.yaml data/TerrasosProjectInfoData.yaml --output data/TerrasosProjectInfoData.jsonld --target-class TerrasosProjectInfo
linkml-convert --input-format yaml --output-format json-ld --schema src/schema.yaml data/BT01ProjectInfoData.yaml --output data/BT01ProjectInfoData.jsonld --target-class BT01ProjectInfo

validate:
linkml-validate -s src/TerrasosProjectInfo.yaml --target-class TerrasosProjectInfo data/TerrasosProjectInfoData.yaml
linkml-validate -s src/schema.yaml --target-class BT01ProjectInfo data/BT01ProjectInfoData.yaml

all: gen-taxonomy lint gen-doc gen-jsonld validate
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
},
"place_name": "Antioquia",
"bbox": [
-75.0,
-5.0,
-70.0,
0.0
-75,
-5,
-70,
0
],
"center": [
-72.5,
Expand Down Expand Up @@ -45,7 +45,7 @@
},
"creditClassVersion": "1.0",
"ecologicalConnectivityIndex": 75.5,
"socialCulturalIndex": 85.0,
"socialCulturalIndex": 85,
"administrativeArea": {
"name": "Antioquia"
},
Expand All @@ -55,7 +55,7 @@
"CONSERVATION"
],
"extent": {
"numericValue": 120.0,
"numericValue": 120,
"unit": "unit:HA"
}
},
Expand All @@ -64,7 +64,7 @@
"ECOSYSTEM_RESTORATION"
],
"extent": {
"numericValue": 220.0,
"numericValue": 220,
"unit": "unit:HA"
}
}
Expand Down Expand Up @@ -328,4 +328,4 @@
"@id": "TerrasosProjectInfo"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: "This project aims to conserve the Amazon Rainforest by implementin
environmentalAuthority:
- name: "Corantioquia"
url: "http://corantioquia.gov.co/"
location:
location:
bbox:
- -75.0
- -5.0
Expand All @@ -19,15 +19,15 @@ location:
- -72.5
- -2.5
place_name: "Antioquia"
marketType:
marketType:
- COMPLIANCE_MARKET
bioregion:
bioregion:
- "Amazon Basin"
biomeType:
biomeType:
- "TropicalForest"
watershed: "Amazon River"
subWatershed: "Upper Amazon"
environmentType:
environmentType:
- BOG
projectDuration: "P1Y"
creditClassVersion: "1.0"
Expand Down
6 changes: 3 additions & 3 deletions schema/scripts/populateSemanticEnums.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

# Map each taxonomy to the linkml enum.
taxonomies = {
"activity": "ActivityTypes",
"environment-type": "EnvironmentTypeTypes",
"impact": "ImpactTypes",
"activity": "ActivityType",
"environment-type": "EnvironmentType",
"impact": "ImpactType",
}

# Load all taxonomy terms and add to the enums.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
id: https://framework.regen.network/schema/TerrasosProjectInfo
name: TerrasosProjectInfo
id: https://framework.regen.network/schema/BT01ProjectInfo
name: BT01ProjectInfo
prefixes:
linkml: https://w3id.org/linkml/
rfs: https://framework.regen.network/schema/
Expand All @@ -16,9 +16,8 @@ default_prefix: rfs
default_range: string

classes:
TerrasosProjectInfo:
BT01ProjectInfo:
is_a: ProjectInfo
class_uri: rfs:TerrasosProjectInfo
slots:
# Tebu Factors
- ecologicalConnectivityIndex
Expand Down Expand Up @@ -47,12 +46,10 @@ classes:
- url

ManagementArea:
class_uri: rfs:ManagementArea
attributes:
projectActivity:
# TODO: associate with regen data standards activities
slot_uri: rfs:projectActivity
range: ActivityTypes
range: ActivityType
description: the activity
multivalued: true
extent:
Expand All @@ -62,30 +59,24 @@ classes:

slots:
marketType:
slot_uri: rfs:marketType
range: MarketTypeTypes
description: The type of market for the associated credits.
multivalued: true
bioregion:
range: string
slot_uri: rfs:bioregion
description: The bioregion associated with the project.
multivalued: true
biomeType:
range: string
slot_uri: rfs:biomeType
description: The type of biome associated with the project.
multivalued: true
watershed:
range: string
slot_uri: rfs:watershed
description: The watershed associated with the project.
subWatershed:
range: string
slot_uri: rfs:subWatershed
description: The sub-watershed associated with the project.
environmentalAuthority:
slot_uri: rfs:environmentalAuthority
range: Organization
description: The environmental authority associated with the project.
multivalued: true
Expand All @@ -95,33 +86,26 @@ slots:
range: AdministrativeArea
description: The administrative area associated with the project.
ecologicalConnectivityIndex:
slot_uri: rfs:ecologicalConnectivityIndex
range: float
description: The ecological connectivity index of the project.
socialCulturalIndex:
slot_uri: rfs:socialCulturalIndex
range: float
description: The social cultural index of the project.
managementAreas:
slot_uri: rfs:managementAreas
range: ManagementArea
description: The management areas associated with the project.
multivalued: true
inlined: true
projectOperator:
slot_uri: rfs:projectOperator
range: ProjectRole
description: The organization responsible for operating the project.
projectOwner:
slot_uri: rfs:projectOwner
range: ProjectRole
description: The organization responsible for owning the project.
projectDuration:
slot_uri: rfs:projectDuration
range: string
description: The duration of the project.
conservationStatus:
slot_uri: rfs:conservationStatus
range: ConservationStatusTypes
description: The conservation status of the project.

Expand Down
84 changes: 84 additions & 0 deletions schema/src/CreditClassInfo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
id: https://framework.regen.network/schema/CreditClassInfo
name: CreditClassInfo
prefixes:
linkml: https://w3id.org/linkml/
rfs: https://framework.regen.network/schema/

imports:
- linkml:types
- core
- taxonomy
- Registry
- Impact
- Methodology
- CreditProtocol
- CreditingProgram

default_prefix: rfs
default_range: string

classes:
CreditClassInfo:
description: Base class with common fields used to define credit class info.
slots:
- name
- description
- url
slot_usage:
name:
required: true
attributes:
hasPrimaryImpact:
description: The primary impact expected from adhering to the protocol and/or management practices associated with the credit class. Generally speaking the quantifiable components of this impact are associated with the credit type that the credit class exists under (e.g. Carbon, Biodiversity, etc).
range: Impact
required: true
hasCoBenefits:
description: Co-benefits are any secondary impacts that may result from adhering to the protocol and/or management practices associated with the credit class. They can be qualitative or quantitative.
range: Impact
multivalued: true
hasSourceRegistry:
description: The registry where the credits are originally issued and tracked if somewhere other than Regen Network.
range: Registry
managedUnderProgram:
description: The higher-level rules and requirements under which the given credit protocol operates, sometimes referred to as the "Standard".
range: CreditingProgram
creditProtocol:
description: The root document of the credit protocol that defines the requirements and process to register and issue credits under a credit protocol. It could be registered under a program or independent. It could include methods to measure and monitor, or reference other methodology documents.
range: CreditProtocol
hasApprovedMethodologies:
description: If one or more standalone methodologies for quantifying GHG or other benefits are approved for use, supplemental to any explicit methodlogies defined within the main creditProtocol document, they can be listed here.
range: Methodology
multivalued: true
hasCreditingTerm:
description: The total duration of the crediting term for the project.
range: duration
eligibleEnvironmentTypes:
description: Types of environments that a project registered under this credit class may focuses on.
range: EnvironmentType
multivalued: true
eligibleActivities:
description: Eligible activities for projects registered under this credit class.
range: ActivityType
multivalued: true

CarbonCreditClassInfo:
is_a: CreditClassInfo
description: Off-chain metadata representation for credit classes where the credit type is Carbon (C)
attributes:
hasPermanencePeriod:
description: Permanence period of the credits.
range: duration
hasCreditGenerationMethod:
description: Method for generating credits.
range: CreditGenerationMethod

enums:
CreditGenerationMethod:
description: Enumeration of methods for generating credits in the carbon domain.
permissible_values:
AVOIDED_EMISSIONS:
description: Credits generated by preventing the release of greenhouse gases into the atmosphere.
CARBON_DIOXIDE_REMOVAL:
description: Credits generated by processes that result in net removal of carbon dioxide from the atmosphere.
EMISSIONS_REDUCTION:
description: Credits generated by reducing the amount of greenhouse gases emitted compared to a baseline scenario.
24 changes: 24 additions & 0 deletions schema/src/CreditProtocol.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
id: CreditProtocol
name: CreditProtocol

prefixes:
rfs: https://framework.regen.network/schema/

default_prefix: rfs

imports:
- core

classes:
CreditProtocol:
description: Details of the credit protocol that defines the requirements and process to register and issue credits under a credit protocol. Credit Protocols can be registered under a program or independent. It could include specific methods to measure and monitor, or reference other methodology documents.
slots:
- name
- url
- version
- identifier
slot_usage:
name:
required: true
url:
required: true
22 changes: 22 additions & 0 deletions schema/src/CreditingProgram.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
id: CreditingProgram
name: CreditingProgram

prefixes:
rfs: https://framework.regen.network/schema/

default_prefix: rfs

imports:
- core

classes:
CreditingProgram:
description: Details of the program that oversees the crediting protocol associated with this credit class.
slots:
- name
- url
- version
- identifier
slot_usage:
name:
required: true
Loading