7d53abc057
Avoid lazy loads in .__repr__()
...
`ReplaySimulation`, `ReplayedOrder`, and `Forecast` accessed
relationships in their `.__repr__()`, which emits queries
or fails for detached instances.
They now use the foreign key columns.
2026-12-01 22:34:38 +01:00
1f9d0effae
Cache City.map with functools.cached_property
...
This replaces the manual caching in the uninitialized
`._map` attribute with a `hasattr()` check.
`.clear_map()` now only discards the cached map.
2026-12-01 22:27:28 +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
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
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
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
7190724260
Enable the "possibly-undefined" error code
2026-12-01 13:11:32 +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
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
e4016db9fe
Enable "no_implicit_reexport"
...
Also, remove the unused `orm_exc` import alias
2026-12-01 12:37:46 +01:00
2bc2408694
Type-check pandas with pandas-stubs
CI / Checks (Python 3.13) (push) Successful in 1m54s
2026-12-01 00:31:21 +01:00
01416a1175
Fix the type annotation of Forecast.from_dataframe()
2026-12-01 00:27:29 +01:00
e612e33f59
Enable PIE in flake8 and ruff
2026-11-30 23:40:15 +01:00
0090145b65
Capitalize the explanations after "=>"
2026-11-30 23:27:31 +01:00
c56fe649b7
Enable RUF in ruff
2026-11-30 23:17:41 +01:00
ae2dc8db64
Enable EM in flake8 and ruff
2026-11-30 22:59:41 +01:00
652713e702
Enable NPY in ruff
2026-11-30 22:49:41 +01:00
5beb88559f
Enable FBT in flake8 and ruff
2026-11-30 22:43:35 +01:00
99dda74a9e
Enable PL in ruff
2026-11-30 22:28:12 +01:00
95f08bc96d
Enable PD in flake8 and ruff
2026-11-30 22:11:10 +01:00
0a4fd0edbc
Enable PERF in ruff
2026-11-30 22:06:44 +01:00
0cb924b3b6
Enable ISC in flake8 and ruff
2026-11-30 22:06:43 +01:00
3bd7dd5772
Enable RET in flake8 and ruff
2026-11-30 22:06:42 +01:00
007998372f
Enable SIM in flake8 and ruff
2026-11-30 22:06:41 +01:00
cf2534f41e
Import velofy.config as pkg_config everywhere
2026-11-30 20:19:35 +01:00
e9743eaa01
Import rpy2.robjects.packages as r_packages
2026-11-30 20:06:09 +01:00
8bca30c836
Import rpy2.rinterface_lib.callbacks as r_callbacks
2026-11-30 20:04:44 +01:00
9b844b16e7
Import statsmodels.tsa.api as tsa
...
The alias in the `statsmodels` documentation
2026-11-30 20:03:25 +01:00
5ca16ae47c
Import datetime as dt everywhere
2026-11-30 15:50:17 +01:00
9c3b52befb
Import typing as t ...
...
... and `collections.abc` as `cabc`
Linting rule for `velofy`: Import modules instead of objects
2026-11-30 15:42:21 +01:00
c6518f6b39
Use builtin generics and X | None
...
Since Python 3.9 and 3.10, `list`, `tuple`, and `X | None`
replace `typing.List`, `typing.Tuple`, and `typing.Optional`
2026-11-30 15:07:47 +01:00