commits
This reverts commit a925adaee5433e46f8b040620a7cf5af823a8f22.
58b5d1dd Merge commit '696b8f1cab29b949ae15ea865c8c7ce8f202c8a8'
e410f6cf jon-shell css: reduce body font to 16px and set x-ocaml editor font size
fc897c09 Add odoc-standalone package scaffolding
3dac9f7d Merge commit 'b2b6f8127c880f184ba686ee2ec37d4fdcc31dab'
9706a259 doc fixes mainly
483c869b fix(odoc): add missing dependency base64
de593b37 Add missing dependency: base64
2cb07b81 fix(odoc): strip inline include decls to reduce memory usage 5.7x
git-subtree-dir: odoc
git-subtree-split: 58b5d1ddc38ae3f99d9b3621706a35e74c2636d5
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gen_blog_index.exe now writes into _blog_gen/ directory (instead of
overwriting in place) and runs from site/ cwd. dune.inc gains a
(dir _blog_gen) rule plus per-index diff rules under @runtest, so
`dune runtest site/` detects stale indexes and `dune promote` updates them.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Scan site/blog/ instead of blog/
- Write indexes to site/blog/ paths
- Use !/jon-site/blog/ odoc references (matching existing indexes)
- Accept both 4-part and 5-part path splits for flexibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@published is now a custom tag in Comment.docs.elements, not in
Frontmatter.other_config (which no longer exists). Extract it by
scanning page.content for `Custom ("published", payload) tags.
Also update odocl search path to _build/default/site/_odoc/blog
and fix dune dependencies (drop ppx_deriving_yojson, add odoc.html
odoc.document odoc.model fmt tyxml).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New blog posts:
- 2026/02 weeknotes weeks 7-8, odoc notebooks fun
- 2026/03 weeknotes week 9 (with mapdemo.mov and search.png)
Scripts: gen_atom (Atom feed), gen_blog_index, mld helpers
Also adds interactive_map notebook.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Interactive mode was incorrectly set to read-only, preventing users
from typing in code cells. Interactive cells should be editable with
ephemeral changes (lost on refresh), unlike Exercise cells which
persist edits to localStorage.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Both interactive and scrollycode extensions now check
_build/install/default/share/x-ocaml/x-ocaml.js (walking up from CWD)
before falling back to opam share. This avoids requiring 'dune install
x-ocaml' as a separate step.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Install odoc-jon-shell, odoc-interactive-extension, and
odoc-scrollycode-extension instead of x-ocaml (which doesn't need
installing since it's found from _build/install/)
- Fix odoc.support copy to use mkdir -p and glob pattern
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Commands sent before Leaflet finishes loading were silently dropped.
Now they are queued and replayed once the map initializes. This fixes
enableBboxDraw being lost when called immediately after display_managed.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add tessera-geotessera-jsoo and tessera-viz-jsoo to the jtw opam
universe so the interactive map notebook can load them.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Self-contained HTML shell plugin that inlines all CSS and JS into
each page. Font URLs rewritten to Google Fonts CDN for odoc fonts
and jsDelivr CDN for KaTeX fonts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
71fe7ccd3 Merge branch 'point-release-fixes' of https://github.com/jonludlam/odoc
4d53f50da Make all warnings respect --warn-error
d1f796f14 Add test showing --warn-error doesn't affect unresolved references
d6c8ece57 Don't resolve imports without digests during compile
18adbf89b Add test for no-alias-deps import resolution bug
c3f0f46ee Update for dune 3.21
git-subtree-dir: odoc
git-subtree-split: 71fe7ccd36eee7f244a355653e10de197d6bcb94
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests addMarker, clearMarkers, addImageOverlay, removeImageOverlay
commands in a standalone HTML page.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New commands:
- enableBboxDraw: custom rectangle drawing with bbox_drawn event
- addImageOverlay/removeImageOverlay: display data URL images on map
- addMarker/clearMarkers: circle markers with labels
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests PNG encoding and data URL generation in a web worker.
Verified: 4x4 RGBA image encodes to valid PNG, renders as <img>.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests run in a web worker (sync XHR requires worker context).
Fetches a real scales.npy from dl2.geotessera.org, parses it,
and verifies the shape and data values.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Widen sidebar from 200px to 260px with updated max-width calculations
- Collapse top two wrapper levels so content aligns with header
- Add border-left indentation guides on nested lists
- Replace original toggle arrows with larger inline chevrons (1em, rotate on expand)
- Separate click targets: chevrons toggle expand/collapse, links navigate
- Align childless items with toggle items via 20px margin-left
- Fix CSS cascade where .jon-shell-main ul overrode sidebar ul padding
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add browser test that compiles OCaml to JS via js_of_ocaml and verifies
fetch, npy parsing, and mosaic assembly work in a real browser.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of requiring every .mld file to specify @x-ocaml.universe and
@x-ocaml.worker tags individually, configure the default universe path
once in dune-workspace (--config x-ocaml.universe=/_opam). The shell
emits <meta> tags from config values, and per-page @x-ocaml tags can
still override them.
Changes:
- dune-workspace: add --config x-ocaml.universe=/_opam to html_flags
- gen_rules.ml: pass --config to odoc html-generate for @site build
- odoc_jon_shell.ml: emit <meta> tags from x-ocaml.* config values
- odoc generator.ml: pass config to shell page_creator
- interactive_extension.ml: upsert meta tags (update existing or create)
- x_ocaml.ml: infer jtw backend from x-ocaml-universe meta tag
- Remove @x-ocaml.universe/@x-ocaml.worker from 14 .mld files using
the default /_opam universe
- deploy-site.sh: add dune install x-ocaml, chmod fix, widget-leaflet
- findlibish.ml: module detection fallback via jsoo runtime
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Generate tessera-viz.opam from dune-project. All odoc documentation
is in the .mli with section headers and docstrings for every public
type and function.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add color_of_hex for parsing hex color strings and classification_to_rgba
for mapping integer class predictions to colored RGBA pixels. Unknown
classes render as black. Add unit arg to resolve optional alpha parameter.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Convert 3-component PCA matrix to false-color RGBA image with
per-component percentile clipping and 0-255 scaling. Optional args
moved before positional to satisfy OCaml's optional-arg resolution.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add the tessera-viz library skeleton with dune-project, .mli interface,
and a working percentile function with linear interpolation. Other API
functions are stubbed with failwith for TDD iteration.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Generate opam file from dune-project. All 15 tests pass across grid
math, dequantization, mosaic, and fetch_mosaic_sync.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add end-to-end test for fetch_mosaic_sync using mock fetch function
with numpy fixture files. Verifies the full pipeline: bbox -> tile
enumeration -> fetch -> dequantize -> mosaic -> correct output values.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add mosaic tests verifying horizontal and vertical tile assembly.
North tiles appear at top (row 0), south at bottom. Confirms correct
grid position calculation and data placement.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add dequantization test with numpy fixtures (2x3x4 int8 embeddings,
2x3 float32 scales). Verifies correct int8 * scale multiplication
and output matrix dimensions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add new tessera-geotessera library with dune project structure, public
API (.mli), and grid math implementation (snap_to_grid, tiles_for_bbox,
tile_name, URL construction). Includes full implementations of
dequantize, mosaic, and fetch_mosaic_sync. Grid math tests all pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add trailing-comma (1D shape) and scalar shape edge case tests
- Comprehensive .mli documentation with usage example
- Auto-generated opam file
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Each foundations lecture now specifies @x-ocaml.universe and
@x-ocaml.worker so interactive code cells use the correct opam
package set.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Site pages (blog, notebooks) don't need the reference sidebar — it's only
for @doc output. Also adds the opam universe build step to deploy-site.sh,
copies odoc.support into the site tree, and refreshes the homepage with
recent entries and an about section.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switch from server-rendered sidebar to JS-rendered sidebar from
sidebar_data JSON (same approach as odoc-docsite). On link clicks
within /reference/, fetch the page, swap .odoc-content, update title
and body class — no full reload. Back/forward via popstate.
- New odoc_jon_shell_js.ml: sidebar rendering, collapsible entries,
SPA navigation with click interception and resource deduplication
- odoc_jon_shell.ml: inject BASE_URL/CURRENT_URL/sidebar JSON in head,
register JS support file, empty sidebar container filled by JS,
extension resources moved to head for SPA discovery
- odoc_jon_shell_css.ml: collapsible toggle triangles, sidebar-label
styling for non-link entries
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add sidebar pipeline: compile-index → sidebar-generate → html-generate --sidebar
- jon-shell: render sidebar nav with sticky CSS layout
- Convert all {@ocamltop blocks to {@ocaml for interactive extension
- odoc-interactive-extension: handle autorun (→ run-on=load) and skip tags
- Remove package prefix from URLs (parent-id uses "." for root pages)
- Add projects/index.mld placeholder, @children_order for notebooks
- Add (prefix reference) to dune-workspace for @doc output
- Update deploy-site.sh for two-pass build (site + reference docs)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
58b5d1dd Merge commit '696b8f1cab29b949ae15ea865c8c7ce8f202c8a8'
e410f6cf jon-shell css: reduce body font to 16px and set x-ocaml editor font size
fc897c09 Add odoc-standalone package scaffolding
3dac9f7d Merge commit 'b2b6f8127c880f184ba686ee2ec37d4fdcc31dab'
9706a259 doc fixes mainly
483c869b fix(odoc): add missing dependency base64
de593b37 Add missing dependency: base64
2cb07b81 fix(odoc): strip inline include decls to reduce memory usage 5.7x
git-subtree-dir: odoc
git-subtree-split: 58b5d1ddc38ae3f99d9b3621706a35e74c2636d5
gen_blog_index.exe now writes into _blog_gen/ directory (instead of
overwriting in place) and runs from site/ cwd. dune.inc gains a
(dir _blog_gen) rule plus per-index diff rules under @runtest, so
`dune runtest site/` detects stale indexes and `dune promote` updates them.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@published is now a custom tag in Comment.docs.elements, not in
Frontmatter.other_config (which no longer exists). Extract it by
scanning page.content for `Custom ("published", payload) tags.
Also update odocl search path to _build/default/site/_odoc/blog
and fix dune dependencies (drop ppx_deriving_yojson, add odoc.html
odoc.document odoc.model fmt tyxml).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
71fe7ccd3 Merge branch 'point-release-fixes' of https://github.com/jonludlam/odoc
4d53f50da Make all warnings respect --warn-error
d1f796f14 Add test showing --warn-error doesn't affect unresolved references
d6c8ece57 Don't resolve imports without digests during compile
18adbf89b Add test for no-alias-deps import resolution bug
c3f0f46ee Update for dune 3.21
git-subtree-dir: odoc
git-subtree-split: 71fe7ccd36eee7f244a355653e10de197d6bcb94
- Widen sidebar from 200px to 260px with updated max-width calculations
- Collapse top two wrapper levels so content aligns with header
- Add border-left indentation guides on nested lists
- Replace original toggle arrows with larger inline chevrons (1em, rotate on expand)
- Separate click targets: chevrons toggle expand/collapse, links navigate
- Align childless items with toggle items via 20px margin-left
- Fix CSS cascade where .jon-shell-main ul overrode sidebar ul padding
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of requiring every .mld file to specify @x-ocaml.universe and
@x-ocaml.worker tags individually, configure the default universe path
once in dune-workspace (--config x-ocaml.universe=/_opam). The shell
emits <meta> tags from config values, and per-page @x-ocaml tags can
still override them.
Changes:
- dune-workspace: add --config x-ocaml.universe=/_opam to html_flags
- gen_rules.ml: pass --config to odoc html-generate for @site build
- odoc_jon_shell.ml: emit <meta> tags from x-ocaml.* config values
- odoc generator.ml: pass config to shell page_creator
- interactive_extension.ml: upsert meta tags (update existing or create)
- x_ocaml.ml: infer jtw backend from x-ocaml-universe meta tag
- Remove @x-ocaml.universe/@x-ocaml.worker from 14 .mld files using
the default /_opam universe
- deploy-site.sh: add dune install x-ocaml, chmod fix, widget-leaflet
- findlibish.ml: module detection fallback via jsoo runtime
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add new tessera-geotessera library with dune project structure, public
API (.mli), and grid math implementation (snap_to_grid, tiles_for_bbox,
tile_name, URL construction). Includes full implementations of
dequantize, mosaic, and fetch_mosaic_sync. Grid math tests all pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Site pages (blog, notebooks) don't need the reference sidebar — it's only
for @doc output. Also adds the opam universe build step to deploy-site.sh,
copies odoc.support into the site tree, and refreshes the homepage with
recent entries and an about section.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switch from server-rendered sidebar to JS-rendered sidebar from
sidebar_data JSON (same approach as odoc-docsite). On link clicks
within /reference/, fetch the page, swap .odoc-content, update title
and body class — no full reload. Back/forward via popstate.
- New odoc_jon_shell_js.ml: sidebar rendering, collapsible entries,
SPA navigation with click interception and resource deduplication
- odoc_jon_shell.ml: inject BASE_URL/CURRENT_URL/sidebar JSON in head,
register JS support file, empty sidebar container filled by JS,
extension resources moved to head for SPA discovery
- odoc_jon_shell_css.ml: collapsible toggle triangles, sidebar-label
styling for non-link entries
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add sidebar pipeline: compile-index → sidebar-generate → html-generate --sidebar
- jon-shell: render sidebar nav with sticky CSS layout
- Convert all {@ocamltop blocks to {@ocaml for interactive extension
- odoc-interactive-extension: handle autorun (→ run-on=load) and skip tags
- Remove package prefix from URLs (parent-id uses "." for root pages)
- Add projects/index.mld placeholder, @children_order for notebooks
- Add (prefix reference) to dune-workspace for @doc output
- Update deploy-site.sh for two-pass build (site + reference docs)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>