Getting Started
This repository contains the Bioenergy Research Center (BRC) schema and tooling used to transform and validate metadata exchanged with OSTI E-Link.
- Project site: https://bioenergy-research-centers.github.io/brc-schema
- Bioenergy data portal: https://bioenergy.org/
Installation
poetry install
Run CLI commands with poetry run:
poetry run brcschema --help
Or activate the Poetry environment once per shell:
eval "$(poetry env activate)"
brcschema --help
Repository Layout
docs/: MkDocs documentation sourcesexamples/: Example inputs and outputsproject/: Generated project artifacts (do not edit directly)src/brc_schema/schema/: LinkML schema source filessrc/brc_schema/transform/: OSTI<->BRC transformation specssrc/brc_schema/util/: I/O, OSTI API, and helper utilitiestests/: Unit and integration tests
Common Development Commands
make install: install dependenciesmake gen-project: regenerate project artifacts and datamodelmake gendoc: regenerate schema reference docs intodocs/make site: build project artifacts and docsmake test: run schema and Python testsmake testdoc: regenerate docs and run local MkDocs servermake deploy: deploy docs site
Quick Workflow
Retrieve OSTI records and transform them into BRC format:
poetry run brcschema retrieve-osti --osti-ids 2584700 --osti-ids 2574191 -o osti_records.json
poetry run brcschema transform -T osti_to_brc -o brc_datasets.yaml osti_records.json
Transform BRC data back to OSTI format:
poetry run brcschema transform -T brc_to_osti -o osti_records.yaml brc_datasets.yaml