Skip to content

Commit 09d8de7

Browse files
hbcarlosfcollonval
andauthored
Upgrade dependencies and update server-extension install instructions (#175)
* Upgrade dependencies and update server-extension install instructions * Update CI and server-extension pyproject.toml explanation * Remove package-lock.json * Upgrade eslint-plugin-jsdoc * Don't use the preversion as 3.1 has been released * run embedded * playwright links * Update line references Co-authored-by: Frédéric Collonval <[email protected]>
1 parent 2437d94 commit 09d8de7

Some content is hidden

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

95 files changed

+835
-313
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
- name: Install the Python dependencies
9696
if: steps.filter.outputs.extension == 'true'
9797
run: |
98-
python -m pip install --upgrade pip jupyter_packaging~=0.10 jupyterlab~=3.0
98+
python -m pip install --upgrade pip jupyter_packaging~=0.10 jupyterlab~=3.1
9999
- name: Install the NPM dependencies
100100
if: steps.filter.outputs.extension == 'true'
101101
run: jlpm
@@ -196,7 +196,7 @@ jobs:
196196
- name: Install the Python dependencies
197197
if: steps.filter.outputs.extension == 'true'
198198
run: |
199-
python -m pip install --upgrade pip jupyter_packaging~=0.10 jupyterlab~=3.0
199+
python -m pip install --upgrade pip jupyter_packaging~=0.10 jupyterlab~=3.1
200200
- name: Install the NPM dependencies
201201
if: steps.filter.outputs.extension == 'true'
202202
run: |
@@ -306,7 +306,7 @@ jobs:
306306
restore-keys: |
307307
${{ runner.os }}-pip-
308308
- name: Install the Python dependencies
309-
run: python -m pip install jupyter_packaging~=0.10 jupyterlab~=3.0 pytest pytest-check-links
309+
run: python -m pip install jupyter_packaging~=0.10 jupyterlab~=3.1 pytest pytest-check-links
310310
- name: Bootstrap the jlpm deps
311311
run: jlpm
312312
- name: Build all the extensions

command-palette/RELEASE.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Making a new release of jupyterlab_examples_command_palette
2+
3+
The extension can be published to `PyPI` and `npm` using the [Jupyter Releaser](https://github.com/jupyter-server/jupyter_releaser).
4+
5+
## Automated releases with the Jupyter Releaser
6+
7+
The extension repository should already be compatible with the Jupyter Releaser.
8+
9+
Check out the [workflow documentation](https://github.com/jupyter-server/jupyter_releaser#typical-workflow) for more information.
10+
11+
Here is a summary of the steps to cut a new release:
12+
13+
- Fork the [`jupyter-releaser` repo](https://github.com/jupyter-server/jupyter_releaser)
14+
- Add `ADMIN_GITHUB_TOKEN`, `PYPI_TOKEN` and `NPM_TOKEN` to the Github Secrets in the fork
15+
- Go to the Actions panel
16+
- Run the "Draft Changelog" workflow
17+
- Merge the Changelog PR
18+
- Run the "Draft Release" workflow
19+
- Run the "Publish Release" workflow
20+
21+
## Publishing to `conda-forge`
22+
23+
If the package is not on conda forge yet, check the documentation to learn how to add it: https://conda-forge.org/docs/maintainer/adding_pkgs.html
24+
25+
Otherwise a bot should pick up the new version publish to PyPI, and open a new PR on the feedstock repository automatically.

command-palette/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@
4848
"watch:src": "tsc -w"
4949
},
5050
"dependencies": {
51-
"@jupyterlab/application": "^3.0.11"
51+
"@jupyterlab/application": "^3.1.0"
5252
},
5353
"devDependencies": {
54-
"@jupyterlab/builder": "^3.0.0",
54+
"@jupyterlab/builder": "^3.1.0",
5555
"@typescript-eslint/eslint-plugin": "^4.8.1",
5656
"@typescript-eslint/parser": "^4.8.1",
5757
"eslint": "^7.14.0",
5858
"eslint-config-prettier": "^6.15.0",
59-
"eslint-plugin-jsdoc": "^34.0.0",
59+
"eslint-plugin-jsdoc": "^36.0.0",
6060
"eslint-plugin-prettier": "^3.1.4",
6161
"eslint-plugin-react": "^7.18.3",
6262
"npm-run-all": "^4.1.5",
@@ -73,4 +73,4 @@
7373
"outputDir": "jupyterlab_examples_command_palette/labextension"
7474
},
7575
"styleModule": "style/index.js"
76-
}
76+
}

command-palette/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["jupyter_packaging~=0.10,<2", "jupyterlab~=3.0"]
2+
requires = ["jupyter_packaging~=0.10,<2", "jupyterlab~=3.1"]
33
build-backend = "jupyter_packaging.build_api"
44

55
[tool.jupyter-packaging.options]

command-palette/setup.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
jupyterlab_examples_command_palette setup
33
"""
44
import json
5+
import sys
56
from pathlib import Path
67

78
import setuptools
@@ -23,7 +24,7 @@
2324

2425
data_files_spec = [
2526
("share/jupyter/labextensions/%s" % labext_name, str(lab_path.relative_to(HERE)), "**"),
26-
("share/jupyter/labextensions/%s" % labext_name, str('.'), "install.json"),
27+
("share/jupyter/labextensions/%s" % labext_name, str("."), "install.json"),
2728
]
2829

2930
long_description = (HERE / "README.md").read_text()
@@ -42,9 +43,7 @@
4243
long_description=long_description,
4344
long_description_content_type="text/markdown",
4445
packages=setuptools.find_packages(),
45-
install_requires=[
46-
"jupyter_server>=1.6,<2"
47-
],
46+
install_requires=[],
4847
zip_safe=False,
4948
include_package_data=True,
5049
python_requires=">=3.6",
@@ -71,10 +70,14 @@
7170
post_develop = npm_builder(
7271
build_cmd="install:extension", source_dir="src", build_dir=lab_path
7372
)
74-
setup_args['cmdclass'] = wrap_installers(post_develop=post_develop, ensured_targets=ensured_targets)
75-
setup_args['data_files'] = get_data_files(data_files_spec)
73+
setup_args["cmdclass"] = wrap_installers(post_develop=post_develop, ensured_targets=ensured_targets)
74+
setup_args["data_files"] = get_data_files(data_files_spec)
7675
except ImportError as e:
77-
pass
76+
import logging
77+
logging.basicConfig(format="%(levelname)s: %(message)s")
78+
logging.warning("Build tool `jupyter-packaging` is missing. Install it with pip or conda.")
79+
if not ("--name" in sys.argv or "--version" in sys.argv):
80+
raise e
7881

7982
if __name__ == "__main__":
8083
setuptools.setup(**setup_args)

command-palette/ui-tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jlpm run build:prod
3939
jupyter lab --ServerApp.token= --ServerApp.password=
4040
```
4141

42-
3. Execute in another console the [Playwright](https://playwright.dev/docs/test-intro) tests:
42+
3. Execute in another console the [Playwright](https://playwright.dev/docs/intro) tests:
4343

4444
```
4545
cd ui-tests

commands/RELEASE.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Making a new release of jupyterlab_examples_commands
2+
3+
The extension can be published to `PyPI` and `npm` using the [Jupyter Releaser](https://github.com/jupyter-server/jupyter_releaser).
4+
5+
## Automated releases with the Jupyter Releaser
6+
7+
The extension repository should already be compatible with the Jupyter Releaser.
8+
9+
Check out the [workflow documentation](https://github.com/jupyter-server/jupyter_releaser#typical-workflow) for more information.
10+
11+
Here is a summary of the steps to cut a new release:
12+
13+
- Fork the [`jupyter-releaser` repo](https://github.com/jupyter-server/jupyter_releaser)
14+
- Add `ADMIN_GITHUB_TOKEN`, `PYPI_TOKEN` and `NPM_TOKEN` to the Github Secrets in the fork
15+
- Go to the Actions panel
16+
- Run the "Draft Changelog" workflow
17+
- Merge the Changelog PR
18+
- Run the "Draft Release" workflow
19+
- Run the "Publish Release" workflow
20+
21+
## Publishing to `conda-forge`
22+
23+
If the package is not on conda forge yet, check the documentation to learn how to add it: https://conda-forge.org/docs/maintainer/adding_pkgs.html
24+
25+
Otherwise a bot should pick up the new version publish to PyPI, and open a new PR on the feedstock repository automatically.

commands/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@
4848
"watch:src": "tsc -w"
4949
},
5050
"dependencies": {
51-
"@jupyterlab/application": "^3.0.11"
51+
"@jupyterlab/application": "^3.1.0"
5252
},
5353
"devDependencies": {
54-
"@jupyterlab/builder": "^3.0.0",
54+
"@jupyterlab/builder": "^3.1.0",
5555
"@typescript-eslint/eslint-plugin": "^4.8.1",
5656
"@typescript-eslint/parser": "^4.8.1",
5757
"eslint": "^7.14.0",
5858
"eslint-config-prettier": "^6.15.0",
59-
"eslint-plugin-jsdoc": "^34.0.0",
59+
"eslint-plugin-jsdoc": "^36.0.0",
6060
"eslint-plugin-prettier": "^3.1.4",
6161
"eslint-plugin-react": "^7.18.3",
6262
"npm-run-all": "^4.1.5",
@@ -73,4 +73,4 @@
7373
"outputDir": "jupyterlab_examples_commands/labextension"
7474
},
7575
"styleModule": "style/index.js"
76-
}
76+
}

commands/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["jupyter_packaging~=0.10,<2", "jupyterlab~=3.0"]
2+
requires = ["jupyter_packaging~=0.10,<2", "jupyterlab~=3.1"]
33
build-backend = "jupyter_packaging.build_api"
44

55
[tool.jupyter-packaging.options]

commands/setup.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
jupyterlab_examples_commands setup
33
"""
44
import json
5+
import sys
56
from pathlib import Path
67

78
import setuptools
@@ -23,7 +24,7 @@
2324

2425
data_files_spec = [
2526
("share/jupyter/labextensions/%s" % labext_name, str(lab_path.relative_to(HERE)), "**"),
26-
("share/jupyter/labextensions/%s" % labext_name, str('.'), "install.json"),
27+
("share/jupyter/labextensions/%s" % labext_name, str("."), "install.json"),
2728
]
2829

2930
long_description = (HERE / "README.md").read_text()
@@ -42,9 +43,7 @@
4243
long_description=long_description,
4344
long_description_content_type="text/markdown",
4445
packages=setuptools.find_packages(),
45-
install_requires=[
46-
"jupyter_server>=1.6,<2"
47-
],
46+
install_requires=[],
4847
zip_safe=False,
4948
include_package_data=True,
5049
python_requires=">=3.6",
@@ -71,10 +70,14 @@
7170
post_develop = npm_builder(
7271
build_cmd="install:extension", source_dir="src", build_dir=lab_path
7372
)
74-
setup_args['cmdclass'] = wrap_installers(post_develop=post_develop, ensured_targets=ensured_targets)
75-
setup_args['data_files'] = get_data_files(data_files_spec)
73+
setup_args["cmdclass"] = wrap_installers(post_develop=post_develop, ensured_targets=ensured_targets)
74+
setup_args["data_files"] = get_data_files(data_files_spec)
7675
except ImportError as e:
77-
pass
76+
import logging
77+
logging.basicConfig(format="%(levelname)s: %(message)s")
78+
logging.warning("Build tool `jupyter-packaging` is missing. Install it with pip or conda.")
79+
if not ("--name" in sys.argv or "--version" in sys.argv):
80+
raise e
7881

7982
if __name__ == "__main__":
8083
setuptools.setup(**setup_args)

0 commit comments

Comments
 (0)