Skip to content

chore: bundle internal data files in wheel (taxonomy.yaml, Jinja2 templates) #4

@shaypal5

Description

@shaypal5

Problem

The wheel build config only lists packages = ["synthbanshee"] with no data-file includes.
Two categories of internal data are at risk:

  1. configs/taxonomy.yaml — loaded at runtime by synthbanshee/config/taxonomy.py via a
    path relative to __file__. When installed from a wheel into site-packages, this relative
    path (../../configs/taxonomy.yaml) will not resolve and the CLI will fail.

  2. Jinja2 / text templates inside synthbanshee/script/templates/ — these are inside the
    package directory, but Hatch won't include non-.py files unless explicitly declared.

Note: the top-level configs/scenes/, configs/speakers/, and configs/acoustic_scenes/
directories are user-authored and are NOT meant to be bundled.

Proposed fix

  • Move configs/taxonomy.yaml into the package (e.g. synthbanshee/data/taxonomy.yaml) and
    load it via importlib.resources so it is always available when the package is installed.
  • Add Hatch include rules for synthbanshee/**/*.j2, synthbanshee/**/*.txt, and the new
    synthbanshee/data/taxonomy.yaml.

Raised by

Copilot review comment on PR #3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions