A monorepo containing jupyter-blocks and jupyter-tidyblocks. Blockly extension for JupyterLab.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update docs: getting-started install flow and modernization-plan Phase 7

getting-started.md:
- Replace single-package pip install with two-package install (jupyter_blocks
then jupyter_tidyblocks) in both PyPI and source sections
- Update version numbers to 0.1.0-alpha.0
- Developer workflow: replace `jupyter labextension develop . --overwrite`
with `pip install --no-deps --force-reinstall` after each build

modernization-plan.md:
- Add historical-document note and update title/version to current names
- Add Phase 7: monorepo restructure (packages/blockly → packages/blocks,
new tidyblocks-extension, two Python packages, build fixes)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

+71 -15
+22 -12
docs/getting-started.md
··· 28 28 ### From PyPI (once published) 29 29 30 30 ```bash 31 + # Tidy data extension (automatically installs jupyter_blocks as a dependency) 31 32 pip install jupyter_tidyblocks 33 + 34 + # Or install only the core Blockly editor: 35 + pip install jupyter_blocks 32 36 ``` 33 37 34 38 ### From source (development install) ··· 38 42 git clone https://github.com/teonbrooks/jupyter-blocks.git 39 43 cd jupyter-blocks 40 44 41 - # 2. Install the Python package and build the JS packages 42 - pip install -e ".[dev]" 43 - jupyter labextension develop . --overwrite 45 + # 2. Install JavaScript dependencies and build all packages 46 + npm install 44 47 npm run build 45 48 46 - # 3. Verify the extension is registered 49 + # 3. Install both Python packages in editable mode 50 + pip install -e ./jupyter_blocks 51 + pip install -e ./jupyter_tidyblocks 52 + 53 + # 4. Verify the extensions are registered 47 54 jupyter labextension list 48 55 ``` 49 56 50 - You should see a line like: 57 + You should see lines like: 51 58 52 59 ``` 53 - jupyter-blocks-extension v0.1.0 enabled OK (python, jupyter_blocks) 54 - jupyter-tidyblocks-extension v0.1.0 enabled OK (python, jupyter_tidyblocks) 60 + jupyter-blocks-extension v0.1.0-alpha.0 enabled OK (python, jupyter_blocks) 61 + jupyter-tidyblocks-extension v0.1.0-alpha.0 enabled OK (python, jupyter_tidyblocks) 55 62 ``` 56 63 57 64 --- ··· 239 246 npm run watch 240 247 ``` 241 248 242 - To run unit tests: 249 + After rebuilding, reinstall the Python packages so the updated labextension 250 + bundles are deployed to JupyterLab's data directory: 243 251 244 252 ```bash 245 - npm test 253 + pip install --no-deps --force-reinstall -e ./jupyter_blocks 254 + pip install --no-deps --force-reinstall -e ./jupyter_tidyblocks 246 255 ``` 247 256 248 - To rebuild and reinstall the labextension into JupyterLab's static assets 249 - (needed if you change the extension's Module Federation output): 257 + Then hard-refresh JupyterLab in the browser (`Cmd+Shift+R` / `Ctrl+Shift+R`). 258 + 259 + To run unit tests: 250 260 251 261 ```bash 252 - jupyter labextension develop . --overwrite 262 + npm test 253 263 ```
+49 -3
docs/modernization-plan.md
··· 1 - # jupyter-tidyblocks Modernization Plan 1 + # jupyter-blocks Modernization Plan 2 + 3 + > **Historical document.** This plan was written during initial development. Phases 1–6 track the 4 + > migration from `jupyterlab-blockly` to `jupyter-tidyblocks`. **Phase 7** covers the subsequent 5 + > monorepo restructure that split the project into two independently installable packages: 6 + > `jupyter-blocks` (generic Blockly editor) and `jupyter-tidyblocks` (tidy-data layer). 2 7 3 8 **Base project:** jupyterlab-blockly v0.3.3 (forked from QuantStack/jupyterlab-blockly) 4 - **Target name:** jupyter-tidyblocks 5 - **Target version:** 0.1.0 9 + **Current name:** jupyter-blocks / jupyter-tidyblocks 10 + **Current version:** 0.1.0-alpha.0 6 11 7 12 --- 8 13 ··· 261 266 - `pyproject.toml` (all path references) 262 267 - `packages/blockly-extension/package.json` (`outputDir`) 263 268 - `turbo.json` (outputs glob) 269 + 270 + --- 271 + 272 + ## Phase 7 — Monorepo Restructure: jupyter-blocks + jupyter-tidyblocks ✅ 273 + 274 + **Status: Complete** 275 + 276 + Split the single-package project into two independently installable JupyterLab extensions 277 + within the same monorepo. 278 + 279 + | Before | After | 280 + |---|---| 281 + | `packages/blockly/` (`jupyter-tidyblocks`) | `packages/blocks/` (`jupyter-blocks`) | 282 + | `packages/blockly-extension/` (`jupyter-tidyblocks-extension`) | `packages/blocks-extension/` (`jupyter-blocks-extension`) | 283 + | — | `packages/tidyblocks-extension/` (new thin wiring plugin) | 284 + | `jupyter_tidyblocks/pyproject.toml` (root-level) | `jupyter_blocks/pyproject.toml` + `jupyter_tidyblocks/pyproject.toml` | 285 + 286 + ### Key changes 287 + 288 + - **`packages/blocks`**: renamed from `packages/blockly`; `registerTidyblocks` call removed; plugin id `jupyter-blocks:plugin`; file extension `.jpblockly` → `.jblk`; `@jupyterlab/*` and `@lumino/*` moved to `peerDependencies` 289 + - **`packages/blocks-extension`**: renamed from `packages/blockly-extension`; `outputDir` → `../../jupyter_blocks/labextension` 290 + - **`packages/tidyblocks-extension`**: new package; thin plugin that calls `registerTidyblocks(registry)` using the `IBlocklyRegistry` token from `jupyter-blocks` 291 + - **`jupyter_blocks/`**: new Python package; `pyproject.toml` with `hatch-nodejs-version` version source pointing to `packages/blocks-extension/package.json` 292 + - **`jupyter_tidyblocks/`**: Python package moved out of repo root into subdirectory; depends on `jupyter_blocks` 293 + 294 + ### Build fixes (also resolved in Phase 7) 295 + 296 + - Replaced `jupyter labextension build` with direct `build-labextension` calls to bypass the `jlpm` install step that conflicts with npm workspace symlinks 297 + - Fixed turbo output declarations: each extension package now has its own `turbo.json` listing only its own labextension output; prevents cache restores from overwriting freshly built artifacts 298 + - Added `LICENSE` and `README.md` symlinks to each Python package directory for hatchling 299 + - Added versioned npm override `@jupyterlab/coreutils@<6 → 6.5.6` and `postinstall` cleanup to eliminate `crypto@1.0.1` deprecation warning 300 + 301 + ### Build system summary (current) 302 + 303 + | Package | Build tool | Status | 304 + |---|---|---| 305 + | `packages/blocks` | **Vite** library mode | ✅ | 306 + | `packages/blocks-extension` | **`@jupyterlab/builder ^4.5`** (webpack 5) via `build-labextension` | ✅ | 307 + | `packages/tidyblocks` | **Vite** library mode | ✅ | 308 + | `packages/tidyblocks-extension` | **`@jupyterlab/builder ^4.5`** via `build-labextension` | ✅ | 309 + | Monorepo orchestration | **Turborepo** | ✅ | 264 310 265 311 --- 266 312