Skip to content

Commit 435ab74

Browse files
committed
[CHORE](ci) Test dep floors via lowest-direct matrix
The check-python-code workflow now runs across the supported Python minor versions (3.10-3.14), and adds a lowest-direct cell that re- resolves every direct dependency to its declared floor before running make check. Failures in that cell mean a declared minimum is wrong -- either the code uses a feature newer than the floor admits, or the pin needs to be raised. Setting UV_RESOLUTION=lowest-direct causes the existing make uv-sync to re-resolve from the lockfile rather than follow it, so no separate lock or constraints file is needed. The declared floors lie about the actual minimums in several places. Bump them to what the code requires today: - pydantic >= 2.12: optionality.py imports pydantic.experimental.missing_sentinel, which only exists in 2.12+. feature.py imports ModelWrapValidatorHandler at the top level (re-exported in 2.10.4) and Tag (added in 2.5). - ruff >= 0.13: 0.12.x still fires the deprecated UP038 rule under select = ["UP"], which the workspace config selects. - deepdiff >= 8.6: first version shipping a py.typed marker, without which mypy errors on import-untyped. Per-package dev deps that were unpinned (ruff, mypy, pytest in overture-schema-cli and overture-schema-system; pyyaml, deepdiff in overture-schema) now match the workspace dev-group floors. uv warns about unpinned direct deps under lowest-direct resolution; pinning silences the warnings and makes the floor explicit. Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
1 parent f4160af commit 435ab74

14 files changed

Lines changed: 596 additions & 549 deletions

File tree

.github/workflows/check-python-code.yaml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,22 @@ concurrency:
2222

2323
jobs:
2424
check:
25-
name: Check
25+
name: Check (${{ matrix.resolution }}, py${{ matrix.python }})
2626
runs-on: ubuntu-latest
2727

28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
# Default resolution exercises the committed lock against every
32+
# supported Python minor version. The lowest-direct cell pins each
33+
# direct dependency to its declared floor (see UV_RESOLUTION below)
34+
# and runs only on the Python floor.
35+
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
36+
resolution: [default]
37+
include:
38+
- python: "3.10"
39+
resolution: lowest-direct
40+
2841
permissions:
2942
contents: read
3043

@@ -41,7 +54,18 @@ jobs:
4154
- name: Set up Python
4255
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
4356
with:
44-
python-version: "3.10"
57+
python-version: ${{ matrix.python }}
58+
59+
# UV_RESOLUTION=lowest-direct makes `uv sync` re-resolve every direct
60+
# dependency to the lowest version permitted by pyproject.toml. This
61+
# exercises the declared floor (e.g. pydantic==2.12.0) instead of
62+
# whatever the committed lock happens to point at. Failures here mean
63+
# a direct dep's minimum needs to be bumped. Set via GITHUB_ENV only
64+
# in the relevant cell so default cells run with no UV_RESOLUTION at
65+
# all -- otherwise an empty value is rejected by uv.
66+
- name: Configure resolution
67+
if: matrix.resolution == 'lowest-direct'
68+
run: echo "UV_RESOLUTION=lowest-direct" >> "$GITHUB_ENV"
4569

4670
- name: Run make check
4771
run: make check

packages/overture-schema-addresses-theme/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ maintainers = [
44
]
55
dependencies = [
66
"overture-schema-core",
7-
"pydantic>=2.0",
7+
"pydantic>=2.12.0",
88
]
99
description = "Overture Maps addresses theme models and structures"
1010
dynamic = ["version"]

packages/overture-schema-annex/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
maintainers = [
33
{name = "Overture Maps Schema Working Group"},
44
]
5-
dependencies = ["overture-schema-core", "pydantic>=2.0"]
5+
dependencies = ["overture-schema-core", "pydantic>=2.12.0"]
66
description = "Add your description here"
77
dynamic = ["version"]
88
license = "MIT"

packages/overture-schema-base-theme/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ maintainers = [
55
dependencies = [
66
"overture-schema-core",
77
"overture-schema-system",
8-
"pydantic>=2.0",
8+
"pydantic>=2.12.0",
99
]
1010
description = "Overture Maps base theme shared structures and models (bathymetry, infrastructure, land, land_cover, land_use, water)"
1111
dynamic = ["version"]

packages/overture-schema-buildings-theme/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ maintainers = [
55
dependencies = [
66
"overture-schema-core",
77
"overture-schema-system",
8-
"pydantic>=2.0",
8+
"pydantic>=2.12.0",
99
]
1010
description = "Overture Maps buildings theme shared structures, building types, and building part types"
1111
dynamic = ["version"]

packages/overture-schema-cli/pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ maintainers = [
55
dependencies = [
66
"overture-schema-core",
77
"overture-schema-system",
8-
"pydantic>=2.0",
8+
"pydantic>=2.12.0",
99
"pyyaml>=6.0.2",
1010
"click>=8.0",
1111
"rich>=13.0",
@@ -33,9 +33,9 @@ requires = ["hatchling"]
3333

3434
[dependency-groups]
3535
dev = [
36-
"pytest>=7.0",
37-
"ruff",
38-
"mypy",
36+
"pytest>=9.0.0",
37+
"ruff>=0.13.0",
38+
"mypy>=1.17.0",
3939
]
4040

4141
[tool.hatch.version]

packages/overture-schema-core/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ description = "Core schemas for Overture Maps"
1212
license = "MIT"
1313
dependencies = [
1414
"overture-schema-system",
15-
"pydantic>=2.0",
15+
"pydantic>=2.12.0",
1616
"shapely>=2.1.1",
1717
]
1818

packages/overture-schema-divisions-theme/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ maintainers = [
55
dependencies = [
66
"overture-schema-core",
77
"overture-schema-system",
8-
"pydantic>=2.0",
8+
"pydantic>=2.12.0",
99
]
1010
description = "Overture Maps divisions theme shared structures, division, division area and division boundary types"
1111
dynamic = ["version"]

packages/overture-schema-places-theme/pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ maintainers = [
55
dependencies = [
66
"overture-schema-core",
77
"overture-schema-system",
8-
"pydantic>=2.0",
9-
"pydantic[email]",
8+
"pydantic[email]>=2.12.0",
109
]
1110
description = "Overture Maps places theme with place type models"
1211
dynamic = ["version"]

packages/overture-schema-system/pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ readme = "README.md"
1313
requires-python = ">=3.10"
1414
license = "MIT"
1515
dependencies = [
16-
"pydantic>=2.0.0",
16+
"pydantic>=2.12.0",
1717
"shapely>=2.0.0",
1818
]
1919

@@ -24,9 +24,9 @@ Issues = "https://github.com/OvertureMaps/schema/issues"
2424

2525
[dependency-groups]
2626
dev = [
27-
"pytest>=7.0",
28-
"ruff",
29-
"mypy",
27+
"pytest>=9.0.0",
28+
"ruff>=0.13.0",
29+
"mypy>=1.17.0",
3030
]
3131

3232
[tool.hatch.version]

0 commit comments

Comments
 (0)