Skip to content

Commit 0c1b9dd

Browse files
authored
docs: compatibility and maintenance plans (#50)
* docs: compatibility and maintenance plans * chore: lock file * chore: stricter versioning
1 parent b669930 commit 0c1b9dd

File tree

6 files changed

+331
-287
lines changed

6 files changed

+331
-287
lines changed

CONTRIBUTING.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,25 +146,29 @@ jlpm test
146146

147147
We follow [Semantic Versioning (semver)](https://semver.org/).
148148

149-
The extension pins JupyterLab to the current major version in both Python and JavaScript dependencies to ensure compatibility.
149+
The extension requires **JupyterLab 4.4.0 or higher** (but not JupyterLab 5.x) due to its dependency on the content provider registry API. All JupyterLab dependencies include upper bounds to prevent automatic installation with incompatible future major versions.
150150

151-
**Example `pyproject.toml` dependency:**
151+
**Current `pyproject.toml` build requirement:**
152152

153153
```toml
154-
[project.optional-dependencies]
155-
jupyterlab = ["jupyterlab>=4.0.0,<5.0.0"]
154+
[build-system]
155+
requires = ["hatchling>=1.5.0", "jupyterlab>=4.4.0,<5", "hatch-nodejs-version>=0.3.2"]
156156
```
157157

158-
**Example `package.json` peerDependencies:**
158+
**Current `package.json` dependencies with upper bounds:**
159159

160160
```json
161-
"peerDependencies": {
162-
"@jupyterlab/application": "^4.0.0",
163-
"@jupyterlab/apputils": "^4.0.0",
164-
"jupyterlab": "^4.0.0"
161+
"dependencies": {
162+
"@jupyterlab/application": "^4.4.0 <5",
163+
"@jupyterlab/notebook": "^4.4.7 <5",
164+
"@jupyterlab/services": "^7.0.0 <8",
165+
"@jupyterlab/coreutils": "^6.0.0 <7",
166+
...
165167
}
166168
```
167169

170+
These upper bounds help prevent breaking changes from affecting users and align with JupyterLab's [extension development best practices](https://jupyterlab.readthedocs.io/en/stable/extension/extension_dev.html#overview-of-extensions).
171+
168172
## Sync with the JupyterLab extension template
169173

170174
This project was bootstrapped using the [JupyterLab extension template](https://github.com/jupyterlab/extension-template). To keep your project up to date with improvements and best practices from the template, run:

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Read‑only viewer for Deepnote `.deepnote` files inside JupyterLab.
88
## Requirements
99

1010
- Python 3.9 or higher
11-
- JupyterLab 4.5.0 or higher
11+
- JupyterLab >= 4.4.0, < 5.0.0
1212

1313
## Install
1414

@@ -50,6 +50,37 @@ To remove the extension, run:
5050
pip uninstall jupyterlab_deepnote
5151
```
5252

53+
## Compatibility
54+
55+
### JupyterLab Version Support
56+
57+
This extension is compatible with **JupyterLab 4.4.0 or higher**. It requires the content provider registry API introduced in JupyterLab 4.4.
58+
59+
**Upper bound:** The extension sets an upper bound of `< 5.0.0` to prevent automatic installation with potentially incompatible future major versions of JupyterLab.
60+
61+
### Maintenance Policy
62+
63+
Following [JupyterLab's extension development guidelines](https://jupyterlab.readthedocs.io/en/stable/extension/extension_dev.html#overview-of-extensions), we adhere to semantic versioning principles:
64+
65+
- **Major releases** (e.g., 1.0.0 → 2.0.0): May introduce breaking changes and require user action
66+
- **Minor releases** (e.g., 1.0.0 → 1.1.0): Add new features while maintaining backwards compatibility
67+
- **Patch releases** (e.g., 1.0.0 → 1.0.1): Bug fixes and minor improvements only
68+
69+
When JupyterLab 5.x is released, we will:
70+
71+
1. Evaluate the changes and update the extension as needed
72+
2. Release a new major or minor version with explicit JupyterLab 5.x support
73+
3. Clearly document any breaking changes in the changelog
74+
75+
### Backwards Compatibility
76+
77+
This extension follows semantic versioning for its own API:
78+
79+
- **Current version (0.x.x)**: Pre-release phase. APIs may change without prior notice.
80+
- **Version 1.0.0 onwards**: We will maintain backwards compatibility within major versions and clearly document breaking changes between major versions.
81+
82+
Note: This extension does **not** support JupyterLab 3.x or earlier versions.
83+
5384
## Contributing
5485

5586
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on how to contribute to this project.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@
6060
},
6161
"dependencies": {
6262
"@deepnote/blocks": "^1.1.0",
63-
"@jupyterlab/application": "^4.0.0",
64-
"@jupyterlab/coreutils": "^6.0.0",
65-
"@jupyterlab/notebook": "^4.4.7",
66-
"@jupyterlab/services": "^7.0.0",
67-
"@jupyterlab/settingregistry": "^4.0.0",
63+
"@jupyterlab/application": "^4.4.0 <5",
64+
"@jupyterlab/coreutils": "^6.0.0 <7",
65+
"@jupyterlab/notebook": "^4.4.7 <5",
66+
"@jupyterlab/services": "^7.0.0 <8",
67+
"@jupyterlab/settingregistry": "^4.4.0 <5",
6868
"@lumino/widgets": "^2.7.1",
6969
"lodash": "^4.17.21",
7070
"yaml": "^2.8.1",
7171
"zod": "^4.1.11"
7272
},
7373
"devDependencies": {
74-
"@jupyterlab/builder": "^4.0.0",
75-
"@jupyterlab/testutils": "^4.0.0",
74+
"@jupyterlab/builder": "^4.4.0 <5",
75+
"@jupyterlab/testutils": "^4.4.0 <5",
7676
"@types/jest": "^29.2.0",
7777
"@types/json-schema": "^7.0.11",
7878
"@types/lodash": "^4.17.20",

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0,<5", "hatch-nodejs-version>=0.3.2"]
2+
requires = ["hatchling>=1.5.0", "jupyterlab>=4.4.0,<5", "hatch-nodejs-version>=0.3.2"]
33
build-backend = "hatchling.build"
44

55
[project]
@@ -78,7 +78,7 @@ version_cmd = "hatch version"
7878

7979
[tool.jupyter-releaser.hooks]
8080
before-build-npm = [
81-
"python -m pip install 'jupyterlab>=4.0.0,<5'",
81+
"python -m pip install 'jupyterlab>=4.4.0,<5'",
8282
"jlpm",
8383
"jlpm build:prod"
8484
]

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ const plugin: JupyterFrontEndPlugin<void> = {
2727
toolbarRegistry: IToolbarWidgetRegistry
2828
) => {
2929
// Register a custom contents provider for the default notebook widget factory.
30+
// Note: Content provider registry is required (available in JupyterLab 4.4+)
3031
const drive = (app.serviceManager.contents as ContentsManager).defaultDrive;
3132
const registry = drive?.contentProviderRegistry;
3233
if (!registry) {
33-
// If content provider is a non-essential feature and support for JupyterLab <4.4 is desired:
3434
console.error(
35-
'Cannot initialize content provider: no content provider registry.'
35+
'Cannot initialize content provider: no content provider registry. JupyterLab 4.4.0 or higher is required.'
3636
);
3737
return;
3838
}

0 commit comments

Comments
 (0)