Skip to content

Replace OSRM scripts with a safe Python lifecycle - #84

Open
Claudio9701 wants to merge 1 commit into
geofabrik/canonical-catalogfrom
osrm/python-lifecycle
Open

Replace OSRM scripts with a safe Python lifecycle#84
Claudio9701 wants to merge 1 commit into
geofabrik/canonical-catalogfrom
osrm/python-lifecycle

Conversation

@Claudio9701

Copy link
Copy Markdown
Collaborator

Outcome

Replaces UrbanPy's fragile OSRM Bash/PowerShell orchestration with one safe, typed, cross-platform Python lifecycle and a Docker-independent HTTP client.

What changed

  • adds strict OSRMConfig, plan, manifest, status, and result models
  • resolves only canonical Geofabrik catalog regions (or exact ISO aliases)
  • downloads official PBFs atomically with bounded, validator-aware resume and streaming SHA-256
  • stages and atomically publishes immutable prepared datasets
  • runs the correct MLD sequence: .osm.pbf for extract, .osrm thereafter
  • pins the official OSRM v5.25.0 image by digest and explicitly targets its current linux/amd64 platform
  • adds Docker daemon preflight, safe argv-only execution, resource labels, collision protection, loopback binding, HTTP readiness, logs/status, and dry-run cleanup
  • adds a typed route/table client that does not depend on Docker
  • keeps warning-emitting legacy adapters for one release
  • removes the obsolete Bash, PowerShell, legacy class, and notebook launcher
  • documents operation, security defaults, ARM emulation, and migration

Verification

  • pytest -q: 50 passed, 2 deselected
  • strict mypy OSRM/model/catalog slice: clean
  • ruff check urbanpy tests: clean
  • sphinx-build -W --keep-going: clean
  • trunk check --all: 114 files, no issues

Stack

Base: #82
Roadmap: #61
Parent: #67

Closes #83
Closes #21
Closes #26
Closes #29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant