Skip to content

DOC-6763 investigate automating binder notebook creation#3531

Open
andy-stark-redis wants to merge 17 commits into
mainfrom
DOC-6763-investigate-automating-binder-notebook-creation
Open

DOC-6763 investigate automating binder notebook creation#3531
andy-stark-redis wants to merge 17 commits into
mainfrom
DOC-6763-investigate-automating-binder-notebook-creation

Conversation

@andy-stark-redis

@andy-stark-redis andy-stark-redis commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Note: not finished - this is to get Bugbot feedback, etc.


Note

Medium Risk
New automation touches external binder-launchers clones, Docker execution, and CI gates; kernel-name fixes affect all regenerated Node/Go notebooks. Work is marked WIP but correctness of sync/verify behavior matters for published Binder environments.

Overview
Extends jupyterize into an end-to-end path from docs examples to binder-launchers branches: ship notebooks (demo.ipynb) plus assert-bearing test notebooks (demo.test.ipynb), with local and CI verification before deploy.

Generation & parsing: New --with-tests keeps REMOVE blocks as cells tagged test (nested REMOVE handled by depth). Notebooks get deterministic cell{i} ids. Kernel names in config.py align with real Binder images: Node jslab, Go gonb.

Unwrapping: Orphan trailing } from class/method wrappers split across cells are stripped via brace-aware logic (strings/comments ignored), with new tests.

New tooling: verify.py runs a generated test notebook in the pinned base image (Redis + kernel or Python script mode). sync_notebook.py reads BINDER_ID, jupyterizes both notebooks into the matching branch, runs verify.py as a pre-check, upgrades verify-gated GitHub workflow / .dockerignore, and optionally commits/pushes. Documents Node/Go kernel limitations in js-notebook-findings.md.

Examples: Adds redis-py doctest sources for time series (python-dt-timeseries) and vector sets (python-dt-vector-set) with step markers and asserts for the pipeline.

Reviewed by Cursor Bugbot for commit 49c9bde. Bugbot is set up for automated code reviews on this repo. Configure here.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

DOC-6763

@jit-ci

jit-ci Bot commented Jun 19, 2026

Copy link
Copy Markdown

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

Comment thread build/jupyterize/sync_notebook.py
Comment thread build/jupyterize/sync_notebook.py Outdated
Comment thread build/jupyterize/verify.py Outdated
Comment thread local_examples/vecset_tutorial/redis-py/dt_vec_set.py
Comment thread build/jupyterize/sync_notebook.py
Comment thread build/jupyterize/sync_notebook.py
Comment thread build/jupyterize/unwrapper.py Outdated
Comment thread build/jupyterize/parser.py
Comment thread build/jupyterize/sync_notebook.py
Comment thread build/jupyterize/sync_notebook.py Outdated
Comment thread local_examples/time_series_tutorial/redis-py/dt_time_series.py
Comment thread build/jupyterize/verify.py Outdated
Comment thread build/jupyterize/unwrapper.py
Comment thread build/jupyterize/sync_notebook.py
Comment thread build/jupyterize/sync_notebook.py Outdated
Comment thread build/jupyterize/sync_notebook.py Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 49c9bde. Configure here.


res40 = r.vset().vdim("setReduced") # >>> 100
print(res40)
# STEP_END

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Vecset example missing assert coverage

Low Severity

The new vecset example’s add_quant REMOVE block only asserts res31, and the final add_reduce step has no REMOVE block at all. demo.test.ipynb verification can pass while vemb results or dimension-reduction behavior are wrong.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 49c9bde. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants