Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
with:
enable-cache: true
# Keep in sync with pyproject.toml's `tool.uv.required-version`.
version: "0.8.22"
version: "0.9.18"
# Keep in sync with pyproject.toml's `project.requires-python`.
- run: uv python install 3.11
- run: uv sync --locked
Expand Down
3 changes: 1 addition & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"python.analysis.autoImportCompletions": true,
"python.languageServer": "Pylance",
"python.languageServer": "None",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false
}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Keep Python version in sync with:
# - pyproject.toml's `project.requires-python`.
# - the main stage below.
FROM ghcr.io/astral-sh/uv:0.8.22-python3.11-bookworm-slim AS builder
FROM ghcr.io/astral-sh/uv:0.9.18-python3.11-bookworm-slim AS builder

ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy

Expand Down
2 changes: 1 addition & 1 deletion app/load_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async def read_station_information(
)
station_information_data = cast(Any, station_information_data)["data"]["stations"]

station_information_df = pd.DataFrame(station_information_data)[ # ty: ignore[no-matching-overload]
station_information_df = pd.DataFrame(station_information_data)[
["station_id", "name", "capacity", "lat", "lon"]
].rename(
columns={
Expand Down
2 changes: 1 addition & 1 deletion app/util/reverse_geocode.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ async def _reverse_geocode(

result_df = result_df.set_index(list(coordinates_df.columns))
result_df = result_df.rename(columns=_COLUMN_NAME_MAPPING)
return result_df.to_dict("index")
return result_df.to_dict("index") # ty: ignore[invalid-return-type]


async def reverse_geocode(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ error-on-warning = true
# Keep in sync with:
# - .github/workflows/test.yml
# - Dockerfile`'s `builder`.
required-version = ">=0.8.22"
required-version = ">=0.9.18"
2 changes: 1 addition & 1 deletion skeleton/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def _generate_class_name_and_lines(
)
for child_name in skeleton
}
case origin, (name_type, value_type) if origin is Mapping:
case origin, (name_type, value_type) if origin is dict:
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required by the changes in skeleton/typing.py.

assert isinstance(skeleton, Mapping)
assert name_type is str
class_name_and_lines_from_attribute_name = {
Expand Down
10 changes: 5 additions & 5 deletions skeleton/typing.py
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without these changes, the latest version of ty raises an error when doing SKELETON: Skeleton = ... in skeleton/skeleton.py.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from collections.abc import Mapping, Set as AbstractSet
from collections.abc import Set as AbstractSet
from typing import Annotated, TypeAlias

from typing_extensions import TypedDict
Expand All @@ -7,14 +7,14 @@

_ColumnSkeleton: TypeAlias = Annotated[str, Node(key_length=2)]
_TableSkeleton: TypeAlias = Annotated[AbstractSet[_ColumnSkeleton], Node()]
_TablesSkeleton: TypeAlias = Mapping[str, _TableSkeleton]
_TablesSkeleton: TypeAlias = dict[str, _TableSkeleton]

_LevelSkeleton: TypeAlias = Annotated[str, Node(key_length=3)]
_HierarchySkeleton: TypeAlias = Annotated[
AbstractSet[_LevelSkeleton], Node(key_length=2)
]
_DimensionSkeleton: TypeAlias = Mapping[str, _HierarchySkeleton]
_DimensionsSkeleton: TypeAlias = Mapping[str, _DimensionSkeleton]
_DimensionSkeleton: TypeAlias = dict[str, _HierarchySkeleton]
_DimensionsSkeleton: TypeAlias = dict[str, _DimensionSkeleton]

_MeasureSkeleton: TypeAlias = Annotated[str, Node()]
_MeasuresSkeleton: TypeAlias = AbstractSet[_MeasureSkeleton]
Expand All @@ -27,7 +27,7 @@ class __CubeSkeleton(TypedDict):

_CubeSkeleton: TypeAlias = Annotated[__CubeSkeleton, Node()]

_CubesSkeleton: TypeAlias = Mapping[str, _CubeSkeleton]
_CubesSkeleton: TypeAlias = dict[str, _CubeSkeleton]


class Skeleton(TypedDict):
Expand Down
1 change: 1 addition & 0 deletions tests/docker/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def session_inside_docker_container_fixture(
raise RuntimeError(f"Session start timed out:\n{logs}")

container.reload() # Refresh `attrs` to get its `HostPort`.
assert container.attrs is not None
host_port = int(
next(iter(container.attrs["NetworkSettings"]["Ports"].values()))[0][
"HostPort"
Expand Down
712 changes: 384 additions & 328 deletions uv.lock

Large diffs are not rendered by default.

Loading