Skip to content

Commit 06d1539

Browse files
author
Alan
committed
V2 release :
- All methods are async - widget restoration on page refresh - Preliminary support for multiple pages - Added python classes - Ipylab - Singular - HasApp - Fixed - Typing instances - Transform - Connection
1 parent 083ca7c commit 06d1539

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+13899
-4644
lines changed

.copier-answers.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ project_short_description: Control JupyterLab from Python notebooks
1111
python_name: ipylab
1212
repository: https://github.com/jtpio/ipylab
1313
test: false
14-

.github/workflows/binder-on-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ jobs:
2727
})
2828
env:
2929
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
30-
PR_HEAD_USERREPO: ${{ github.event.pull_request.head.repo.full_name }}
30+
PR_HEAD_USERREPO: ${{ github.event.pull_request.head.repo.full_name }}

.github/workflows/build.yml

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ name: Build
22

33
on:
44
push:
5-
branches: main
5+
branches:
6+
- main
67
pull_request:
7-
branches: '*'
8+
branches:
9+
- '*'
810

911
jobs:
1012
build:
@@ -17,26 +19,19 @@ jobs:
1719
- name: Base Setup
1820
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
1921

20-
- name: Install dependencies
21-
run: python -m pip install -U "jupyterlab>=4.2.0,<5"
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@v7
24+
with:
25+
enable-cache: true
26+
version: "0.8.22"
2227

2328
- name: Build the extension
2429
run: |
25-
set -eux
26-
jlpm
27-
python -m pip install .[test]
28-
29-
jupyter labextension list
30-
jupyter labextension list 2>&1 | grep -ie "ipylab.*OK"
31-
python -m jupyterlab.browser_check
32-
33-
- name: Package the extension
34-
run: |
35-
set -eux
36-
37-
pip install build
38-
python -m build
39-
pip uninstall -y "ipylab" jupyterlab
30+
uv sync
31+
uv build
32+
uv run jupyter labextension list
33+
uv run jupyter labextension list 2>&1 | grep -ie "ipylab.*OK"
34+
uv run python -m jupyterlab.browser_check
4035
4136
- name: Upload extension packages
4237
uses: actions/upload-artifact@v4
@@ -53,7 +48,7 @@ jobs:
5348
- name: Install Python
5449
uses: actions/setup-python@v5
5550
with:
56-
python-version: '3.9'
51+
python-version: '3.13'
5752
architecture: 'x64'
5853
- uses: actions/download-artifact@v4
5954
with:

.github/workflows/lint.yml

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

.github/workflows/packaging.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ name: Packaging
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches:
6+
- main
67
pull_request:
7-
branches: '*'
8+
branches:
9+
- '*'
810

911
env:
1012
PIP_DISABLE_PIP_VERSION_CHECK: 1
@@ -48,11 +50,11 @@ jobs:
4850
fail-fast: false
4951
matrix:
5052
os: [ubuntu, macos, windows]
51-
python: ['3.8', '3.12']
53+
python: ['3.11', '3.13']
5254
include:
53-
- python: '3.8'
55+
- python: '3.11'
5456
dist: 'ipylab*.tar.gz'
55-
- python: '3.12'
57+
- python: '3.13'
5658
dist: 'ipylab*.whl'
5759
- os: windows
5860
py_cmd: python

.github/workflows/pre-commit.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Pre-Commit Check
2+
on:
3+
push:
4+
branches: ['main']
5+
pull_request:
6+
branches:
7+
- '*'
8+
jobs:
9+
pre_commit:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
14+
- uses: jupyterlab/maintainer-tools/.github/actions/pre-commit@v1

.pre-commit-config.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
ci:
2+
autoupdate_schedule: monthly
3+
skip:
4+
- prettier
5+
default_language_version:
6+
node: system
7+
repos:
8+
- repo: https://github.com/pre-commit/pre-commit-hooks
9+
rev: v6.0.0
10+
hooks:
11+
- id: check-case-conflict
12+
- id: check-ast
13+
- id: check-docstring-first
14+
- id: check-executables-have-shebangs
15+
- id: check-added-large-files
16+
- id: check-case-conflict
17+
- id: check-merge-conflict
18+
- id: check-toml
19+
- id: check-yaml
20+
- id: debug-statements
21+
- id: end-of-file-fixer
22+
- id: trailing-whitespace
23+
- id: forbid-new-submodules
24+
- id: end-of-file-fixer
25+
exclude: galata/.*-snapshots
26+
- id: requirements-txt-fixer
27+
- id: check-builtin-literals
28+
- repo: https://gitlab.com/bmares/check-json5
29+
rev: 'v1.0.0'
30+
hooks:
31+
- id: check-json5
32+
- repo: https://github.com/python-jsonschema/check-jsonschema
33+
rev: 0.34.0
34+
hooks:
35+
- id: check-github-workflows
36+
- repo: https://github.com/ComPWA/taplo-pre-commit
37+
rev: v0.9.3
38+
hooks:
39+
- id: taplo-format
40+
- repo: https://github.com/astral-sh/ruff-pre-commit
41+
rev: v0.13.1
42+
hooks:
43+
- id: ruff
44+
types_or: [python, jupyter]
45+
args: ['--fix']
46+
- id: ruff-format
47+
types_or: [python, jupyter]
48+
- repo: https://github.com/codespell-project/codespell
49+
rev: 'v2.4.1'
50+
hooks:
51+
- id: codespell
52+
additional_dependencies:
53+
- tomli
54+
55+
- repo: https://github.com/kynan/nbstripout
56+
rev: '0.8.1'
57+
hooks:
58+
- id: nbstripout

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
**/.venv
12
node_modules
23
**/node_modules
34
**/lib

.vscode/launch.json

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
{
2+
// To debug jupyterlab running in a venv or conda env:
3+
// - set up Python env in your workspace as per https://code.visualstudio.com/docs/python/environments
4+
// - add an "envFile" prop to each backend config pointing to .vscode/debug.env
5+
// - configure the .vscode/debug.env file as needed
6+
// https://github.com/jupyterlab/vscode-config-template/tree/main
7+
// https://github.com/jupyterlab/vscode-config-template/issues/1
8+
"version": "0.2.0",
9+
"configurations": [
10+
{
11+
"name": "Python Debugger: Current File all-code",
12+
"type": "debugpy",
13+
"request": "launch",
14+
"program": "${file}",
15+
"console": "integratedTerminal",
16+
"justMyCode": false
17+
},
18+
{
19+
"name": "Python Debugger: Current File: just my code",
20+
"type": "debugpy",
21+
"request": "launch",
22+
"program": "${file}",
23+
"console": "integratedTerminal",
24+
"justMyCode": false
25+
},
26+
{
27+
"name": "Ipylab",
28+
"type": "debugpy",
29+
"request": "launch",
30+
"args": [
31+
"--notebook-dir=examples",
32+
"--no-browser",
33+
"--IdentityProvider.token=''",
34+
"--port=9990"
35+
],
36+
"cwd": "${workspaceFolder}",
37+
"justMyCode": false,
38+
"module": "ipylab",
39+
"presentation": {
40+
"hidden": false
41+
}
42+
},
43+
{
44+
"name": "IPylab frontend with Firefox",
45+
"type": "firefox",
46+
"request": "launch",
47+
"reAttach": true,
48+
"url": "http://localhost:9990",
49+
"webRoot": "${workspaceFolder}",
50+
"pathMappings": [
51+
{
52+
"url": "webpack://ipylab/src",
53+
"path": "${workspaceFolder}/src"
54+
}
55+
],
56+
"presentation": {
57+
"hidden": false
58+
}
59+
},
60+
{
61+
"name": "IPylab frontend with Chrome",
62+
"type": "chrome",
63+
"request": "launch",
64+
"timeout": 180000,
65+
"url": "http://localhost:9990",
66+
// set webroot to the parent dir of your project's top level package.json
67+
"webRoot": "${workspaceFolder}",
68+
"pathMapping": {
69+
"url": "webpack://ipylab/src",
70+
"path": "${workspaceFolder}/src"
71+
},
72+
"presentation": {
73+
"hidden": true
74+
}
75+
}
76+
],
77+
"compounds": [
78+
{
79+
"name": "Debug IPylab with Firefox",
80+
"configurations": ["Ipylab", "IPylab frontend with Firefox"]
81+
},
82+
{
83+
"name": "Debug Ipylab with Chrome",
84+
"configurations": ["Ipylab", "IPylab frontend with Chrome"]
85+
}
86+
]
87+
}

.vscode/settings.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"spellright.language": ["en"],
3+
"spellright.documentTypes": ["markdown", "latex"],
4+
"[toml]": {
5+
"editor.defaultFormatter": "tamasfe.even-better-toml"
6+
},
7+
"[python]": {
8+
"editor.defaultFormatter": "charliermarsh.ruff"
9+
},
10+
"[typescript]": {
11+
"editor.defaultFormatter": "esbenp.prettier-vscode"
12+
},
13+
"editor.formatOnSave": true,
14+
"python.terminal.activateEnvInCurrentTerminal": true,
15+
"python.createEnvironment.trigger": "prompt",
16+
"python.testing.pytestArgs": ["tests"],
17+
"python.testing.unittestEnabled": false,
18+
"python.testing.pytestEnabled": true,
19+
"python.analysis.diagnosticMode": "workspace"
20+
}

0 commit comments

Comments
 (0)