You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inherit templates from GitHub files and maintain a repository of common source shapes #277
template/sections merging (ingests.to_sections) only composes within one local
file. Teams re-derive the same mappings for common tabular shapes (gene-disease
associations, variant tables, drug-target sheets) in every project, and there is no way
to reuse a reviewed template published elsewhere.
Proposed Solution
Two parts:
Template inheritance: a table config can reference a template (or a named section)
from a GitHub-hosted YAML file, e.g. template: {from: github:org/repo/path.yaml@ref, select: <template|section name>}, fetched, cached, and deep-merged exactly like a
local template. Pin by commit SHA or tag; record the resolved ref in provenance.
A standard repository (e.g. Tablassert-templates) of reviewed, versioned templates
for common tabular source shapes, with docs and CI validating every entry against
the current schema.
Benefits
Write a mapping once, reuse it across projects and teams; fixes propagate by ref bump.
New users start from a reviewed shape instead of a blank file.
Implementation Details
Fetch via raw.githubusercontent.com with the existing net.py/cache conventions;
offline builds must work from cache, and a network-marked test covers live fetch.
Merge order: remote template <- local template <- section, using the existing fastmerge semantics; document conflict behavior.
Security: fetched YAML goes through the same SafeLoader and pydantic validation as
local files; no execution, no arbitrary URL schemes beyond the declared GitHub form.
Run-cache/store keying must include the resolved remote ref and content hash so a
template bump invalidates cached sections.
The templates repo needs its own CI running tablassert validate --schema table
against every entry plus a schema-version compatibility note.
Success Metrics
A config inheriting a pinned GitHub template builds offline from cache and produces
identical output to the inlined equivalent; changing the pinned ref invalidates the
run cache; the templates repo validates clean against the released schema.
Questions for Reviewers
Templates repo under this org, and who reviews additions?
Activity