Skip to content

Commit 0f613fc

Browse files
Use dependency groups instead of extras (#1563)
1 parent 730c726 commit 0f613fc

3 files changed

Lines changed: 11 additions & 10 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ jobs:
177177

178178
- name: Install the Python dependencies without debugpy
179179
run: |
180-
pip install .[test]
180+
pip install . --group test
181181
pip uninstall --yes debugpy
182182
183183
- name: List installed packages
@@ -253,6 +253,8 @@ jobs:
253253
steps:
254254
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@21b1cac622018fd37ec13a1c8081da814e10d94e # v1.0.0
255255
- uses: jupyterlab/maintainer-tools/.github/actions/test-sdist@21b1cac622018fd37ec13a1c8081da814e10d94e # v1.0.0
256+
with:
257+
package_spec: ". --group test"
256258

257259
link_check:
258260
runs-on: ubuntu-latest

‎.readthedocs.yaml‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ sphinx:
1010

1111
python:
1212
install:
13-
# install itself with pip install .
14-
- method: pip
15-
path: .
16-
extra_requirements:
13+
- method: uv
14+
command: sync
15+
groups:
1716
- docs

‎pyproject.toml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Documentation = "https://ipykernel.readthedocs.io"
4040
Source = "https://github.com/ipython/ipykernel"
4141
Tracker = "https://github.com/ipython/ipykernel/issues"
4242

43-
[project.optional-dependencies]
43+
[dependency-groups]
4444
docs = [
4545
"sphinx",
4646
"myst_parser",
@@ -84,26 +84,26 @@ path = "ipykernel/_version.py"
8484
"./ipykernel_launcher.py" = "ipykernel_launcher.py"
8585

8686
[tool.hatch.envs.docs]
87-
features = ["docs"]
87+
dependency-groups = ["docs"]
8888
[tool.hatch.envs.docs.scripts]
8989
build = "make -C docs html SPHINXOPTS='-W'"
9090
api = "sphinx-apidoc -o docs/api -f -E ipykernel tests ipykernel/datapub.py ipykernel/pickleutil.py ipykernel/serialize.py ipykernel/gui ipykernel/pylab ipykernel/utils.py"
9191

9292
[tool.hatch.envs.test]
93-
features = ["test"]
93+
dependency-groups = ["test"]
9494
[tool.hatch.envs.test.scripts]
9595
list = "python -m pip freeze"
9696
test = "python -m pytest -vv {args}"
9797
nowarn = "test -W default {args}"
9898

9999
[tool.hatch.envs.cov]
100-
features = ["test", "cov"]
100+
dependency-groups = ["test", "cov"]
101101
[tool.hatch.envs.cov.scripts]
102102
test = "python -m pytest -vv --cov ipykernel --cov-branch --cov-report term-missing:skip-covered {args}"
103103
nowarn = "test -W default {args}"
104104

105105
[tool.hatch.envs.cov.overrides]
106-
env.QT.features = [
106+
env.QT.dependency-groups = [
107107
{ value = "pyqt5", if = ["qt5"] },
108108
{ value = "pyside6", if = ["qt6"] },
109109
]

0 commit comments

Comments
 (0)