Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/python-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inputs:
poetry-version:
description: 'Poetry version to use'
required: true
default: "2.1.4"
default: "2.3.0"

working-directory:
description: 'Working directory to use'
Expand Down
34 changes: 34 additions & 0 deletions doc/changes/unreleased.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Unreleased

## Summary

In exasol-toolbox version `5.0.0` and higher the default behavior for
`.github/actions/python-environment/action.yml` has changed. In previous versions,
the default value for `poetry-version` was `2.1.2`, and it is now `2.3.0`.

* Depending on its poetry version, a repository relying on the default behavior of said
action may run into breaking changes. This can easily be resolved with explicitly setting the
`poetry-version` when calling the GitHub action. It is, however, recommended whenever
possible to update the poetry version of the affected repository. Unfortunately,
there is not a quick and easy way to update all the places where `poetry-version`
could be specified in the GitHub workflows.

* Projects migrating to this version should:

* Update their `pyproject.toml` to have:
```toml
requires-poetry = ">=2.3.0"
```
* Run `poetry check` and resolve any issues
* (optional) Run `poetry lock` to update the lock
* (optional) Update their `pyproject.toml` to fit:
* [PEP-621](https://peps.python.org/pep-0621/)
* [PEP-735](https://peps.python.org/pep-0735/)

Note that [uvx migrate-to-uv](https://github.com/mkniewallner/migrate-to-uv) seems to
do a good job with automating many of the PEP-related changes; though developers should
take care and will need to make manual changes to ensure it still works with
`poetry`, as the PTB does not yet support `uv`.

## Documentation

* #648: Moved sonar setup instructions in the User guide
Expand All @@ -8,3 +38,7 @@

* #649: Restricted noxconfig usage throughout exasol.toolbox to only exasol.toolbox.nox.*
* #647: Added summary to changelog template

## Refactoring

* 624: Updated GitHub python-environment action and all code to use Poetry >= 2.3.0
4 changes: 2 additions & 2 deletions doc/github_actions/python_environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Parameters
* - poetry-version
- Poetry version to use
- True
- 2.1.2
- 2.3.0
* - working-directory
- Working directory to use
- False
Expand Down Expand Up @@ -55,7 +55,7 @@ Example Usage
uses: exasol/python-toolbox/.github/actions/python-environment@v1
with:
python-version: 3.12
poetry-version: 2.1.2
poetry-version: 2.3.0
working-directory: pytest-backend
use-cache: false
extras: 'numpy,pandas'
Expand Down
2 changes: 1 addition & 1 deletion doc/user_guide/dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ Core dependencies
+++++++++++++++++

- Python >= 3.10
- poetry >= 2.1.2
- poetry >= 2.3.0
- `poetry export <https://github.com/python-poetry/poetry-plugin-export>`__
11 changes: 11 additions & 0 deletions exasol/toolbox/util/dependencies/poetry_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ def groups(self) -> tuple[PoetryGroup, ...]:
toml_section=f"{group_key}.{group}.dependencies",
)
)

new_group_key = "dependency-groups"
if group_dict := self.get_section_dict(new_group_key):
for group, content in group_dict.items():
groups.append(
PoetryGroup(
name=group,
toml_section=f"{new_group_key}.{group}",
)
)

return tuple(groups)


Expand Down
1,076 changes: 597 additions & 479 deletions poetry.lock

Large diffs are not rendered by default.

38 changes: 25 additions & 13 deletions project-template/{{cookiecutter.repo_name}}/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,31 +1,42 @@
[project]
name = "{{cookiecutter.pypi_package_name}}"
version = "0.1.0"
requires-python = ">={{cookiecutter.python_version_min}},<4.0"
description = "{{cookiecutter.description}}"
authors = [
{name = "{{cookiecutter.author_full_name}}", email = "{{cookiecutter.author_email}}"},
]
requires-python = ">={{cookiecutter.python_version_min}},<4.0"
readme = "README.rst"
license = "MIT"
license-files = ["LICENSE"]
keywords = ['exasol', '{{cookiecutter.package_name}}']
dynamic = ["dependencies"]
classifiers = [
"Programming Language :: Python :: 3",

]
dependencies = []

[dependency-groups]
dev = [
"exasol-toolbox>=4.0.1,<5",
]

[tool.poetry]
requires-poetry = ">=2.1.0"
requires-poetry = ">=2.3.0"
packages = [
{ include = "exasol" },
]
include = [
"README.rst",
"doc/changes/changelog.md",
"LICENSE",
"exasol/toolbox/templates/**/*"
]

[poetry.urls]
repository = "https://github.com/exasol/{{cookiecutter.repo_name}}"
homepage = "https://github.com/exasol/{{cookiecutter.repo_name}}"

[tool.poetry.dependencies]

[tool.poetry.group.dev.dependencies]
exasol-toolbox = "^1.6.0"

[build-system]
requires = ["poetry-core>=2.0.0"]
build-backend = "poetry.core.masonry.api"
Expand All @@ -38,7 +49,8 @@ source = [
]

[tool.coverage.report]
fail_under = 15
# Switch to 15 after code has been added
fail_under = 0

[tool.black]
line-length = 88
Expand All @@ -59,10 +71,10 @@ max-module-lines = 800

[tool.ruff.lint]
extend-ignore = [
"E", # Syntax errors
"F", # Pyflakes rules (excluding F401)
"UP", # pyupgrade rules
"D", # Docstring rules
"E", # Syntax errors
"F", # Pyflakes rules (excluding F401)
"UP", # pyupgrade rules
"D", # Docstring rules
]
extend-select = ["F401"]
unfixable = []
Expand Down
104 changes: 57 additions & 47 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[project]
name = "exasol-toolbox"
version = "4.0.1"
requires-python = ">=3.10,<4.0"
description = "Your one-stop solution for managing all standard tasks and core workflows of your Python project."
authors = [
{ name = "Nicola Coretti", email = "nicola.coretti@exasol.com" },
{ name = "Ariel Schulz", email = "ariel.schulz@exasol.com" },
]
requires-python = ">=3.10,<4.0"
readme = "README.rst"
license = "MIT"
license-files = ["LICENSE"]
keywords = [
"nox",
"tooling",
Expand All @@ -17,16 +18,64 @@ keywords = [
"exasol",
"infrastructure",
]
dynamic = ["dependencies"]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"bandit[toml]>=1.7.9,<2",
"black>=24.1.0,<26",
"coverage>=6.4.4,<8.0.0",
"furo>=2022.9.15",
"importlib-resources>=5.12.0",
"import-linter>=2.0,<3",
"isort>=7.0.0,<8",
"jinja2>=3.1.6,<4",
"mypy>=0.971",
"myst-parser>=2.0.0,<4",
"nox>=2022.8.7",
"pip-audit>=2.7.3,<3",
"pip-licenses>=5.0.0,<6",
"pluggy>=1.5.0,<2",
"pre-commit>=4,<5",
"pydantic>=2.11.5,<3",
"pylint>=2.15.4",
"pysonar>=1.0.1.1548,<2",
"pytest>=7.2.2,<10",
"pyupgrade>=2.38.2,<4.0.0",
"ruff>=0.14.5,<0.15",
"shibuya>=2024.5.14",
"sphinx>=5.3,<8",
"sphinx-copybutton>=0.5.0,<0.6",
"sphinx-inline-tabs>=2023.4.21,<2024",
"sphinx-design>=0.5.0,<1",
"sphinx-toolbox>=4.0.0,<5",
"typer[all]>=0.7.0",
"twine>=6.1.0,<7",
]

[project.scripts]
tbx = "exasol.toolbox.tools.tbx:CLI"
sphinx-multiversion = "exasol.toolbox.sphinx.multiversion:main"

[dependency-groups]
dev = [
"autoimport>=1.4.0,<2",
"cookiecutter>=2.6.0,<3",
]

[tool.poetry]
requires-poetry = ">=2.1.0"
requires-poetry = ">=2.3.0"
packages = [
{ include = "exasol" },
]
include = [
"README.rst",
"doc/changelog.rst",
"doc/changes/changelog.md",
"LICENSE",
"exasol/toolbox/templates/**/*"
]
Expand All @@ -38,41 +87,6 @@ Source = "https://github.com/exasol/python-toolbox"
Issues = "https://github.com/exasol/python-toolbox/issues"
Changelog = "https://exasol.github.io/python-toolbox/changelog.html"

[tool.poetry.dependencies]
bandit = { extras = ["toml"], version = "^1.7.9" }
black = ">=24.1.0,<26"
coverage = ">=6.4.4,<8.0.0"
furo = ">=2022.9.15"
importlib-resources = ">=5.12.0"
import-linter = "^2.0"
isort = "^7.0.0"
jinja2 = "^3.1.6"
mypy = ">=0.971"
myst-parser = ">=2.0.0,<4"
nox = ">=2022.8.7"
pip-audit = "^2.7.3"
pip-licenses = "^5.0.0"
pluggy = "^1.5.0"
pre-commit = ">=4,<5"
pydantic = "^2.11.5"
pylint = ">=2.15.4"
pysonar = "^1.0.1.1548"
pytest = ">=7.2.2,<10"
pyupgrade = ">=2.38.2,<4.0.0"
ruff = "^0.14.5"
shibuya = ">=2024.5.14"
sphinx = ">=5.3,<8"
sphinx-copybutton = "^0.5.0"
sphinx-inline-tabs = "^2023.4.21"
sphinx-design = ">=0.5.0,<1"
sphinx-toolbox = "^4.0.0"
typer = { extras = ["all"], version = ">=0.7.0" }
twine = "^6.1.0"

[tool.poetry.group.dev.dependencies]
autoimport = "^1.4.0"
cookiecutter = "^2.6.0"

[build-system]
requires = ["poetry-core>=2.0.0"]
build-backend = "poetry.core.masonry.api"
Expand Down Expand Up @@ -114,18 +128,14 @@ ignore_errors = true

[tool.ruff.lint]
extend-ignore = [
"E", # Syntax errors
"F", # Pyflakes rules (excluding F401)
"UP", # pyupgrade rules
"D", # Docstring rules
"E", # Syntax errors
"F", # Pyflakes rules (excluding F401)
"UP", # pyupgrade rules
"D", # Docstring rules
]
extend-select = ["F401"]
unfixable = []

[tool.poetry.plugins."console_scripts"]
tbx = 'exasol.toolbox.tools.tbx:CLI'
sphinx-multiversion = 'exasol.toolbox.sphinx.multiversion:main'

[tool.poetry.requires-plugins]
poetry-plugin-export = ">=1.8"

Expand Down
Loading