This is the project description.
Project description
Resource Ingest Guide Schema
A LinkML schema for describing Reference Ingest Guides (RIGs) - structured documents that capture the scope, rationale, and modeling approach for ingesting content from external sources into Biolink Model-compliant data repositories.
Overview
This repository provides:
- LinkML Schema: Formal specification for Reference Ingest Guides in
src/resource_ingest_guide_schema/schema/ - Documentation Generator: Automated conversion of RIG YAML files to human-readable markdown
- Validation Tools: Schema validation for RIG files using LinkML
- Template System: Standardized templates and creation tools for new RIGs
- Example RIGs: Real-world examples from CTD, DISEASES, and Clinical Trials KP
What are Reference Ingest Guides (RIGs)?
RIGs are structured documents that describe:
- Source Information: Details about data sources (access, formats, licensing)
- Ingest Information: What content is included/excluded and filtering rationale
- Target Information: How data is modeled in the output knowledge graph
- Provenance Information: Contributors and related artifacts
RIGs help ensure reproducible, well-documented data ingestion processes for biomedical knowledge graphs.
Website
https://biolink.github.io/resource-ingest-guide-schema
Repository Structure
├── src/
│ ├── resource_ingest_guide_schema/
│ │ └── schema/ # LinkML schema definition
│ ├── docs/
│ │ ├── files/ # Static documentation files
│ │ ├── rigs/ # Example RIG YAML files
│ │ └── doc-templates/ # Jinja2 templates for docs
│ └── scripts/ # Python utilities for RIG processing
├── docs/ # Generated documentation
├── tests/ # Test suite
└── project/ # Generated LinkML artifacts
Developer Documentation
Prerequisites
This project uses uv for dependency management. Install it with:
# On macOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# Or with pip
pip install uv
Getting Started
Note that the following commands assume you are in the project root directory, and the equivalent just commands may be substituted for several make targets (namely just test instead of make test)
-
Install dependencies:
uv sync --extra dev
-
Run tests:
make test # or just test
-
Generate documentation:
make gendoc
Working with RIGs
Creating a New RIG
# Create a new RIG from the template
make new-rig INFORES=infores:example NAME="Example Data Source"
# This creates src/docs/rigs/mydatasource_rig.yaml
# Edit the file to fill in your specific information
or using the equivalent just command:
just INFORES=infores:example NAME="Example Data Source" new-rig
Note that for the just command, the script variables must precede the just recipe ("target") name on the command line (reverse of the make command).
Validating RIGs
# Validate all RIG files against the schema
make validate-rigs
or
just validate-rigs
To validate a specific RIG:
uv run linkml-validate --schema src/resource_ingest_guide_schema/schema/resource_ingest_guide_schema.yaml src/docs/rigs/my_rig.yaml
Building Documentation
# Generate all documentation including RIG index and markdown versions
make gendoc
# Test documentation locally
make testdoc # Builds docs and starts local server
Development Workflow
1. Schema Development
The LinkML schema is defined in src/resource_ingest_guide_schema/schema/resource_ingest_guide_schema.yaml. After making changes:
# Regenerate Python datamodel and other artifacts
make gen-project
# Test the schema
make test-schema
# Lint the schema
make lint
2. Script Development
Python utilities are in src/scripts/:
create_rig.py: Generate new RIG from templaterig_to_markdown.py: Convert RIG YAML to Markdowngenerate_rig_index.py: Create RIG index table
To test script changes:
# Run scripts directly
uv run python src/scripts/create_rig.py --help
uv run python src/scripts/rig_to_markdown.py --input-dir src/docs/rigs --output-dir docs
3. Documentation Development
Templates are in src/docs/doc-templates/ and static files in src/docs/files/:
# Regenerate docs after template changes
make gendoc
# View changes locally
make serve # or make testdoc
Available Commands
Note: some make targets (like new-rig and validate-rigs) have just command equivalents (remember instead to put the just recipe target name after any command line arguments)
| Command | Description |
|---|---|
make help |
Show all available commands |
make install |
Install dependencies with uv |
make test |
Run full test suite |
make test-schema |
Test schema generation |
make test-python |
Run Python tests |
make lint |
Lint the LinkML schema |
make gen-project |
Generate LinkML artifacts (Python, JSON Schema, etc.) |
make gendoc |
Generate documentation including RIG processing |
make serve |
Start local documentation server |
make testdoc |
Build docs and start server |
make new-rig |
Create new RIG (requires INFORES and NAME) |
make validate-rigs |
Validate all RIG files |
make clean |
Clean generated files |
make deploy |
Deploy documentation |
Project Structure Details
Key Directories
src/resource_ingest_guide_schema/schema/: LinkML schema definitionsrc/docs/rigs/: Example RIG YAML files (CTD, DISEASES, Clinical Trials KP)src/docs/files/: Static documentation files copied to outputsrc/docs/doc-templates/: Jinja2 templates for documentation generationsrc/scripts/: Python utilities for RIG creation and processingdocs/: Generated documentation output (do not edit directly)project/: Generated LinkML artifacts (Python models, JSON Schema, etc.)
Generated Artifacts
The make gen-project command generates:
- Python datamodel:
src/resource_ingest_guide_schema/datamodel/ - JSON Schema:
project/jsonschema/ - OWL ontology:
project/owl/ - GraphQL schema:
project/graphql/ - SQL DDL:
project/sqlschema/ - And more: See
project/directory
Contributing
- Fork the repository
- Create a feature branch
- Make changes following the existing patterns
- Ensure tests pass:
make test - Update documentation if needed:
make gendoc - Submit a pull request
Adding New RIG Examples
- Create YAML file in
src/docs/rigs/ - Follow the schema structure (see existing examples)
- Validate:
make validate-rigs - Regenerate docs:
make gendoc - The RIG will automatically appear in the documentation index
Schema Changes
- Modify
src/resource_ingest_guide_schema/schema/resource_ingest_guide_schema.yaml - Regenerate artifacts:
make gen-project - Update any affected RIG files
- Test:
make test - Update documentation as needed
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file resource_ingest_guide_schema-0.1.2.tar.gz.
File metadata
- Download URL: resource_ingest_guide_schema-0.1.2.tar.gz
- Upload date:
- Size: 2.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cc3c85cf561fae4193722fe90338f18f6c868a94da3f049988a1c56e30bd5e1
|
|
| MD5 |
974e6beea080d6f62405db64c12694c6
|
|
| BLAKE2b-256 |
17a60135578a821641f0b7d10277a1e51148f6e540f864a002eef8b51d12fa71
|
Provenance
The following attestation bundles were made for resource_ingest_guide_schema-0.1.2.tar.gz:
Publisher:
pypi-publish.yaml on biolink/resource-ingest-guide-schema
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
resource_ingest_guide_schema-0.1.2.tar.gz -
Subject digest:
1cc3c85cf561fae4193722fe90338f18f6c868a94da3f049988a1c56e30bd5e1 - Sigstore transparency entry: 606464646
- Sigstore integration time:
-
Permalink:
biolink/resource-ingest-guide-schema@183a4c3ad78243a6843e62b053ef62971cf953f2 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/biolink
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yaml@183a4c3ad78243a6843e62b053ef62971cf953f2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file resource_ingest_guide_schema-0.1.2-py3-none-any.whl.
File metadata
- Download URL: resource_ingest_guide_schema-0.1.2-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcfcec77f3256bce2637254a1f8c1e856364b9d742f0a43958aace38dac31cfa
|
|
| MD5 |
fc61f885da92ebfcf32996434e445f56
|
|
| BLAKE2b-256 |
aa177248bacfb5891b7c86b3b58d90f11ad8589b97e3e9b2641e61b8764505bb
|
Provenance
The following attestation bundles were made for resource_ingest_guide_schema-0.1.2-py3-none-any.whl:
Publisher:
pypi-publish.yaml on biolink/resource-ingest-guide-schema
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
resource_ingest_guide_schema-0.1.2-py3-none-any.whl -
Subject digest:
dcfcec77f3256bce2637254a1f8c1e856364b9d742f0a43958aace38dac31cfa - Sigstore transparency entry: 606464651
- Sigstore integration time:
-
Permalink:
biolink/resource-ingest-guide-schema@183a4c3ad78243a6843e62b053ef62971cf953f2 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/biolink
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yaml@183a4c3ad78243a6843e62b053ef62971cf953f2 -
Trigger Event:
release
-
Statement type: