db2e00216d
Simplify the docstrings of the migrations
...
The "Revision" and "Revises" lines and the revision hashes in `upgrade()`
and `downgrade()` repeated the `revision` and `down_revision` variables;
the creation date is in the file name.
2026-12-01 22:20:06 +01:00
f532aae588
Test grids with the same side length in different cities
...
Regression test for the removed `unique=True` on `Grid.side_length`.
2026-12-01 22:20:06 +01:00
b36a3d1cd6
Allow the same Grid.side_length across cities
...
The `unique=True` on `Grid.side_length`
made the side length unique across all cities.
The intended rule is the `UniqueConstraint("city_id", "side_length")`,
which the migrations already implement; so, no migration is needed.
2026-12-01 21:58:29 +01:00
731299bb6e
Add nox session "verify-db-objects"
...
The new "verify-db-objects" session creates the ORM objects
with `.create_all()` in a temporary database and compares
them with the `CLEAN_SCHEMA` of a "live" database using `sqlalchemy-diff`
2026-12-01 21:53:31 +01:00
69b9d53704
Merge branch 'add-typeguard' into develop
...
CI / Checks (Python 3.13) (push) Successful in 2m47s
Reviewed-on: #15
2026-12-01 17:54:25 +01:00
cfd8d33049
Rename the "doctest" session into "test-docstrings"
CI / Checks (Python 3.13) (push) Successful in 2m46s
2026-12-01 17:14:48 +01:00
f47c87f51f
Add the "test-types" session as a pre-commit hook
2026-12-01 17:14:47 +01:00
2f313e7e3a
Pull out the TEST_DEPENDENCIES
2026-12-01 17:13:14 +01:00
5f7d3108de
Check the type annotations at runtime with typeguard
2026-12-01 17:07:00 +01:00
893b6bd8f1
Seed the random fake data in the tests
2026-12-01 15:51:24 +01:00
e4711875ca
Use a pd.DataFrame as the sentinel in test_totals_is_cached
2026-12-01 15:46:54 +01:00
f92fd35ce3
Revert to bare pd.Series in OrderHistory
...
`typeguard` evaluates the annotations at runtime where `pd.Series[int]` raises a `TypeError`
2026-12-01 15:31:58 +01:00
8abc93987e
Generate the fake coordinates as floats
...
Also, remove the misleading comment in `Location`
2026-12-01 15:27:53 +01:00
3b8b041a3e
Merge branch 'add-pyright' into develop
...
CI / Checks (Python 3.13) (push) Successful in 2m2s
Reviewed-on: #14
2026-12-01 15:18:18 +01:00
9a0dbb8ad8
Introduce TYPECHECK_LOCATIONS in the noxfile
CI / Checks (Python 3.13) (push) Successful in 2m2s
2026-12-01 15:05:54 +01:00
96b5a07f20
Add pyright to the "lint" session
2026-12-01 15:00:26 +01:00
66265c8808
Pass an explicit empty list to OrderedSet()
2026-12-01 14:50:16 +01:00
804a4a0966
Iterate over the rows in Forecast.from_dataframe()
2026-12-01 14:49:15 +01:00
77806b14b9
Declare the name of the forecasting models as a class variable
2026-12-01 14:45:37 +01:00
c74a7b81f1
Merge branch 'stricter-mypy' into develop
...
CI / Checks (Python 3.13) (push) Successful in 1m56s
Reviewed-on: #13
2026-12-01 14:26:52 +01:00
081d6f7fd9
Type the time series of OrderHistory as pd.Series[int]
CI / Checks (Python 3.13) (push) Successful in 1m55s
2026-12-01 14:23:14 +01:00
d6b798a736
Type-check scripts/
2026-12-01 14:05:34 +01:00
f7a6aa1881
Type-check noxfile.py
2026-12-01 14:03:44 +01:00
369957c06b
Narrow the untyped calls of folium.PolyLine
2026-12-01 13:38:00 +01:00
883a3ab8cc
Enable the "truthy-iterable" error code
2026-12-01 13:11:47 +01:00
9da2d0b703
Enable the "truthy-bool" error code
2026-12-01 13:11:46 +01:00
fef268321a
Enable the "redundant-expr" error code
2026-12-01 13:11:45 +01:00
7190724260
Enable the "possibly-undefined" error code
2026-12-01 13:11:32 +01:00
dafc695693
Enable the "mutable-override" error code
2026-12-01 13:11:31 +01:00
a4c1574135
Enable the "deprecated" error code
2026-12-01 13:11:30 +01:00
784d5c8ca0
Enable "warn_unreachable"
...
Also, remove the dead `isinstance()` check in `Location.relate_to()`
2026-12-01 13:07:53 +01:00
0a5f8f6c55
Enable "warn_return_any"
2026-12-01 12:39:45 +01:00
bbc00e2f1c
Enable "disallow_any_unimported"
2026-12-01 12:39:44 +01:00
0d2aab4211
Use t.Self for methods returning their own class
2026-12-01 12:38:04 +01:00
76982126f4
Type the relationships of Restaurant
2026-12-01 12:38:04 +01:00
5ad3fb538d
Type the relationships of ReplaySimulation
2026-12-01 12:38:04 +01:00
4be6078327
Type the relationships of ReplayedOrder
...
Also, move the `db` import to the top, which makes some quotes unnecessary
2026-12-01 12:38:03 +01:00
699e7f0443
Type the relationships of Pixel
2026-12-01 12:38:03 +01:00
af0e3cf1a1
Type the relationships of Path
2026-12-01 12:38:03 +01:00
f45a444f83
Type the relationships of Order
2026-12-01 12:38:02 +01:00
9a2ec3d86b
Type the relationships of Grid
2026-12-01 12:38:02 +01:00
90c0597193
Type the relationships of Forecast
...
Also, move the `db` import to the top
2026-12-01 12:38:02 +01:00
bda9cf69ed
Type the relationships of Customer
2026-12-01 12:38:01 +01:00
99c8c2ac2e
Type the relationships of Courier
2026-12-01 12:38:01 +01:00
8f5d11db7f
Type the relationships of City
2026-12-01 12:38:01 +01:00
de86c2e64d
Type the relationships of AddressPixelAssociation
2026-12-01 12:38:01 +01:00
2e03e58716
Type the relationships of Address
2026-12-01 12:38:00 +01:00
6633067563
Turn the ORM Base into a real class
2026-12-01 12:38:00 +01:00
cd74b343bc
Replace the __future__ imports ...
...
... with quoted annotations where needed
2026-12-01 12:38:00 +01:00
ef0888619e
Enable PYI019 and PYI034
2026-12-01 12:37:54 +01:00