-
Notifications
You must be signed in to change notification settings - Fork 44
[CHORE] Deprecate overture_releases.yaml #529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
John McCall (lowlydba)
merged 10 commits into
main
from
526-chore-deprecate-overture_releasesyaml
Jun 15, 2026
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
3a444d1
chore: deprecate overture_releases.yaml, migrate fetch script to STAC
lowlydba 8a213d9
fix: add concurrency setting to test workflow
lowlydba 5c98db9
fix: address PR review feedback
lowlydba 8904283
chore: remove latest.dbb (legacy alias) from published bundle
lowlydba 412a6bc
chore: remove index.html, add deprecation notice to README
lowlydba 24cda7f
chore: remove simple-registry-manifest.py and registry-manifest.json …
lowlydba 6b87737
docs: add registry-manifest.json to README deprecation notice
lowlydba 8e2dba6
chore: add custom 404 page redirecting to README and STAC catalog
lowlydba 7c7d147
chore: apply OMF brand styling to 404 page
lowlydba c77ea9d
Merge branch 'main' into 526-chore-deprecate-overture_releasesyaml
lowlydba File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| name: Test utils | ||
|
|
||
| on: | ||
| push: | ||
| branches: main | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: "test-${{ github.ref }}" | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Run unit tests | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Python 3.12 | ||
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | ||
| with: | ||
| python-version: "3.12" | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| cd utils | ||
| pip install -r requirements-test.txt | ||
|
|
||
| - name: Run tests | ||
| run: | | ||
| cd utils | ||
| python -m pytest tests/ -v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
|
|
||
| __pycache__/ | ||
| *.pyc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <meta http-equiv="refresh" content="5;url=https://github.com/OvertureMaps/data#release-discovery"> | ||
| <title>Moved | Overture Maps Data</title> | ||
| <link rel="preconnect" href="https://fonts.googleapis.com"> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
| <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700&display=swap" rel="stylesheet"> | ||
| <style> | ||
| :root { | ||
| --omf-navy: #2C2E7F; | ||
| --omf-teal: #0EC1BD; | ||
| --omf-blue: #4051CC; | ||
| --omf-cyan: #4EDAD8; | ||
| --omf-dark: #001A39; | ||
| --omf-white: #FFFFFF; | ||
| } | ||
|
|
||
| * { box-sizing: border-box; margin: 0; padding: 0; } | ||
|
|
||
| body { | ||
| font-family: 'Montserrat', Arial, sans-serif; | ||
| background: var(--omf-dark); | ||
| color: var(--omf-white); | ||
| min-height: 100vh; | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| justify-content: center; | ||
| padding: 2rem; | ||
| text-align: center; | ||
| } | ||
|
|
||
| h1 { | ||
| font-weight: 700; | ||
| font-size: 0.8rem; | ||
| letter-spacing: 0.12em; | ||
| text-transform: uppercase; | ||
| color: var(--omf-cyan); | ||
| margin-bottom: 1.25rem; | ||
| } | ||
|
|
||
| p { | ||
| font-weight: 300; | ||
| font-size: 0.95rem; | ||
| line-height: 1.7; | ||
| max-width: 480px; | ||
| color: var(--omf-white); | ||
| margin-bottom: 0.75rem; | ||
| } | ||
|
|
||
| a { | ||
| color: var(--omf-teal); | ||
| text-decoration: none; | ||
| font-weight: 400; | ||
| } | ||
|
|
||
| a:hover { text-decoration: underline; color: var(--omf-cyan); } | ||
|
|
||
| .divider { | ||
| width: 40px; | ||
| height: 2px; | ||
| background: var(--omf-teal); | ||
| margin: 0 auto 1.5rem; | ||
| } | ||
|
|
||
| footer { | ||
| position: fixed; | ||
| bottom: 1.25rem; | ||
| font-size: 0.7rem; | ||
| font-weight: 300; | ||
| color: var(--omf-cyan); | ||
| opacity: 0.6; | ||
| } | ||
|
|
||
| footer a { color: inherit; } | ||
| </style> | ||
| </head> | ||
| <body> | ||
|
|
||
| <h1>This resource has moved</h1> | ||
| <div class="divider"></div> | ||
|
|
||
| <p> | ||
| The file you requested is no longer published here. Release discovery is | ||
| now handled by the | ||
| <a href="https://stac.overturemaps.org/catalog.json">Overture STAC catalog</a> | ||
| (SpatioTemporal Asset Catalog). | ||
| </p> | ||
| <p> | ||
| See the <a href="https://github.com/OvertureMaps/data#release-discovery">data repo README</a> | ||
| for details. Redirecting in 5 seconds… | ||
| </p> | ||
|
|
||
| <footer><a href="https://overturemaps.org">overturemaps.org</a></footer> | ||
|
|
||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| import json | ||
| import urllib.request | ||
| from urllib.parse import urlparse | ||
|
|
||
| import duckdb | ||
|
|
||
| STAC_CATALOG = "https://stac.overturemaps.org/catalog.json" | ||
| S3_BASE = "s3://overturemaps-us-west-2/release" | ||
| _USER_AGENT = "overturemaps-data/1.0" | ||
|
|
||
| VIEWS = [ | ||
| ("address", "addresses", "address"), | ||
| ("bathymetry", "base", "bathymetry"), | ||
| ("building", "buildings", "building"), | ||
| ("building_part", "buildings", "building_part"), | ||
| ("connector", "transportation", "connector"), | ||
| ("division", "divisions", "division"), | ||
| ("division_area", "divisions", "division_area"), | ||
| ("division_boundary", "divisions", "division_boundary"), | ||
| ("infrastructure", "base", "infrastructure"), | ||
| ("land", "base", "land"), | ||
| ("land_cover", "base", "land_cover"), | ||
| ("land_use", "base", "land_use"), | ||
| ("place", "places", "place"), | ||
| ("segment", "transportation", "segment"), | ||
| ("water", "base", "water"), | ||
| ] | ||
|
|
||
|
|
||
| def fetch_catalog(url: str, timeout: int = 30) -> dict: | ||
| req = urllib.request.Request(url, headers={"User-Agent": _USER_AGENT}) | ||
| with urllib.request.urlopen(req, timeout=timeout) as response: | ||
| return json.loads(response.read()) | ||
|
|
||
|
|
||
| def _release_id_from_href(href: str) -> str: | ||
| parts = [p for p in urlparse(href).path.split("/") if p and p != "."] | ||
| return parts[0] | ||
|
|
||
|
|
||
| def parse_releases(catalog: dict) -> dict: | ||
| latest = catalog["latest"] | ||
| releases = sorted( | ||
| [ | ||
| _release_id_from_href(link["href"]) | ||
| for link in catalog["links"] | ||
| if link["rel"] == "child" | ||
| ], | ||
| reverse=True, | ||
| ) | ||
| return {"latest": latest, "releases": releases} | ||
|
|
||
|
|
||
| def build_views_sql(latest: str, s3_base: str = S3_BASE) -> str: | ||
| stmts = ["INSTALL spatial;", "LOAD spatial;"] | ||
| for view_name, theme, type_ in VIEWS: | ||
| path = f"{s3_base}/{latest}/theme={theme}/type={type_}/*.parquet" | ||
| stmts.append( | ||
| f"CREATE OR REPLACE VIEW {view_name} AS (\n" | ||
| f" SELECT * FROM read_parquet('{path}')\n);" | ||
| ) | ||
| return "\n\n".join(stmts) | ||
|
|
||
|
|
||
| def create_duckdb_views(db_path: str, latest: str, s3_base: str = S3_BASE) -> None: | ||
| conn = duckdb.connect(db_path) | ||
| try: | ||
| conn.sql(build_views_sql(latest, s3_base)) | ||
| finally: | ||
| conn.close() | ||
|
|
||
|
|
||
| def main(): | ||
| catalog = fetch_catalog(STAC_CATALOG) | ||
| output = parse_releases(catalog) | ||
|
|
||
| for release in output["releases"]: | ||
| print(f" - {release}") | ||
|
|
||
| with open("releases.json", "w") as f: | ||
| f.write(json.dumps(output, indent=4)) | ||
|
|
||
| create_duckdb_views("latest.ddb", output["latest"]) | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| -r requirements.txt | ||
| pytest>=8.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1 @@ | ||
| obstore>=0.7.0 | ||
| duckdb==1.3.2 | ||
| pyarrow>=20.0.0 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.