diff --git a/.devcontainer/post_create.sh b/.devcontainer/post_create.sh index d85a821be8..df73095285 100644 --- a/.devcontainer/post_create.sh +++ b/.devcontainer/post_create.sh @@ -9,6 +9,6 @@ pip install --upgrade \ setuptools \ setuptools_scm \ wheel -pip install -e '.[dev]' +pip install -e . --group dev pre-commit install --install-hooks diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 891c15f1de..a3edc6cd22 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -53,9 +53,9 @@ jobs: shell: bash -e {0} run: | python --version # just to check - python -m pip install --upgrade pip wheel # upgrade to latest pip find 3.5 wheels; wheel to avoid errors - pip install --upgrade "setuptools!=47.2.0" docutils setuptools_scm[toml] twine - pip install -e ".[dev]" # install the codespell dev packages + python -m pip install --upgrade pip wheel + pip install --upgrade setuptools docutils setuptools_scm[toml] twine + pip install -e . --group dev # install the codespell dev packages - run: pip install aspell-python-py3 if: startsWith(matrix.os, 'ubuntu') - run: codespell --help @@ -85,8 +85,8 @@ jobs: with: persist-credentials: false - name: Install general dependencies - run: pip install --upgrade pip wheel # upgrade to latest pip find 3.5 wheels; wheel to avoid errors + run: pip install --upgrade pip wheel - name: Install codespell dependencies - run: pip install -e ".[dev]" + run: pip install -e . --group dev - uses: codespell-project/sort-problem-matcher@v1 - run: make check-dictionaries diff --git a/Makefile b/Makefile index fdbad92948..d281d73921 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ check-dictionaries: sort-dictionaries @if command -v pytest > /dev/null; then \ pytest codespell_lib/tests/test_dictionary.py; \ else \ - echo "Test dependencies not present, install using 'pip install -e \".[dev]\"'"; \ + echo "Test dependencies not present, install using 'pip install -e . --group dev'"; \ exit 1; \ fi @@ -50,7 +50,7 @@ pytest: sort-dictionaries @if command -v pytest > /dev/null; then \ pytest codespell_lib; \ else \ - echo "Test dependencies not present, install using 'pip install -e \".[dev]\"'"; \ + echo "Test dependencies not present, install using 'pip install -e . --group dev'"; \ exit 1; \ fi diff --git a/README.rst b/README.rst index a9562e8f2b..54c230fa1a 100644 --- a/README.rst +++ b/README.rst @@ -306,7 +306,7 @@ You can install required dependencies for development by running the following w .. code-block:: sh - pip install -e ".[dev]" + pip install -e . --group dev To run tests against the codebase run: diff --git a/pyproject.toml b/pyproject.toml index da0d7b3291..3f39623776 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,6 +30,14 @@ dependencies = [] dynamic = ["version"] [project.optional-dependencies] +hard-encoding-detection = [ + "chardet" +] +toml = [ + "tomli; python_version < '3.11'" +] + +[dependency-groups] dev = [ "build", "chardet", @@ -42,12 +50,6 @@ dev = [ "tomli", "twine" ] -hard-encoding-detection = [ - "chardet" -] -toml = [ - "tomli; python_version < '3.11'" -] types = [ "chardet>=5.1.0", "mypy",