Skip to content

Commit 787f103

Browse files
authored
Merge pull request #12 from jtpio/drop-nbdime
Drop support for `nbdime` diffs
2 parents b814678 + 025fd1a commit 787f103

File tree

14 files changed

+20
-566
lines changed

14 files changed

+20
-566
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ jobs:
3535
set -eux
3636
python -m pip install .[test]
3737
38-
jupyter server extension list
39-
jupyter server extension list 2>&1 | grep -ie "jupyterlab_cell_diff.*OK"
40-
4138
jupyter labextension list
4239
jupyter labextension list 2>&1 | grep -ie "jupyterlab-cell-diff.*OK"
4340
python -m jupyterlab.browser_check
@@ -79,10 +76,6 @@ jobs:
7976
8077
pip install "jupyterlab>=4.0.0,<5" jupyterlab_cell_diff*.whl
8178
82-
83-
jupyter server extension list
84-
jupyter server extension list 2>&1 | grep -ie "jupyterlab_cell_diff.*OK"
85-
8679
jupyter labextension list
8780
jupyter labextension list 2>&1 | grep -ie "jupyterlab-cell-diff.*OK"
8881
python -m jupyterlab.browser_check --no-browser-test

CONTRIBUTING.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ The `jlpm` command is JupyterLab's pinned version of
1515
pip install -e "."
1616
# Link your development version of the extension with JupyterLab
1717
jupyter labextension develop . --overwrite
18-
# Server extension must be manually installed in develop mode
19-
jupyter server extension enable jupyterlab_cell_diff
2018
# Rebuild extension Typescript source after making changes
2119
jlpm build
2220
```
@@ -42,7 +40,6 @@ jupyter lab build --minimize=False
4240

4341
```bash
4442
# Server extension must be manually disabled in develop mode
45-
jupyter server extension disable jupyterlab_cell_diff
4643
pip uninstall jupyterlab_cell_diff
4744
```
4845

README.md

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,12 @@ jupyter labextension develop . --overwrite
3232

3333
### Commands
3434

35-
The extension provides several commands:
35+
The extension provides a command to show cell diffs:
3636

3737
- `jupyterlab-cell-diff:show-codemirror` - Show diff using `@codemirror/merge`
38-
- `jupyterlab-cell-diff:show-nbdime` - Show diff using NBDime
39-
40-
### Use with `@codemirror/merge`
4138

4239
https://github.com/user-attachments/assets/0dacd7f0-5963-4ebe-81da-2958f0117071
4340

44-
### Use with NBDime
45-
46-
https://github.com/user-attachments/assets/87e93eab-ad67-468c-b228-f5a0e93f8bea
47-
4841
### Programmatic Usage
4942

5043
```typescript
@@ -53,12 +46,6 @@ app.commands.execute('jupyterlab-cell-diff:show-codemirror', {
5346
originalSource: 'print("Hello")',
5447
newSource: 'print("Hello, World!")'
5548
});
56-
57-
app.commands.execute('jupyterlab-cell-diff:show-nbdime', {
58-
cellId: 'cell-id',
59-
originalSource: 'print("Hello")',
60-
newSource: 'print("Hello, World!")'
61-
});
6249
```
6350

6451
## Uninstall
@@ -71,15 +58,7 @@ pip uninstall jupyterlab_cell_diff
7158

7259
## Troubleshoot
7360

74-
If you are seeing the frontend extension, but it is not working, check
75-
that the server extension is enabled:
76-
77-
```bash
78-
jupyter server extension list
79-
```
80-
81-
If the server extension is installed and enabled, but you are not seeing
82-
the frontend extension, check the frontend extension is installed:
61+
To check the frontend extension is installed:
8362

8463
```bash
8564
jupyter labextension list

jupyter-config/server-config/jupyterlab_cell_diff.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

jupyterlab_cell_diff/__init__.py

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,10 @@
55
# in editable mode with pip. It is highly recommended to install
66
# the package from a stable release or in editable mode: https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs
77
import warnings
8+
89
warnings.warn("Importing 'jupyterlab_cell_diff' outside a proper installation.")
910
__version__ = "dev"
10-
from .handlers import setup_handlers
1111

1212

1313
def _jupyter_labextension_paths():
14-
return [{
15-
"src": "labextension",
16-
"dest": "jupyterlab-cell-diff"
17-
}]
18-
19-
20-
def _jupyter_server_extension_points():
21-
return [{
22-
"module": "jupyterlab_cell_diff"
23-
}]
24-
25-
26-
def _load_jupyter_server_extension(server_app):
27-
"""Registers the API handler to receive HTTP requests from the frontend extension.
28-
29-
Parameters
30-
----------
31-
server_app: jupyterlab.labapp.LabApp
32-
JupyterLab application instance
33-
"""
34-
setup_handlers(server_app.web_app)
35-
name = "jupyterlab_cell_diff"
36-
server_app.log.info(f"Registered {name} server extension")
14+
return [{"src": "labextension", "dest": "jupyterlab-cell-diff"}]

jupyterlab_cell_diff/handlers.py

Lines changed: 0 additions & 31 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@
7070
"@jupyterlab/ui-components": "^4.0.0",
7171
"@lumino/widgets": "^2.0.0",
7272
"codemirror": "^6.0.2",
73-
"jupyterlab-cell-input-footer": "^0.3.0",
74-
"nbdime": "^7.0.1"
73+
"jupyterlab-cell-input-footer": "^0.3.0"
7574
},
7675
"devDependencies": {
7776
"@jupyterlab/builder": "^4.0.0",

pyproject.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
66
name = "jupyterlab_cell_diff"
77
readme = "README.md"
88
license = { file = "LICENSE" }
9-
requires-python = ">=3.8"
9+
requires-python = ">=3.9"
1010
classifiers = [
1111
"Framework :: Jupyter",
1212
"Framework :: Jupyter :: JupyterLab",
@@ -16,15 +16,13 @@ classifiers = [
1616
"License :: OSI Approved :: BSD License",
1717
"Programming Language :: Python",
1818
"Programming Language :: Python :: 3",
19-
"Programming Language :: Python :: 3.8",
2019
"Programming Language :: Python :: 3.9",
2120
"Programming Language :: Python :: 3.10",
2221
"Programming Language :: Python :: 3.11",
2322
"Programming Language :: Python :: 3.12",
23+
"Programming Language :: Python :: 3.13",
2424
]
2525
dependencies = [
26-
"nbdime",
27-
"jupyter_server>=2.4.0,<3",
2826
"jupyterlab-eventlistener>=0.4.0,<0.5",
2927
"jupyterlab-cell-input-footer>=0.3.1,<0.4"
3028
]
@@ -43,7 +41,6 @@ exclude = [".github", "binder"]
4341
[tool.hatch.build.targets.wheel.shared-data]
4442
"jupyterlab_cell_diff/labextension" = "share/jupyter/labextensions/jupyterlab-cell-diff"
4543
"install.json" = "share/jupyter/labextensions/jupyterlab-cell-diff/install.json"
46-
"jupyter-config/server-config" = "etc/jupyter/jupyter_server_config.d"
4744

4845
[tool.hatch.build.hooks.version]
4946
path = "jupyterlab_cell_diff/_version.py"

src/diff/nbdime.ts

Lines changed: 0 additions & 80 deletions
This file was deleted.

src/handler.ts

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)