ci: build dashboard before installing the package#5
Merged
Conversation
`pyproject.toml` force-includes `src/clickmem/dashboard/dist/` into the
wheel, but that directory is gitignored (it's a Vite build artefact
regenerated by `make dashboard`). Neither `test.yml` nor `release.yml`
ran the dashboard build before `pip install -e .` / `python -m build`,
so hatchling failed with:
FileNotFoundError: Forced include not found:
.../src/clickmem/dashboard/dist
This has broken every `test` workflow run on main since the v1 rebuild
(32d091e) and broke the `release v0-final` run too, which is why no
v1.x has shipped to PyPI yet.
Fix: add Node 20 + pnpm 9 setup and run `pnpm install --frozen-lockfile
&& pnpm build` in `src/clickmem/dashboard` before the Python install /
build step, in both workflows. Matches the existing `make dashboard`
target and the pnpm version already pinned in `dashboard.yml`.
Author
|
i want try clickmem, seems not work. seems CI is broken and iPypi version does not match latest code |
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
CI has been red on every run of the
testworkflow onmainsince the v1 rebuild (32d091e), and therelease v0-finalrun failed the same way — which is why v1 hasn't shipped to PyPI.Root cause:
pyproject.tomlforce-includessrc/clickmem/dashboard/dist/into the wheel, but that directory is gitignored (it's a Vite build artefact regenerated bymake dashboard). Neithertest.ymlnorrelease.ymlbuilds the dashboard before invoking the Python build backend, so hatchling fails with:Example failing run: https://github.com/auxten/clickmem/actions/runs/25904341501
Fix
Add Node 20 + pnpm 9 setup, then
pnpm install --frozen-lockfile && pnpm buildinsrc/clickmem/dashboard, before the Python install / build step. Applied to bothtest.ymlandrelease.yml. This matches:make dashboardtarget'spnpm install && pnpm buildrecipe, anddashboard.yml(version: 9).The misleading comment "(includes prebuilt dashboard/dist)" on the release wheel build step is updated to point to the now-actually-prebuilt step above it.
Trade-offs considered
force-includeconditional (custom hatch build hook): possible, but skipping the dashboard in editable installs means the running server has no UI at/dashboard/, which is a worse default than just building it.Test plan
v1.0.xto verify thereleaseworkflow runs end-to-end and publishes to PyPI.🤖 Generated with Claude Code