Skip to content

Commit 07ab41c

Browse files
authored
update(deps): with added cooldown (#43)
1 parent 792a1db commit 07ab41c

File tree

5 files changed

+462
-381
lines changed

5 files changed

+462
-381
lines changed

intbot/core/analysis/products.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,15 @@ def flat_product_data(products: list[Product]) -> pl.DataFrame:
106106
)
107107
)
108108

109-
return pl.DataFrame(rows)
109+
schema = pl.Schema({
110+
"product_id": pl.Int64(),
111+
"variation_id": pl.Int64(),
112+
"product_name": pl.String(),
113+
"type": pl.String(),
114+
"variant": pl.String(),
115+
"price": pl.Decimal(precision=10, scale=2),
116+
})
117+
return pl.DataFrame(rows, schema=schema)
110118

111119

112120
def latest_flat_product_data() -> pl.DataFrame:

intbot/tests/test_analysis/test_products.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_flat_product_data():
4747
"product_name": pl.String,
4848
"type": pl.String,
4949
"variant": pl.String,
50-
"price": pl.Decimal(precision=None, scale=0),
50+
"price": pl.Decimal(precision=10, scale=2),
5151
}
5252
)
5353

@@ -185,6 +185,14 @@ def test_latest_flat_product_data():
185185
},
186186
],
187187
)
188+
expected_schema = {
189+
"product_id": pl.Int64,
190+
"variation_id": pl.Int64,
191+
"product_name": pl.String,
192+
"type": pl.String,
193+
"variant": pl.String,
194+
"price": pl.Decimal(precision=10, scale=2),
195+
}
188196
expected = pl.DataFrame(
189197
[
190198
FlatProductDescription(
@@ -267,7 +275,8 @@ def test_latest_flat_product_data():
267275
type="Late",
268276
price=Decimal("675.00"),
269277
),
270-
]
278+
],
279+
schema=expected_schema,
271280
)
272281

273282
df = latest_flat_product_data()

intbot/tests/test_tasks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
process_zammad_webhook,
1313
)
1414
from django.utils import timezone
15-
from django_tasks.task import ResultStatus
15+
from django_tasks import TaskResultStatus
1616
from httpx import Response
1717

1818

@@ -56,8 +56,8 @@ def test_process_webhook_fails_if_unsupported_source():
5656
# Instead we have to check the result
5757
result = process_webhook.enqueue(str(wh.uuid))
5858

59-
assert result.status == ResultStatus.FAILED
60-
assert result.traceback.endswith("ValueError: Unsupported source asdf\n")
59+
assert result.status == TaskResultStatus.FAILED
60+
assert any("Unsupported source asdf" in str(e) for e in result.errors)
6161

6262

6363
@pytest.mark.django_db

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ readme = "README.md"
66
requires-python = ">=3.12,<3.13"
77
dependencies = [
88
"discord-py>=2.4.0",
9-
"django>=5.1.4",
9+
"django>=6.0",
1010
"django-tasks>=0.6.1",
1111
"psycopg>=3.2.3",
1212
"ruff>=0.8.6",
@@ -32,6 +32,9 @@ dependencies = [
3232
"plotly-stubs>=0.0.5",
3333
]
3434

35+
[tool.uv]
36+
exclude-newer = "1 week"
37+
3538
[tool.pytest.ini_options]
3639
pythonpath = [
3740
"intbot"

0 commit comments

Comments
 (0)