Skip to content

Commit bfd473e

Browse files
committed
Restructure the pyproject.toml file to be compatible with the latest version of poetry
1 parent f4c68c7 commit bfd473e

3 files changed

Lines changed: 31 additions & 22 deletions

File tree

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ repos:
3333

3434
# Linter
3535
- repo: https://github.com/psf/black
36-
rev: "24.10.0"
36+
rev: "25.1.0"
3737
hooks:
3838
- id: black
3939
language_version: python3.13
@@ -48,7 +48,7 @@ repos:
4848

4949
# Run MyPy type checks
5050
- repo: https://github.com/pre-commit/mirrors-mypy
51-
rev: "v1.13.0"
51+
rev: "v1.15.0"
5252
hooks:
5353
- id: mypy
5454
files: src/toolbox_python
@@ -58,7 +58,7 @@ repos:
5858

5959
# Reorder Python imports
6060
- repo: https://github.com/pycqa/isort
61-
rev: "5.13.2"
61+
rev: "6.0.0"
6262
hooks:
6363
- id: isort
6464
name: isort (python)
@@ -67,7 +67,7 @@ repos:
6767

6868
# Find any outdated syntax and replace with modern equivalents
6969
- repo: https://github.com/asottile/pyupgrade
70-
rev: "v3.19.0"
70+
rev: "v3.19.1"
7171
hooks:
7272
- id: pyupgrade
7373
name: Upgrade Python features
@@ -76,7 +76,7 @@ repos:
7676

7777
# Check spelling
7878
- repo: https://github.com/codespell-project/codespell
79-
rev: "v2.3.0"
79+
rev: "v2.4.1"
8080
hooks:
8181
- id: codespell
8282
additional_dependencies:
@@ -87,15 +87,15 @@ repos:
8787

8888
# Remove unused import statements
8989
- repo: https://github.com/hadialqattan/pycln
90-
rev: "v2.4.0"
90+
rev: "v2.5.0"
9191
hooks:
9292
- id: pycln
9393
args:
9494
- "--all"
9595

9696
# Check poetry configs
9797
- repo: https://github.com/python-poetry/poetry
98-
rev: "1.8.0"
98+
rev: "2.1.1"
9999
hooks:
100100
- id: poetry-check
101101

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,22 @@ install-poetry:
3535
$(PYTHON) -m pip install poetry
3636
poetry --version
3737
install:
38+
poetry lock
3839
poetry install --no-interaction --only main
3940
install-dev:
41+
poetry lock
4042
poetry install --no-interaction --with dev
4143
install-docs:
44+
poetry lock
4245
poetry install --no-interaction --with docs
4346
install-test:
47+
poetry lock
4448
poetry install --no-interaction --with test
4549
install-dev-test:
50+
poetry lock
4651
poetry install --no-interaction --with dev,test
4752
install-all:
53+
poetry lock
4854
poetry install --no-interaction --with dev,docs,test
4955

5056

pyproject.toml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
[tool.poetry]
1+
2+
[build-system]
3+
requires = ["poetry-core"]
4+
build-backend = "poetry.core.masonry.api"
5+
6+
[project]
27
name = "toolbox-python"
38
version = "1.0.4"
49
description = "Helper files/functions/classes for generic Python processes"
510
readme = "README.md"
611
license = "MIT"
712
authors = [
8-
"Admin <toolbox-python@data-science-extensions.com>",
13+
{name="Chris Mahoney", email="toolbox-python@data-science-extensions.com"},
914
]
1015
maintainers = [
11-
"Admin <toolbox-python@data-science-extensions.com>",
12-
]
13-
packages = [
14-
{ include = "toolbox_python", from = "src" },
16+
{name="Chris Mahoney", email="toolbox-python@data-science-extensions.com"},
1517
]
1618
classifiers = [
1719
"Topic :: Software Development :: Build Tools",
@@ -29,18 +31,23 @@ classifiers = [
2931
"Topic :: Software Development :: Testing :: Unit",
3032
"Topic :: Utilities",
3133
]
34+
requires-python = ">3.9,<4.0"
35+
dependencies = [
36+
"typeguard==4.*",
37+
"more-itertools==10.*",
38+
]
3239

33-
[tool.poetry.urls]
40+
[project.urls]
3441
Homepage = "https://data-science-extensions.com/python-toolbox"
3542
Documentation = "https://data-science-extensions.com/python-toolbox"
3643
Repository = "https://github.com/data-science-extensions/toolbox-python"
3744
Changelog = "https://github.com/data-science-extensions/toolbox-python/releases"
3845
Issues = "https://github.com/data-science-extensions/toolbox-python/issues"
3946

40-
[tool.poetry.dependencies]
41-
python = ">3.9,<4.0"
42-
typeguard = "4.*"
43-
more-itertools = "10.*"
47+
[tool.poetry]
48+
packages = [
49+
{ include = "toolbox_python", from = "src" },
50+
]
4451

4552
[tool.poetry.group.dev]
4653
optional = true
@@ -182,7 +189,3 @@ files = [
182189
"src/toolbox_python/__init__.py",
183190
"src/tests/test_version.py",
184191
]
185-
186-
[build-system]
187-
requires = ["poetry-core"]
188-
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)