Skip to content

Commit 21d73a5

Browse files
committed
Migrate pyproject.toml to Poetry 2.x format
1 parent a1c38fc commit 21d73a5

File tree

8 files changed

+434
-158
lines changed

8 files changed

+434
-158
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,37 +106,39 @@ repos:
106106
hooks:
107107
- id: pylint
108108
name: lint files with pylint (honeyback)
109-
entry: poetry run -C ./src/honeyback pylint --rcfile ./src/honeyback/pyproject.toml -sn -rn
109+
entry: poetry run -C ./src/honeyback pylint --rcfile ./pyproject.toml -sn -rn ./honeyquest
110110
language: system
111+
pass_filenames: false
111112
files: ^src\/honeyback\/.*\.py$
112113
- repo: local
113114
hooks:
114115
- id: pylint
115116
name: lint files with pylint (honeypatch)
116-
entry: poetry run -C ./src/honeypatch pylint --rcfile ./src/honeypatch/pyproject.toml -sn -rn
117+
entry: poetry run -C ./src/honeypatch pylint --rcfile ./pyproject.toml -sn -rn ./honeypatch ./tests
117118
language: system
119+
pass_filenames: false
118120
files: ^src\/honeypatch\/.*\.py$
119121
- repo: local
120122
hooks:
121123
- id: mypy
122124
name: check types with mypy (honeyback)
123-
entry: poetry run -C ./src/honeyback mypy --config-file ./src/honeyback/pyproject.toml ./src/honeyback
125+
entry: poetry run -C ./src/honeyback mypy --config-file ./pyproject.toml .
124126
language: system
125127
pass_filenames: false
126128
files: ^src\/honeyback\/.*\.py$
127129
- repo: local
128130
hooks:
129131
- id: mypy
130132
name: check types with mypy (honeypatch)
131-
entry: poetry run -C ./src/honeypatch mypy --config-file ./src/honeypatch/pyproject.toml ./src/honeypatch/honeypatch ./src/honeypatch/tests
133+
entry: poetry run -C ./src/honeypatch mypy --config-file ./pyproject.toml ./honeypatch ./tests
132134
language: system
133135
pass_filenames: false
134136
files: ^src\/honeypatch\/.*\.py$
135137
- repo: local
136138
hooks:
137139
- id: mypy
138140
name: test with pytest (honeypatch)
139-
entry: poetry run -C ./src/honeypatch pytest -v --cov=honeypatch ./src/honeypatch
141+
entry: poetry run -C ./src/honeypatch pytest -v --cov=honeypatch .
140142
language: system
141143
pass_filenames: false
142144
files: ^src\/honeypatch\/.*\.py$

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ You need the following toolchain installed:
8888

8989
- [Node.js 20](https://nodejs.org/en/download/) for the frontend app
9090
- [Python 3.10](https://www.python.org/downloads/) for the backend API
91-
- [Poetry](https://python-poetry.org/docs/#installation) for Python dependency management
91+
- [Poetry 2](https://python-poetry.org/docs/#installation) for Python dependency management
9292
- [pre-commit](https://pre-commit.com/#install) for the pre-commit hooks
9393

9494
First, install Honeyfront (frontend for Honeyquest) dependencies.

src/honeyback/honeyquest/data/ops/visuals/answers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def plot_number_of_queries_answered(
6060
widths=0.5,
6161
showfliers=False,
6262
zorder=10,
63-
**latex.BOXPLOT_KWARGS
63+
**latex.BOXPLOT_KWARGS,
6464
)
6565

6666
plt.xlim(0, 180)
@@ -106,7 +106,7 @@ def plot_query_response_time(
106106
widths=0.5,
107107
showfliers=False,
108108
zorder=1,
109-
**latex.BOXPLOT_KWARGS
109+
**latex.BOXPLOT_KWARGS,
110110
)
111111

112112
latex.tick_distance("x", 5, "minor")

src/honeyback/poetry.lock

Lines changed: 309 additions & 98 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/honeyback/pyproject.toml

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,40 @@
1-
[tool.poetry]
1+
[project]
22
name = "honeyquest"
33
version = "0.1.2"
44
license = "Apache-2.0"
5-
repository = "https://github.com/dynatrace-oss/honeyquest"
5+
requires-python = ">=3.10,<3.11"
66
description = "Honeyquest tasks humans to distinguish neutral, risky, and deceptive payloads"
7-
authors = ["Mario Kahlhofer <mario.kahlhofer@dynatrace.com>"]
7+
authors = [
8+
{name = "Mario Kahlhofer", email = "mario.kahlhofer@dynatrace.com>"}
9+
]
10+
dependencies = [
11+
"typer (>=0.12.3,<0.13.0)",
12+
"loguru (>=0.7.2,<0.8.0)",
13+
"dagster (==0.14.20)",
14+
"dagit (==0.14.20)",
15+
"ipykernel (>=6.29.5,<7.0.0)",
16+
"pydantic (>=2.8.2,<3.0.0)",
17+
"pydantic-settings (>=2.3.4,<3.0.0)",
18+
"PyYAML (>=6.0.1,<7.0.0)",
19+
"mistune (>=3.0.2,<4.0.0)",
20+
"fastapi (>=0.115.12,<0.116.0)",
21+
"boto3[crt] (>=1.34.149,<2.0.0)",
22+
# we don't care about the exact version of transitive dependencies,
23+
# instead we are happy with whatever version the other packages require
24+
"requests",
25+
"python-dotenv",
26+
# pin this dependency for session support in fastapi
27+
"itsdangerous (==1.1.0)",
28+
# pin these dependencies to avoid a conflict with dagster
29+
"sqlalchemy (==1.4.44)",
30+
"pendulum (==2.1.2)",
31+
"lxml (==5.1.1)",
32+
]
833

9-
[tool.poetry.dependencies]
10-
python = "~3.10"
11-
typer = "^0.12.3"
12-
loguru = "^0.7.2"
13-
dagster = "^0.14.20"
14-
dagit = "^0.14.20"
15-
ipykernel = "^6.29.5"
16-
pydantic = "^2.8.2"
17-
pydantic-settings = "^2.3.4"
18-
PyYAML = "^6.0.1"
19-
mistune = "^3.0.2"
20-
fastapi = "^0.115.12"
21-
boto3 = {extras = ["crt"], version = "^1.34.149"}
22-
# we don't care about the exact version of transitive dependencies,
23-
# instead we are happy with whatever version the other packages require
24-
requests = "*"
25-
python-dotenv = "*"
26-
# pin this dependency for session support in fastapi
27-
itsdangerous = "^1.1.0"
28-
# pin these dependencies to avoid a conflict with dagster
29-
sqlalchemy = "^1.4.44"
30-
pendulum = "^2.1.2"
31-
lxml = "5.1.1"
34+
[project.urls]
35+
repository = "https://github.com/dynatrace-oss/honeyquest"
3236

33-
[tool.poetry.scripts]
37+
[project.scripts]
3438
honeyquest = "honeyquest.__main__:app"
3539

3640
[tool.poetry.group.hooks]
@@ -103,6 +107,7 @@ disable = [
103107
"protected-access",
104108
"consider-using-with",
105109
"too-many-arguments",
110+
"too-many-positional-arguments",
106111
"too-many-statements",
107112
"too-many-locals",
108113
"too-few-public-methods",

src/honeypatch/honeypatch/__main__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
app = typer.Typer(add_completion=False)
3434

3535

36-
# pylint: disable=too-many-positional-arguments
3736
@app.command("inject")
3837
def inject_cli(
3938
filename: typer.FileText = typer.Argument(

0 commit comments

Comments
 (0)