Skip to content

regen-network/regen-registry-standards

Repository files navigation

Regen Registry Standards

This repository contains:

  • Source schema for Regen Network ontology (TODO)
  • SHACL schemas for:
    • Registry projects and dMRV form validation
    • Methodology, credit class, project, credit vintage and retirement metadata validation

SHACL Graphs

The shacl folder contains SHACL schemas for validating data (for example, project related data), using Turtle or JSON-LD.

JSON-LD Examples

The jsonld folder contains examples of JSON-LD data that can be directly copied/pasted and filled in (filling in empty strings and replacing 0 with appropriate numbers). Corresponding SHACL graphs can be found in the shacl folder.

Live metadata

The ops folder contains the metadata for all projects, credit classes and credit batches live on Regen Ledger. These can be validated with the SHACL graphs in this repository. See the "Validation" section below.

Validation

Dependencies:

  1. The Apache Jena SHACL CLI (brew install jena or use your package manager or official install)
  2. A working python3 installation (brew install python or use your package manager or official install)

Running validations:

$ ./shacl_validate.py

Update project pages

$ python3 -m venv venv
$ . venv/bin/activate
(venv) $ pip install sqlalchemy psycopg2-binary
(venv) $ DB_URL='postgresql+psycopg2://postgres:postgres@localhost:5432/regen_registry' ./update_project_pages.py