Skip to content

fix(learn): ship the exporters' Jinja templates in the wheel and sdist - #40

Merged
SOSOVSKI merged 2 commits into
mainfrom
fix/akms-learn-templates
Oct 28, 2026
Merged

SOSOVSKI merged 2 commits into
mainfrom
fix/akms-learn-templates

Conversation

@SOSOVSKI

Copy link
Copy Markdown
Contributor

packages/akms_learn/pyproject.toml declared no package data, so the 0.3.2 wheel and sdist carry none of templates/.md.j2 or exporters/templates/.html.j2. The exporters load them from beside their modules, so every markdown or HTML export from a pip install raised jinja2.TemplateNotFound. Declares them as package data and adds a public smoke test (run by CI against the built wheels) that checks each template ships and parses: 6 passed on the fixed wheel, 6 failed on the published 0.3.2 wheel.

packages/akms_learn/pyproject.toml declared no package data, so the 0.3.2
wheel and sdist carry none of templates/*.md.j2 or
exporters/templates/*.html.j2. The exporters load them from beside their
modules, so every markdown or HTML export from a pip install raised
jinja2.TemplateNotFound. Declares them as package data and adds a public
smoke test (run by CI against the built wheels) that checks each template
ships and parses: 6 passed on the fixed wheel, 6 failed on the published
0.3.2 wheel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CodeQL flags jinja2.Environment() without autoescape as an XSS risk. The
smoke test only parses templates and renders nothing, but enabling
select_autoescape for HTML/XML matches the HTML exporter and clears the
alert.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SOSOVSKI
SOSOVSKI merged commit fed203f into main Oct 28, 2026
11 checks passed
@SOSOVSKI
SOSOVSKI deleted the fix/akms-learn-templates branch October 28, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants