Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Inherit templates from GitHub files and maintain a repository of common source shapes #277

Open

Description

@SkyeAv

Problem Statement

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:

  1. 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.
  2. 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

  1. added
    enhancement
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions