Skip to content

Commit 98cc95c

Browse files
committed
packaging(poetry): Fix dependency groups
Dependency groups, other than the implicit main group, must only contain dependencies you need in your development process. Installing them is only possible by using Poetry. See also: https://python-poetry.org/docs/master/managing-dependencies/
1 parent a850c62 commit 98cc95c

File tree

4 files changed

+8
-29
lines changed

4 files changed

+8
-29
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747

4848
- name: Install dependencies [w/ docs]
4949
if: env.PUBLISH == 'true'
50-
run: poetry install --extras "docs lint"
50+
run: poetry install --with=docs,lint
5151

5252
- name: Print python versions
5353
if: env.PUBLISH == 'true'

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
4949
- name: Install python dependencies
5050
run: |
51-
poetry install -E "test coverage lint"
51+
poetry install --with=test,coverage,lint
5252
5353
- name: Lint with ruff
5454
run: poetry run ruff .

poetry.lock

Lines changed: 1 addition & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Changes = "https://github.com/tmux-python/libtmux/blob/master/CHANGES"
4747
[tool.poetry.dependencies]
4848
python = "^3.8"
4949

50-
[tool.poetry.group.dev.dependencies]
50+
[tool.poetry.group.docs.dependencies]
5151
### Docs ###
5252
sphinx = "*"
5353
furo = "*"
@@ -61,39 +61,24 @@ sphinxext-rediraffe = "*"
6161
myst_parser = ">=0.18.1"
6262
docutils = "*"
6363

64+
[tool.poetry.group.test.dependencies]
6465
### Testing ###
6566
pytest = "*"
6667
pytest-rerunfailures = "*"
6768
pytest-mock = "*"
6869
pytest-watcher = "*"
6970

71+
[tool.poetry.group.coverage.dependencies]
7072
### Coverage ###
7173
codecov = "*"
7274
coverage = "*"
7375
pytest-cov = "*"
7476

75-
### Format ###
77+
[tool.poetry.group.lint.dependencies]
78+
### Lint ###
7679
ruff = "*"
7780
mypy = "*"
7881

79-
[tool.poetry.extras]
80-
docs = [
81-
"docutils",
82-
"sphinx",
83-
"sphinx-autodoc-typehints",
84-
"sphinx-autobuild",
85-
"sphinx-copybutton",
86-
"sphinxext-opengraph",
87-
"sphinx-inline-tabs",
88-
"sphinxext-rediraffe",
89-
"myst_parser",
90-
"furo",
91-
"gp-libs",
92-
]
93-
test = ["pytest", "pytest-rerunfailures", "pytest-mock", "pytest-watcher"]
94-
coverage = ["codecov", "coverage", "pytest-cov"]
95-
lint = ["ruff", "mypy"]
96-
9782
[tool.poetry.plugins.pytest11]
9883
libtmux = "libtmux.pytest_plugin"
9984

0 commit comments

Comments
 (0)