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 d2128b6 commit 8e5ab14
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,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 @@ -25,7 +25,7 @@ jobs:

- name: Install dependencies
run: |
poetry install -E "docs test coverage lint"
poetry install --with=docs,test,coverage,lint
poetry run pip install docutils~=${{ matrix.docutils-version }}
- name: Print python versions
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: 4 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ python = "^3.8"
myst_parser = ">=0.18.1"
docutils = "*"

[tool.poetry.group.dev.dependencies]
[tool.poetry.group.docs.dependencies]
### Docs ###
sphinx = "*"
furo = "*"
Expand All @@ -54,42 +54,25 @@ sphinxext-opengraph = "<0.8" # https://github.com/wpilibsuite/sphinxext-opengrap
sphinx-copybutton = "*"
sphinxext-rediraffe = "*"

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

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

[tool.poetry.group.lint.dependencies]
### Lint ###
ruff = "*"
mypy = "*"
typing-extensions = { version = "*" }
types-docutils = "*"

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

[tool.poetry.plugins.pytest11]
sphinx = "pytest_doctest_docutils"

Expand Down

0 comments on commit 8e5ab14

Please sign in to comment.