Skip to content

Commit

Permalink
packaging(poetry): Fix dependency groups
Browse files Browse the repository at this point in the history
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/
  • Loading branch information
tony committed Nov 18, 2023
1 parent a850c62 commit 98cc95c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

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

- name: Print python versions
if: env.PUBLISH == 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Install python dependencies
run: |
poetry install -E "test coverage lint"
poetry install --with=test,coverage,lint
- name: Lint with ruff
run: poetry run ruff .
Expand Down
8 changes: 1 addition & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 5 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Changes = "https://github.com/tmux-python/libtmux/blob/master/CHANGES"
[tool.poetry.dependencies]
python = "^3.8"

[tool.poetry.group.dev.dependencies]
[tool.poetry.group.docs.dependencies]
### Docs ###
sphinx = "*"
furo = "*"
Expand All @@ -61,39 +61,24 @@ sphinxext-rediraffe = "*"
myst_parser = ">=0.18.1"
docutils = "*"

[tool.poetry.group.test.dependencies]
### Testing ###
pytest = "*"
pytest-rerunfailures = "*"
pytest-mock = "*"
pytest-watcher = "*"

[tool.poetry.group.coverage.dependencies]
### Coverage ###
codecov = "*"
coverage = "*"
pytest-cov = "*"

### Format ###
[tool.poetry.group.lint.dependencies]
### Lint ###
ruff = "*"
mypy = "*"

[tool.poetry.extras]
docs = [
"docutils",
"sphinx",
"sphinx-autodoc-typehints",
"sphinx-autobuild",
"sphinx-copybutton",
"sphinxext-opengraph",
"sphinx-inline-tabs",
"sphinxext-rediraffe",
"myst_parser",
"furo",
"gp-libs",
]
test = ["pytest", "pytest-rerunfailures", "pytest-mock", "pytest-watcher"]
coverage = ["codecov", "coverage", "pytest-cov"]
lint = ["ruff", "mypy"]

[tool.poetry.plugins.pytest11]
libtmux = "libtmux.pytest_plugin"

Expand Down

0 comments on commit 98cc95c

Please sign in to comment.