chore: bundle taxonomy.yaml and templates in wheel#57
Merged
Conversation
Move configs/taxonomy.yaml into synthbanshee/data/ and load it via importlib.resources so the CLI works when installed from a wheel. Add Hatch build artifacts config for *.yaml, *.j2, and *.txt files inside the package tree. Closes #4 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
This PR ensures internal runtime data (label taxonomy) and bundled templates are shipped inside the wheel so installs-from-wheel can always load required resources.
Changes:
- Moves the label taxonomy YAML into the package (
synthbanshee/data/taxonomy.yaml) and switches the loader toimportlib.resources. - Adds Hatch build configuration to include non-Python package files (
*.yaml,*.j2,*.txt) in wheel artifacts. - Updates docs/comments to reference the new taxonomy location and adjusts
.gitignoreto allow trackingsynthbanshee/data/.
Reviewed changes
Copilot reviewed 7 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
synthbanshee/data/taxonomy.yaml |
New in-package taxonomy source of truth for runtime loading. |
synthbanshee/data/__init__.py |
Makes synthbanshee.data a package so importlib.resources can resolve files. |
synthbanshee/config/taxonomy.py |
Loads taxonomy via importlib.resources instead of __file__-relative paths. |
pyproject.toml |
Adds Hatch build artifacts patterns to include YAML/Jinja2/TXT files. |
.gitignore |
Un-ignores synthbanshee/data/ while keeping top-level data/ ignored. |
synthbanshee/cli.py |
Updates taxonomy path references in comments/error messaging. |
synthbanshee/labels/iaa.py |
Updates taxonomy path reference in comment. |
synthbanshee/package/dataset_card.py |
Updates dataset card text to reference new taxonomy path. |
AGENTS.md |
Documents new repo layout and taxonomy path. |
README.md |
Updates taxonomy path reference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This comment has been minimized.
This comment has been minimized.
…es, fix error message - Pass `synthbanshee.data` module object to `resources.files()` instead of a hardcoded string (COPILOT-2). - Rephrase error message to direct users to `_EMOTION_ALIASES` or reinstall, since bundled YAML isn't user-editable in site-packages (COPILOT-1). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
- Remove `[tool.hatch.build] artifacts` — Hatch already includes non-py files inside declared packages by default (verified by inspecting built wheel). - Update remaining `configs/taxonomy.yaml` references in docs/implementation_plan.md, docs/audio_generation_v3_design.md, and llms.txt. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 12 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
pr-agent-context report: This is a refreshed snapshot of the current PR state.
This run includes unresolved review comments on PR #57 in repository https://github.com/DataHackIL/SynthBanshee
For each unresolved review comment, recommend one of: resolve as irrelevant, accept and implement
the recommended solution, open a separate issue and resolve as out-of-scope for this PR, accept and
implement a different solution, or resolve as already treated by the code.
After I reply with my decision per item, implement the accepted actions, resolve the corresponding
PR comments, and push all of these changes in a single commit.
# Copilot Comments
## COPILOT-1
Location: synthbanshee/cli.py:190
URL: https://github.com/DataHackIL/SynthBanshee/pull/57#discussion_r3176579737
Root author: copilot-pull-request-reviewer
Comment:
This error message suggests “add it to taxonomy.yaml and reinstall”, but doesn’t say which file (the taxonomy is now bundled under `synthbanshee/data/taxonomy.yaml`). To reduce confusion for users installing from wheels, consider explicitly naming the path (and/or clarifying that this requires changing the source tree and reinstalling) rather than implying there’s an editable local `taxonomy.yaml`.
## COPILOT-2
Location: synthbanshee/config/taxonomy.py:20
URL: https://github.com/DataHackIL/SynthBanshee/pull/57#discussion_r3176579741
Root author: copilot-pull-request-reviewer
Comment:
`load_taxonomy()` now reads `taxonomy.yaml` via `importlib.resources`, which will fail at runtime if `synthbanshee/data/taxonomy.yaml` is not included in the built wheel. In the current `pyproject.toml`, `[tool.hatch.build.targets.wheel]` only lists `packages = ["synthbanshee"]` and does not include any Hatchling include/artifact rules for `*.yaml`/`*.j2`/`*.txt`, so both the taxonomy and Jinja2 templates are likely to be omitted from the wheel. Please add explicit wheel include rules (or equivalent Hatchling config) so these non-`.py` files are packaged.Run metadata: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #4.
configs/taxonomy.yamlinto the package tree atsynthbanshee/data/taxonomy.yamltaxonomy.pyfrom__file__-relative path toimportlib.resources, so the taxonomy is always loadable when installed from a wheelartifactsconfig to include*.yaml,*.j2, and*.txtfiles insidesynthbanshee/.gitignoreto allowsynthbanshee/data/while keeping top-leveldata/ignoredcli.py,iaa.py,dataset_card.py,AGENTS.md, andREADME.mdChanges by file
synthbanshee/data/taxonomy.yamlconfigs/taxonomy.yamlsynthbanshee/data/__init__.pysynthbanshee.dataa package forimportlib.resourcessynthbanshee/config/taxonomy.pyimportlib.resourcesinstead of__file__-relative pathpyproject.toml[tool.hatch.build] artifactsfor*.yaml,*.j2,*.txt.gitignore!synthbanshee/data/negationsynthbanshee/cli.pysynthbanshee/labels/iaa.pysynthbanshee/package/dataset_card.pyAGENTS.mdREADME.mdTest plan
pytest— 1375 passedruff check— passedmypy— passed (pre-existing errors only, no new ones)pip install .in a venv andsynthbanshee --helpworks🤖 Generated with Claude Code