Skip to content

Commit bd20ac6

Browse files
paddymulclaude
andauthored
build: auto-create static JS stubs via hatch hook (#642)
* docs: Dastardly DataFrame Dataset post with static embeds - DDD article with inline iframe embeds for 10 tricky DataFrames - Generator script to produce static embed HTML at RTD build time - RTD config: build JS bundle, generate DDD pages, copy to output - Fix: coerce Period/Interval/Timedelta to strings in parquet b64 (hyparquet can't decode pandas Arrow extension types) - Tests for weird-type parquet roundtrip - Ship static-embed.js/css in wheel (pyproject.toml artifacts) - Docs preview link in TestPyPI PR comment - BuckarooCompare article - Content plan outline Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add voice/personality to DDD post, add type coverage research Incorporate colorful wording from buckaroo_writing notes into the DDD blog post intro ("wonderfully variant splendor", "weirdest DataFrames in the wild", "hard fought experience"). Add Buckaroo's displayability philosophy. New research doc tests every pandas (classic, extension, arrow-backed) and polars dtype through both JSON and parquet serialization paths, documenting which are covered by the DDD and test suite. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add full dtype coverage table to DDD post Cross-engine table showing Yes/not tested/fail for every dtype across pandas-classic, pandas-arrow, and polars. Footnote noting that serialization complexity warrants its own follow-up post. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add parquet, JS type, and display columns to dtype table Expand the dtype coverage table with three new columns showing the full pipeline: what Parquet physical type each dtype maps to, what JS type hyparquet produces after decode, and how buckaroo's display formatter renders it. Footnotes explain BigInt handling, coercion for types without native Parquet equivalents, and the two serialization failures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: credit Cecil Curry / beartype for DDD inspiration The naming and early shape of the DDD was influenced by an exchange with leycec on beartype#529. Added a shout-out in the intro. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: update copyright years to include 2026 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: link first DDD mention to source on GitHub main Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: show actual rendered values in dtype table Buckaroo display column Replace generic type names with example values buckaroo actually displays: 1,234 for integers, 1d 2h 3m 4s for durations, 68656c6c6f for binary, etc. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: fix dtype table — actual display values, footnotes, no blank cells - Replace generic type names with actual buckaroo display values - Add footnotes for BigInt (stringified, no commas) and Period (time span) - Fill all blank cells with — for dtypes that don't exist in that engine - Clarify Period label as "Period (time span)" - Fix Nullable int/float/bool row with proper values Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * WIP * docs: remove content-plan.md from ddd-post branch This file belongs on the content-plan branch (PR #638), not here. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: address inline review comments on DDD article - Shorten Cecil Curry praise (remove "makes open source worth doing") - Add LLM-generated DataFrames and inherited pipelines to "why this matters" - Fix "three values" → "three non-numeric values" for infinity/NaN section - Remove duplicate None mention from MultiIndex rows section - Add note about planned MultiIndex-both-axes improvements - Update footnote 1: "putting together this table exposed areas that need work" - Fix comma→period typo in footnote 1 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * build: auto-create static stubs in hatch hook, remove manual touch hacks The hatch build hook (initialize2 → initialize) now auto-creates empty stub files in buckaroo/static/ when the real JS artifacts haven't been built. This eliminates the need for manual mkdir/touch blocks in CI and ReadTheDocs. - scripts/hatch_build.py: rename initialize2 → initialize (was dead code), create stubs for editable installs, build JS for wheel builds - pyproject.toml: use glob for artifacts (buckaroo/static/*.js|*.css) instead of incomplete file list - checks.yml: remove 4 separate mkdir/touch stub blocks - .readthedocs.yaml: remove pnpm install for js-core (stubs handle it) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * build: stop tracking standalone.js/css in git These are build artifacts produced by full_build.sh. They're already in .gitignore but were force-tracked. The glob artifact pattern in pyproject.toml ensures they're still included in the wheel. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: build all static assets in hatch hook pnpm fallback The pnpm fallback only built buckaroo-widget (widget.js/css) but not compiled.css, standalone.js/css, or static-embed.js/css. A bare `uv build` would produce an incomplete wheel. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 00eb5c6 commit bd20ac6

6 files changed

Lines changed: 61 additions & 383 deletions

File tree

.github/workflows/checks.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,6 @@ jobs:
297297
enable-cache: true
298298
python-version: ${{ matrix.python-version }}
299299
prune-cache: false
300-
- name: setup js files
301-
run: |
302-
mkdir buckaroo/static || true
303-
touch buckaroo/static/compiled.css
304-
touch buckaroo/static/widget.js
305-
touch buckaroo/static/widget.css
306300
- name: Install the project
307301
run: uv sync --all-extras --dev
308302
- name: Run tests
@@ -325,12 +319,6 @@ jobs:
325319
enable-cache: true
326320
python-version: ${{ matrix.python-version }}
327321
prune-cache: false
328-
- name: setup js files
329-
run: |
330-
mkdir buckaroo/static || true
331-
touch buckaroo/static/compiled.css
332-
touch buckaroo/static/widget.js
333-
touch buckaroo/static/widget.css
334322
- name: Install the project with maximum versions
335323
run: |
336324
rm -f uv.lock
@@ -357,13 +345,6 @@ jobs:
357345
enable-cache: true
358346
python-version: "3.13"
359347
prune-cache: false
360-
- name: setup js files
361-
shell: bash
362-
run: |
363-
mkdir -p buckaroo/static
364-
touch buckaroo/static/compiled.css
365-
touch buckaroo/static/widget.js
366-
touch buckaroo/static/widget.css
367348
- name: Install the project
368349
run: uv sync --all-extras --dev
369350
- name: Run tests
@@ -683,10 +664,6 @@ jobs:
683664
run: uv sync --locked --all-extras --dev
684665
- name: Check docs build and links
685666
run: |
686-
mkdir -p buckaroo/static || true
687-
touch buckaroo/static/compiled.css
688-
touch buckaroo/static/widget.js
689-
touch buckaroo/static/widget.css
690667
mkdir -p docs/build/html
691668
uv run pytest --check-links docs/source/*.rst || uv run pytest --check-links --lf docs/source/*.rst
692669
uv run pytest --check-links docs/example-notebooks/*.ipynb || uv run pytest --check-links --lf docs/example-notebooks/*.ipynb

buckaroo/static/standalone.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)