Spaces:
Sleeping
Deploy: fix swapped Resize / Place on Canvas tabs (#19)
Browse files* ci: add CODEOWNERS for restructure
* docs: add github-security-posture per decode-ai-standards
* Refresh CODEOWNERS + posture doc to match current branch-protection model (#6)
* Refresh .github/CODEOWNERS to match current branch-protection model
* Refresh docs/github-security-posture.md to match current branch-protection model
* [ai-standards][slice-2] structure and dependency reproducibility (#8)
* [ai-standards][slice-1] orientation and deploy boundary (#7)
Adds docs-only governance artifacts per the shrunken slice-1 plan
(post hardening commits 1878a50..c7599a7). No changes to app code,
requirements, devcontainer, .streamlit, existing workflows, existing
.claude/.githooks, or CLAUDE.md. README.md changes are additive only.
Artifacts:
- AGENTS.md (thin entrypoint -> CLAUDE.md + docs/INDEX.md)
- SECURITY.md (HF_TOKEN handling, deploy boundary)
- docs/ (INDEX, architecture, reference, guides, progress)
- .github/pull_request_template.md (deploy-boundary checklist)
- scripts/repo_validate.py (py_compile sweep + requirements parse)
- .github/workflows/repo_validate.yml (PR-only, parallel to gate.yml)
- README.md: additive Verification + Branch & Deploy + Architecture sections
Refs decode-ai-standards@81c3f17.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [ai-standards][slice-2] structure and dependency reproducibility
Adds dependency reproducibility artifacts and policy/runbook documentation
per the shrunken slice-2 plan (workflow hardening deferred to a later slice
on user instruction to keep deploy risk at zero for this slice).
Artifacts:
- pyproject.toml (PEP 621 metadata; no [project.dependencies] to avoid
drift; requirements.txt remains the source of truth consumed by HF Spaces)
- requirements.lock (47 packages, autogenerated by
`uv pip compile --python-version=3.12 requirements.txt`)
- .python-version (3.12; matches runtime.txt and HF Spaces)
- .env.example (comment-only; declares no local env vars; documents
HF_TOKEN as a GitHub Actions secret consumed only by main.yml)
- docs/policies/naming-conventions.md (tab<N>.py rule, helper.py role,
what we explicitly do NOT do)
- docs/policies/root-artifact-policy.md (what is tracked at root, what is
gitignored, what is tolerated locally)
- docs/runbooks/local-setup.md (Windows / macOS / Linux setup walkthrough,
troubleshooting table)
- docs/INDEX.md (link the three new docs under new ## policies and
## runbooks sections; remove their entries from the "planned" stub)
Out of scope (deferred):
- Workflow SHA pinning + permissions blocks on main.yml, gate.yml,
check-file-size.yml — deferred to a later slice because main.yml is the
HF deploy pipeline and deserves its own focused PR + verification cycle
- .gitignore additions for .ruff_cache/, .venv/, .pytest_cache/ — deferred
No changes to app code (app.py, helper.py, tab1.py-tab8.py), requirements.txt,
runtime.txt, .streamlit/, .devcontainer/, existing workflows, existing
.githooks/, existing .claude/, CLAUDE.md, or .gitignore. HF Spaces deploy
is a no-op for this slice because no runtime file is touched.
Refs decode-ai-standards@81c3f17.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(tab5): carry lowercase sub-block letter into stim labels and reports
Block folders briefed as <NN><lowercase-letter><Category> (e.g. 05cColours)
encode a sub-block. The previous logic stripped every non-digit from the
folder name, dropping the letter, so stims were labelled 01B05whisper... instead
of 01B05cwhisper... A new parse_block() helper extracts the block number and the
optional single lowercase letter (uppercase = start of category name, so 05Colours
has no letter). Applied at every block-ID construction site used by the
'Name stims by block' tool (tab5) and the Asset Overview PDF (tab4).
tab6 (Rerun Matrix): rebuild the brand index from the Excel 'factor' column and
the leading brand number instead of regex-parsing the brand out of the ID, since
the optional sub-block letter makes ID-based brand parsing ambiguous.
tab5 instructions updated to document the lowercase-letter naming convention.
* fix(app): swap Resize / Place on Canvas tab handlers to match labels
The 'Resize' tab (tab7) was calling center_on_canvas_tool() and the
'Place on Canvas' tab (tab8) was calling resize_with_transparent_canvas_tool().
Swap the two calls so each tab runs the tool its label names, matching the
documented tool order (7 = Resize, 8 = Place on Canvas).
---------
Co-authored-by: FloWeinert <weinert@decodemarketing.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@@ -47,9 +47,9 @@ def main():
|
|
| 47 |
with tab6:
|
| 48 |
updated_file_processor_tab()
|
| 49 |
with tab7:
|
| 50 |
-
center_on_canvas_tool()
|
| 51 |
-
with tab8:
|
| 52 |
resize_with_transparent_canvas_tool()
|
|
|
|
|
|
|
| 53 |
|
| 54 |
if __name__ == "__main__":
|
| 55 |
main()
|
|
|
|
| 47 |
with tab6:
|
| 48 |
updated_file_processor_tab()
|
| 49 |
with tab7:
|
|
|
|
|
|
|
| 50 |
resize_with_transparent_canvas_tool()
|
| 51 |
+
with tab8:
|
| 52 |
+
center_on_canvas_tool()
|
| 53 |
|
| 54 |
if __name__ == "__main__":
|
| 55 |
main()
|