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

Integrate taxonomy with semantic enumerations #11

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
5 changes: 4 additions & 1 deletion schema/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
gen-taxonomy:
python3 scripts/populateSemanticEnums.py

lint:
linkml-lint --validate src/ -a

Expand All @@ -10,4 +13,4 @@ gen-jsonld:
validate:
linkml-validate -s src/TerrasosProjectInfo.yaml --target-class TerrasosProjectInfo data/TerrasosProjectInfoData.yaml

all: lint gen-doc gen-jsonld validate
all: gen-taxonomy lint gen-doc gen-jsonld validate
6 changes: 5 additions & 1 deletion schema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@
- Create separate schema files for each logical schema class and `import` into the root `schemas.yaml` file.
- Generated markdown from schemas:
```shell
gen-doc schema/src/schemas.yml --directory schema/generated --diagram-type er_diagram
gen-doc schema/src/schemas.yaml --directory schema/generated --diagram-type er_diagram
```
- Generate linkml enums for taxonomy terms:
```shell
python populateSemanticEnums.py
```
2 changes: 1 addition & 1 deletion schema/data/TerrasosProjectInfoData.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ biomeType:
watershed: "Amazon River"
subWatershed: "Upper Amazon"
environmentType:
- CLOUD_FOREST
- BOG
projectDuration: "P1Y"
creditClassVersion: "1.0"
ecologicalConnectivityIndex: 75.5
Expand Down
139 changes: 127 additions & 12 deletions schema/generated/ActivityTypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,38 @@




_The type of activity_



URI: [ActivityTypes](ActivityTypes.md)

## Permissible Values

| Value | Meaning | Description |
| --- | --- | --- |
| CONSERVATION | rfs:Conservation | a conservation activity |
| ECOSYSTEM_RESTORATION | rfs:EcosystemRestoration | an ecosystem restoration activity |
| RESIDUE_TILLAGE_MANAGEMENT | rft:ResidueTillageManagement | |
| BIOCHAR_PRODUCTION | rft:BiocharProduction | |
| IMPROVED_FOREST_MANAGEMENT | rft:ImprovedForestManagement | |
| AGROFORESTRY | rft:Agroforestry | |
| PRESCRIBED_GRAZING | rft:PrescribedGrazing | |
| RIPARIAN_FOREST_BUFFERS | rft:RiparianForestBuffers | |
| SOIL_AMENDMENTS | rft:SoilAmendments | |
| CONSERVATION | rft:Conservation | |
| ECOTOURISM | rft:Ecotourism | |
| COVER_CROPPING | rft:CoverCropping | |
| TREE_PLANTING | rft:TreePlanting | |
| PHOTOCATALYST_APPLICATION | rft:PhotocatalystApplication | |
| ECOSYSTEM_RESTORATION | rft:EcosystemRestoration | |
| INDUSTRIAL_BIOCHAR_PRODUCTION | rft:IndustrialBiocharProduction | |
| ARTISANAL_BIOCHAR_PRODUCTION | rft:ArtisanalBiocharProduction | |
| BIOCHAR | rft:Biochar | |
| ENHANCED_ROCK_WEATHERING | rft:EnhancedRockWeathering | |
| COMPOST_AMENDMENTS | rft:CompostAmendments | |
| KEYSTONE_SPECIES_CONSERVATION | rft:KeystoneSpeciesConservation | |
| UMBRELLA_SPECIES_CONSERVATION | rft:UmbrellaSpeciesConservation | |
| SILVOPASTURE | rft:Silvopasture | |
| FOREST_FARMING | rft:ForestFarming | |
| NON_URBAN_FOREST_IMPROVEMENT | rft:NonUrbanForestImprovement | |
| URBAN_FOREST_IMPROVEMENT | rft:UrbanForestImprovement | |
| AFFORESTATION | rft:Afforestation | |
| REFORESTATION | rft:Reforestation | |



Expand All @@ -24,6 +43,7 @@ URI: [ActivityTypes](ActivityTypes.md)
| Name | Description |
| --- | --- |
| [projectActivities](projectActivities.md) | the activity |
| [activity](activity.md) | The types of activities being implemented in projects |
| [projectActivity](projectActivity.md) | the activity |


Expand Down Expand Up @@ -54,18 +74,113 @@ URI: [ActivityTypes](ActivityTypes.md)
<details>
```yaml
name: ActivityTypes
description: The type of activity
from_schema: https://framework.regen.network/schema/
rank: 1000
permissible_values:
RESIDUE_TILLAGE_MANAGEMENT:
text: RESIDUE_TILLAGE_MANAGEMENT
meaning: rft:ResidueTillageManagement
title: ResidueTillageManagement
BIOCHAR_PRODUCTION:
text: BIOCHAR_PRODUCTION
meaning: rft:BiocharProduction
title: BiocharProduction
IMPROVED_FOREST_MANAGEMENT:
text: IMPROVED_FOREST_MANAGEMENT
meaning: rft:ImprovedForestManagement
title: ImprovedForestManagement
AGROFORESTRY:
text: AGROFORESTRY
meaning: rft:Agroforestry
title: Agroforestry
PRESCRIBED_GRAZING:
text: PRESCRIBED_GRAZING
meaning: rft:PrescribedGrazing
title: PrescribedGrazing
RIPARIAN_FOREST_BUFFERS:
text: RIPARIAN_FOREST_BUFFERS
meaning: rft:RiparianForestBuffers
title: RiparianForestBuffers
SOIL_AMENDMENTS:
text: SOIL_AMENDMENTS
meaning: rft:SoilAmendments
title: SoilAmendments
CONSERVATION:
text: CONSERVATION
description: a conservation activity
meaning: rfs:Conservation
meaning: rft:Conservation
title: Conservation
ECOTOURISM:
text: ECOTOURISM
meaning: rft:Ecotourism
title: Ecotourism
COVER_CROPPING:
text: COVER_CROPPING
meaning: rft:CoverCropping
title: CoverCropping
TREE_PLANTING:
text: TREE_PLANTING
meaning: rft:TreePlanting
title: TreePlanting
PHOTOCATALYST_APPLICATION:
text: PHOTOCATALYST_APPLICATION
meaning: rft:PhotocatalystApplication
title: PhotocatalystApplication
ECOSYSTEM_RESTORATION:
text: ECOSYSTEM_RESTORATION
description: an ecosystem restoration activity
meaning: rfs:EcosystemRestoration
meaning: rft:EcosystemRestoration
title: EcosystemRestoration
INDUSTRIAL_BIOCHAR_PRODUCTION:
text: INDUSTRIAL_BIOCHAR_PRODUCTION
meaning: rft:IndustrialBiocharProduction
title: IndustrialBiocharProduction
ARTISANAL_BIOCHAR_PRODUCTION:
text: ARTISANAL_BIOCHAR_PRODUCTION
meaning: rft:ArtisanalBiocharProduction
title: ArtisanalBiocharProduction
BIOCHAR:
text: BIOCHAR
meaning: rft:Biochar
title: Biochar
ENHANCED_ROCK_WEATHERING:
text: ENHANCED_ROCK_WEATHERING
meaning: rft:EnhancedRockWeathering
title: EnhancedRockWeathering
COMPOST_AMENDMENTS:
text: COMPOST_AMENDMENTS
meaning: rft:CompostAmendments
title: CompostAmendments
KEYSTONE_SPECIES_CONSERVATION:
text: KEYSTONE_SPECIES_CONSERVATION
meaning: rft:KeystoneSpeciesConservation
title: KeystoneSpeciesConservation
UMBRELLA_SPECIES_CONSERVATION:
text: UMBRELLA_SPECIES_CONSERVATION
meaning: rft:UmbrellaSpeciesConservation
title: UmbrellaSpeciesConservation
SILVOPASTURE:
text: SILVOPASTURE
meaning: rft:Silvopasture
title: Silvopasture
FOREST_FARMING:
text: FOREST_FARMING
meaning: rft:ForestFarming
title: ForestFarming
NON_URBAN_FOREST_IMPROVEMENT:
text: NON_URBAN_FOREST_IMPROVEMENT
meaning: rft:NonUrbanForestImprovement
title: NonUrbanForestImprovement
URBAN_FOREST_IMPROVEMENT:
text: URBAN_FOREST_IMPROVEMENT
meaning: rft:UrbanForestImprovement
title: UrbanForestImprovement
AFFORESTATION:
text: AFFORESTATION
meaning: rft:Afforestation
title: Afforestation
REFORESTATION:
text: REFORESTATION
meaning: rft:Reforestation
title: Reforestation

```
</details>
94 changes: 73 additions & 21 deletions schema/generated/AdministrativeArea.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,46 @@


# Slot: administrativeArea
# Class: AdministrativeArea


_The administrative area associated with the project._

URI: [schema:AdministrativeArea](http://schema.org/AdministrativeArea)



```mermaid
erDiagram
AdministrativeArea {
string name
string url
}

URI: [rfs:administrativeArea](https://framework.regen.network/schema/administrativeArea)



<!-- no inheritance hierarchy -->

```



<!-- no inheritance hierarchy -->

## Applicable Classes

| Name | Description | Modifies Slot |
| --- | --- | --- |
| [TerrasosProjectInfo](TerrasosProjectInfo.md) | | no |
## Slots

| Name | Cardinality and Range | Description | Inheritance |
| --- | --- | --- | --- |
| [name](name.md) | 1 <br/> [String](String.md) | Name of the project | direct |
| [url](url.md) | 0..1 <br/> [String](String.md) | | direct |





## Usages

## Properties
| used by | used in | type | used |
| --- | --- | --- | --- |
| [TerrasosProjectInfo](TerrasosProjectInfo.md) | [administrativeArea](administrativeArea.md) | range | [AdministrativeArea](AdministrativeArea.md) |

* Range: [AdministrativeArea](AdministrativeArea.md)



Expand All @@ -59,24 +66,69 @@ URI: [rfs:administrativeArea](https://framework.regen.network/schema/administrat

| Mapping Type | Mapped Value |
| --- | --- |
| self | rfs:administrativeArea |
| native | rfs:administrativeArea |
| self | schema:AdministrativeArea |
| native | rfs:AdministrativeArea |







## LinkML Source

<!-- TODO: investigate https://stackoverflow.com/questions/37606292/how-to-create-tabbed-code-blocks-in-mkdocs-or-sphinx -->

### Direct

<details>
```yaml
name: AdministrativeArea
from_schema: https://framework.regen.network/schema/
slots:
- name
- url
class_uri: schema:AdministrativeArea

```
</details>

### Induced

<details>
```yaml
name: administrativeArea
description: The administrative area associated with the project.
name: AdministrativeArea
from_schema: https://framework.regen.network/schema/
rank: 1000
alias: administrativeArea
domain_of:
- TerrasosProjectInfo
range: AdministrativeArea
attributes:
name:
name: name
description: Name of the project.
from_schema: https://framework.regen.network/schema/
rank: 1000
slot_uri: schema:name
alias: name
owner: AdministrativeArea
domain_of:
- ProjectInfo
- ProjectRole
- Organization
- File
- AdministrativeArea
range: string
required: true
url:
name: url
from_schema: https://framework.regen.network/schema/
rank: 1000
slot_uri: schema:URL
alias: url
owner: AdministrativeArea
domain_of:
- ProjectRole
- Organization
- AdministrativeArea
range: string
class_uri: schema:AdministrativeArea

```
</details>
Loading