Skip to content

Migrate build system to hatchling and upgrade to JupyterLab 4#91

Open
smahn9123 wants to merge 2 commits into
jupyter-widgets-contrib:masterfrom
smahn9123:migrate-jupyterlab4-hatchling
Open

Migrate build system to hatchling and upgrade to JupyterLab 4#91
smahn9123 wants to merge 2 commits into
jupyter-widgets-contrib:masterfrom
smahn9123:migrate-jupyterlab4-hatchling

Conversation

@smahn9123
Copy link
Copy Markdown

@smahn9123 smahn9123 commented Mar 25, 2026

Summary

  • Replace jupyter_packaging + setuptools with hatchling + hatch-jupyter-builder for a modern build pipeline
  • Upgrade from JupyterLab 3 to JupyterLab 4 (@jupyterlab/builder ^3 → ^4)
  • Update CI: actions/checkout@v4, setup-miniconda@v3, Python 3.10, Node.js 18
  • Remove legacy files: setup.py, setup.cfg, MANIFEST.in, pytest.ini (merged into pyproject.toml)
  • Use hatch-nodejs-version to derive version from js/package.json
  • Use importlib.metadata in _version.py
  • Add stress test notebook covering large trees, icon styles, dynamic operations, selection events, deep nesting, and scale testing

Motivation

The current CI is broken because yarn install fails under the outdated toolchain (Node.js 14, Python 3.8, jupyter_packaging ~0.7.0). Rather than patching the old setup, this PR modernizes the entire build system to align with the current Jupyter ecosystem.

Replace jupyter_packaging + setuptools with hatchling + hatch-jupyter-builder
for a modern build pipeline. Update CI to use current toolchain versions.

- Replace setup.py/setup.cfg/MANIFEST.in/pytest.ini with pyproject.toml
- Use hatch-nodejs-version to derive version from js/package.json
- Use importlib.metadata in _version.py
- Bump @jupyterlab/builder from ^3 to ^4
- Regenerate yarn.lock
- Update CI: actions/checkout@v4, setup-miniconda@v3,
  Python 3.10, Node.js 18, JupyterLab 4
- Add pytest step to CI workflow
Covers: large trees, icon styles, dynamic operations,
selection events, deep nesting, property toggles,
positional insert, single selection, and scale testing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant