Skip to content

Commit c980e53

Browse files
PEP 735 compliance: dependency groups
Only for development and build time dependencies, not run time depdendencies that are meant to be published with the package.
1 parent c25f146 commit c980e53

5 files changed

Lines changed: 14 additions & 12 deletions

File tree

.devcontainer/post_create.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ pip install --upgrade \
99
setuptools \
1010
setuptools_scm \
1111
wheel
12-
pip install -e '.[dev]'
12+
pip install -e . --group dev
1313

1414
pre-commit install --install-hooks

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
python --version # just to check
5959
python -m pip install --upgrade pip wheel # upgrade to latest pip find 3.5 wheels; wheel to avoid errors
6060
pip install --upgrade "setuptools!=47.2.0" docutils setuptools_scm[toml] twine
61-
pip install -e ".[dev]" # install the codespell dev packages
61+
pip install -e . --group dev # install the codespell dev packages
6262
- run: pip install aspell-python-py3
6363
if: startsWith(matrix.os, 'ubuntu')
6464
- run: pip install "chardet<7"
@@ -94,6 +94,6 @@ jobs:
9494
- name: Install general dependencies
9595
run: pip install --upgrade pip wheel # upgrade to latest pip find 3.5 wheels; wheel to avoid errors
9696
- name: Install codespell dependencies
97-
run: pip install -e ".[dev]"
97+
run: pip install -e . --group dev
9898
- uses: codespell-project/sort-problem-matcher@v1
9999
- run: make check-dictionaries

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ check-dictionaries: sort-dictionaries
2525
@if command -v pytest > /dev/null; then \
2626
pytest codespell_lib/tests/test_dictionary.py; \
2727
else \
28-
echo "Test dependencies not present, install using 'pip install -e \".[dev]\"'"; \
28+
echo "Test dependencies not present, install using 'pip install -e . --group dev'"; \
2929
exit 1; \
3030
fi
3131

@@ -50,7 +50,7 @@ pytest: sort-dictionaries
5050
@if command -v pytest > /dev/null; then \
5151
pytest codespell_lib; \
5252
else \
53-
echo "Test dependencies not present, install using 'pip install -e \".[dev]\"'"; \
53+
echo "Test dependencies not present, install using 'pip install -e . --group dev'"; \
5454
exit 1; \
5555
fi
5656

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ You can install required dependencies for development by running the following w
306306

307307
.. code-block:: sh
308308
309-
pip install -e ".[dev]"
309+
pip install -e . --group dev
310310
311311
To run tests against the codebase run:
312312

pyproject.toml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ dependencies = []
3030
dynamic = ["version"]
3131

3232
[project.optional-dependencies]
33+
hard-encoding-detection = [
34+
"chardet"
35+
]
36+
toml = [
37+
"tomli; python_version < '3.11'"
38+
]
39+
40+
[dependency-groups]
3341
dev = [
3442
"build",
3543
"chardet",
@@ -42,12 +50,6 @@ dev = [
4250
"tomli",
4351
"twine"
4452
]
45-
hard-encoding-detection = [
46-
"chardet"
47-
]
48-
toml = [
49-
"tomli; python_version < '3.11'"
50-
]
5153
types = [
5254
"chardet>=5.1.0",
5355
"mypy",

0 commit comments

Comments
 (0)