Repository navigation
Stop committing the built widget assets - #475
Merged
Merged
Conversation
widget.js, index.html, graph.js and style.css are vite build outputs that were checked in and rewritten on every JS change, so each PR carried ~16 MB of churn and CI had to enforce they stayed in sync (nvl-entrypoint-test.yml). Untrack them: they are now built by `just js-build` and by a shared CI action before anything that imports the package, while still shipping in the wheel and sdist. Also drop the Streamlit stylesheet, which was byte-identical to the widget's, and read the widget's copy instead. Importing the widget (or running pytest) without the assets now fails with a hint to run `just js-build`.
The whole nvl_entrypoint/ and streamlit_v2/ directories are build output, so ignore them wholesale in python-wrapper/.gitignore (next to the existing resource ignores) instead of listing each file.
setuptools silently omits missing package data, so a forgotten JS build would publish a wheel without the widget. Verify the built wheel and sdist contain all four assets before uploading to PyPI.
Also import the built wheel in a clean env, reusing the widget's own asset guard (which checks widget.js and style.css) as an end-to-end check that the published wheel is usable.
Drop the separate wheel/sdist asset checker and keep only the one-liner that imports the built wheel, which reuses the widget's own asset guard.
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.
What
The widget's build outputs —
widget.js,index.html,nvl_entrypoint/style.cssandstreamlit_v2/graph.js— are vite build products that were checked into git and rewritten on every JS change (~16 MB per change), so PRs carried huge diffs and CI had to enforce they stayed in sync (nvl-entrypoint-test.yml).This untracks them. They are now:
just js-buildlocally,Changes
.gitignorethe build outputs;git rm --cachedthem.github/actions/build-jscomposite action, wired intorelease.yml,unit-tests.yml(plus ajs-applet/**trigger path),gds-integration-tests.yml,snowflake-integration-tests.ymlandrender-docs.yml; deletednvl-entrypoint-test.ymlstreamlit.pyreads the widget's copy and the build script deletes the emitted duplicatepytest_configureguard,widget.pyimport guard,just py-testchainsjs-build, CONTRIBUTING noteVerification
uv build→ wheel and sdist contain all four assets (noMANIFEST.inneeded)neo4j_viz/nvl/streamlit, construct the widgetjust py-test→ 323 passed, 11 skipped;just py-stylecleanjust js-buildNote: this only stops the repo from growing; the existing history is untouched (rewriting it would be a public-history rewrite).