Skip to content

fix: ship dashboard assets in evo-hq-cli wheel#13

Merged
alokwhitewolf merged 6 commits intomainfrom
fix/wheel-static-assets
Apr 16, 2026
Merged

fix: ship dashboard assets in evo-hq-cli wheel#13
alokwhitewolf merged 6 commits intomainfrom
fix/wheel-static-assets

Conversation

@alokwhitewolf
Copy link
Copy Markdown
Collaborator

Fixes #12, where evo-hq-cli 0.2.1 installed via uv tool install serves /api/stats but returns 404 at /. plugins/evo/pyproject.toml did not declare evo/static/* as package data, so setuptools' packages.find skipped the directory (no __init__.py) and the built wheel omitted index.html, app.js, style.css. dashboard.py:26 resolves STATIC_DIR = Path(__file__).parent / "static", which doesn't exist after install; send_from_directory raises at /. /api/stats works because it doesn't touch the filesystem.

plugins/evo/pyproject.toml now declares:

[tool.setuptools.package-data]
evo = ["static/*"]

The rebuilt wheel contains evo/static/{app.js,index.html,style.css}; the sdist contains them under src/evo/static/.

Regression guard

.github/workflows/ci.yml gains a cli-wheel-assets job that builds plugins/evo/ on every PR and unzips the wheel, failing if any of the three static files is missing. Same check runs in publish.yml's publish-cli job between twine check and twine upload, so a broken wheel cannot reach PyPI.

Tested

  • uv build on plugins/evo/: wheel lists evo/static/app.js (30515 B), evo/static/index.html (4375 B), evo/static/style.css (14529 B).
  • Fresh python3.12 -m venv + pip install of the rebuilt wheel, then evo init on an empty git repo:
    • GET / -> 200, text/html, 4375 B
    • GET /static/app.js -> 200, text/javascript, 30515 B
    • GET /static/style.css -> 200, text/css, 14529 B
    • GET /api/stats -> 200 (unchanged)
  • Dashboard renders end-to-end in Chrome.

Fixes #12, where GET / returned 404 on installed evo-hq-cli 0.2.1.
plugins/evo/pyproject.toml did not declare evo/static/* as package
data, so setuptools' packages.find skipped the directory (no
__init__.py) and the built wheel omitted index.html, app.js,
style.css. dashboard.py resolves STATIC_DIR = Path(__file__).parent
/ "static", which didn't exist after install; /api/stats worked
because it didn't touch the filesystem.

Adds a regression guard in ci.yml (cli-wheel-assets job) and
publish.yml (publish-cli) that unzips the wheel and fails if any
of the three static files is missing.
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

requires-python was ">=3.12,<3.14", blocking installs on Python 3.14
(released October 2025). Runtime deps are flask>=3.0.0 and
pyyaml>=6.0.0; both support 3.14. Upper bounds on published packages
propagate into downstream resolvers and need another release to lift.

Now ">=3.12", matching sdk/python/pyproject.toml's open-ended style.
plugins/evo/src/evo/*.py uses `from __future__ import annotations`
throughout. No tomllib, no pattern-matching match statements, no
PEP 695 type aliases, no except*, no typing.Self. Runtime deps
flask>=3.0.0 and pyyaml>=6.0.0 support 3.8+. The >=3.12 floor was
a declared convention, not a technical requirement.

>=3.10 matches sdk/python/pyproject.toml. Both published Python
packages now share one floor.
cli-wheel-assets and a new sdk-python job run across
["3.10","3.11","3.12","3.13","3.14"] with fail-fast: false,
covering every interpreter declared supported by the two
pyprojects.

cli-wheel-assets gains a smoke step: pip install the built wheel
into a fresh venv, run `evo --version`, then import evo.dashboard
and assert evo/static/index.html resolves in the installed layout.
Catches #12-class regressions per-interpreter, not just on 3.12.

sdk-python builds sdk/python, installs the wheel, and runs
sdk/python/test/test_run.py against each interpreter.
sdk/node/package.json declares engines: { node: ">=18" }. Matrix
covers the four LTS lines in the declared range (18 EOL April 2025,
20 EOL April 2026, 22 EOL April 2027, 24 EOL April 2028).
fail-fast: false so one interpreter failing doesn't mask the others.
npm test runs the node --test suite on each.
@alokwhitewolf alokwhitewolf merged commit b654cb6 into main Apr 16, 2026
16 checks passed
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.

evo-hq-cli 0.2.1 dashboard URL returns 404 because static assets are missing from the wheel

1 participant