Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ jobs:
set -eux
python -m pip install .[test]

jupyter server extension list
jupyter server extension list 2>&1 | grep -ie "jupyterlab_cell_diff.*OK"

jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyterlab-cell-diff.*OK"
python -m jupyterlab.browser_check
Expand Down Expand Up @@ -79,10 +76,6 @@ jobs:

pip install "jupyterlab>=4.0.0,<5" jupyterlab_cell_diff*.whl


jupyter server extension list
jupyter server extension list 2>&1 | grep -ie "jupyterlab_cell_diff.*OK"

jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyterlab-cell-diff.*OK"
python -m jupyterlab.browser_check --no-browser-test
Expand Down
3 changes: 0 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ The `jlpm` command is JupyterLab's pinned version of
pip install -e "."
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Server extension must be manually installed in develop mode
jupyter server extension enable jupyterlab_cell_diff
# Rebuild extension Typescript source after making changes
jlpm build
```
Expand All @@ -42,7 +40,6 @@ jupyter lab build --minimize=False

```bash
# Server extension must be manually disabled in develop mode
jupyter server extension disable jupyterlab_cell_diff
pip uninstall jupyterlab_cell_diff
```

Expand Down
25 changes: 2 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,12 @@ jupyter labextension develop . --overwrite

### Commands

The extension provides several commands:
The extension provides a command to show cell diffs:

- `jupyterlab-cell-diff:show-codemirror` - Show diff using `@codemirror/merge`
- `jupyterlab-cell-diff:show-nbdime` - Show diff using NBDime

### Use with `@codemirror/merge`

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

### Use with NBDime

https://github.com/user-attachments/assets/87e93eab-ad67-468c-b228-f5a0e93f8bea

### Programmatic Usage

```typescript
Expand All @@ -53,12 +46,6 @@ app.commands.execute('jupyterlab-cell-diff:show-codemirror', {
originalSource: 'print("Hello")',
newSource: 'print("Hello, World!")'
});

app.commands.execute('jupyterlab-cell-diff:show-nbdime', {
cellId: 'cell-id',
originalSource: 'print("Hello")',
newSource: 'print("Hello, World!")'
});
```

## Uninstall
Expand All @@ -71,15 +58,7 @@ pip uninstall jupyterlab_cell_diff

## Troubleshoot

If you are seeing the frontend extension, but it is not working, check
that the server extension is enabled:

```bash
jupyter server extension list
```

If the server extension is installed and enabled, but you are not seeing
the frontend extension, check the frontend extension is installed:
To check the frontend extension is installed:

```bash
jupyter labextension list
Expand Down
7 changes: 0 additions & 7 deletions jupyter-config/server-config/jupyterlab_cell_diff.json

This file was deleted.

26 changes: 2 additions & 24 deletions jupyterlab_cell_diff/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,10 @@
# in editable mode with pip. It is highly recommended to install
# the package from a stable release or in editable mode: https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs
import warnings

warnings.warn("Importing 'jupyterlab_cell_diff' outside a proper installation.")
__version__ = "dev"
from .handlers import setup_handlers


def _jupyter_labextension_paths():
return [{
"src": "labextension",
"dest": "jupyterlab-cell-diff"
}]


def _jupyter_server_extension_points():
return [{
"module": "jupyterlab_cell_diff"
}]


def _load_jupyter_server_extension(server_app):
"""Registers the API handler to receive HTTP requests from the frontend extension.

Parameters
----------
server_app: jupyterlab.labapp.LabApp
JupyterLab application instance
"""
setup_handlers(server_app.web_app)
name = "jupyterlab_cell_diff"
server_app.log.info(f"Registered {name} server extension")
return [{"src": "labextension", "dest": "jupyterlab-cell-diff"}]
31 changes: 0 additions & 31 deletions jupyterlab_cell_diff/handlers.py

This file was deleted.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@
"@jupyterlab/ui-components": "^4.0.0",
"@lumino/widgets": "^2.0.0",
"codemirror": "^6.0.2",
"jupyterlab-cell-input-footer": "^0.3.0",
"nbdime": "^7.0.1"
"jupyterlab-cell-input-footer": "^0.3.0"
},
"devDependencies": {
"@jupyterlab/builder": "^4.0.0",
Expand Down
7 changes: 2 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "hatchling.build"
name = "jupyterlab_cell_diff"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.8"
requires-python = ">=3.9"
classifiers = [
"Framework :: Jupyter",
"Framework :: Jupyter :: JupyterLab",
Expand All @@ -16,15 +16,13 @@ classifiers = [
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"nbdime",
"jupyter_server>=2.4.0,<3",
"jupyterlab-eventlistener>=0.4.0,<0.5",
"jupyterlab-cell-input-footer>=0.3.1,<0.4"
]
Expand All @@ -43,7 +41,6 @@ exclude = [".github", "binder"]
[tool.hatch.build.targets.wheel.shared-data]
"jupyterlab_cell_diff/labextension" = "share/jupyter/labextensions/jupyterlab-cell-diff"
"install.json" = "share/jupyter/labextensions/jupyterlab-cell-diff/install.json"
"jupyter-config/server-config" = "etc/jupyter/jupyter_server_config.d"

[tool.hatch.build.hooks.version]
path = "jupyterlab_cell_diff/_version.py"
Expand Down
80 changes: 0 additions & 80 deletions src/diff/nbdime.ts

This file was deleted.

42 changes: 0 additions & 42 deletions src/handler.ts

This file was deleted.

Loading