Skip to content

Commit c6dcab8

Browse files
committed
Use dependency groups for dev and test (PEP 735)
1 parent 27f2f8a commit c6dcab8

3 files changed

Lines changed: 18 additions & 7 deletions

File tree

.github/actions/test/action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ runs:
7777
working-directory: dist/
7878
run: |
7979
WHEEL_NAME=$(ls pyshp-*py3-none-any.whl)
80-
python -m pip install $WHEEL_NAME[test]
80+
python -m pip install --upgrade pip
81+
python -m pip install $WHEEL_NAME --group test
8182
8283
- name: Doctests
8384
shell: bash
@@ -113,4 +114,4 @@ runs:
113114
shell: bash
114115
run: |
115116
echo Killing http server process ID: ${{ env.HTTP_SERVER_PID }}
116-
kill ${{ env.HTTP_SERVER_PID }}
117+
kill ${{ env.HTTP_SERVER_PID }}

.github/workflows/speed_test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ jobs:
4949
working-directory: dist/
5050
run: |
5151
WHEEL_NAME=$(ls pyshp-*py3-none-any.whl)
52-
python -m pip install $WHEEL_NAME[test]
52+
python -m pip install --upgrade pip
53+
python -m pip install $WHEEL_NAME --group test
5354
5455
- uses: actions/checkout@v6
5556
with:

pyproject.toml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,23 @@ classifiers = [
2626
"Topic :: Software Development :: Libraries",
2727
"Topic :: Software Development :: Libraries :: Python Modules",
2828
]
29-
dependencies = [
30-
]
3129

3230
[project.optional-dependencies]
33-
dev = ["pyshp[test]", "pre-commit", "ruff"]
34-
test = ["pytest"]
3531
stubs=["pyshp-stubs"]
3632

33+
[dependency-groups]
34+
dev = [
35+
{include-group = "lint"},
36+
{include-group = "test"}
37+
]
38+
lint = [
39+
"ruff",
40+
"pre-commit",
41+
]
42+
test = [
43+
"pytest"
44+
]
45+
3746
[project.urls]
3847
Repository = "https://github.com/GeospatialPython/pyshp"
3948

0 commit comments

Comments
 (0)