release: bump version to 0.59.0
Some checks failed
ci / backend (push) Has been cancelled
ci / frontend (push) Has been cancelled
ci / delivery (push) Has been cancelled
release / images (push) Has been cancelled

This commit is contained in:
rayd1o
2026-05-16 05:02:05 +08:00
parent 93eb41a9f7
commit 9b913a3b83
86 changed files with 3645 additions and 1198 deletions

View File

@@ -257,46 +257,6 @@ DEFAULT_DATASOURCES = {
"credential_provider": "aisstream",
"credential_status": "supported",
},
"earth_admin0_boundaries": {
"id": 29,
"name": "Earth Admin-0 Boundaries",
"display_name": "Earth Admin-0 国界源",
"module": "L3",
"priority": "P1",
"frequency_minutes": 10080,
"is_free": True,
"requires_credentials": False,
},
"earth_coastline": {
"id": 30,
"name": "Earth Coastline",
"display_name": "Earth 海岸线源",
"module": "L3",
"priority": "P1",
"frequency_minutes": 10080,
"is_free": True,
"requires_credentials": False,
},
"earth_claim_lines": {
"id": 31,
"name": "Earth Claim Lines",
"display_name": "Earth 主张线源",
"module": "L3",
"priority": "P1",
"frequency_minutes": 10080,
"is_free": True,
"requires_credentials": False,
},
"earth_boundary_tiles": {
"id": 32,
"name": "Earth PMTiles Builder",
"display_name": "Earth PMTiles 构建器",
"module": "L3",
"priority": "P1",
"frequency_minutes": 10080,
"is_free": True,
"requires_credentials": False,
},
"media_news_archive": {
"id": 33,
"name": "Media News Archive",

View File

@@ -1,49 +0,0 @@
"""Default Earth boundary source configuration."""
from __future__ import annotations
from typing import Any
EARTH_BOUNDARY_SOURCE_MAPPING: dict[str, Any] = {
"source": {"items_path": "$.features[*]"},
"fields": {
"source_id": {"path": "$.properties.id", "type": "string"},
"name": {"path": "$.properties.name", "type": "string"},
"geometry": {"path": "$.geometry", "type": "object"},
"properties": {"path": "$.properties", "type": "object"},
},
}
EARTH_BOUNDARY_DEFAULT_SOURCES: dict[str, dict[str, Any]] = {
"earth_admin0_boundaries": {
"endpoint": "https://raw.githubusercontent.com/nvkelso/natural-earth-vector/master/geojson/ne_10m_admin_0_countries.geojson",
"source_kind": "admin0-boundaries",
"license": "Natural Earth public domain",
},
"earth_coastline": {
"endpoint": "https://raw.githubusercontent.com/nvkelso/natural-earth-vector/master/geojson/ne_10m_coastline.geojson",
"source_kind": "coastline",
"license": "Natural Earth public domain",
},
"earth_claim_lines": {
"endpoint": "https://www.arcgis.com/sharing/rest/content/items/faaa1908c3ab43f0823c6fde9f18389c/data",
"source_kind": "claim-lines",
"license": "CC BY 4.0; source item owner mapmakersami",
},
}
def default_earth_boundary_config(name: str) -> dict[str, Any]:
source = EARTH_BOUNDARY_DEFAULT_SOURCES.get(name)
if not source:
return {}
return {
"method": "GET",
"timeout": 120,
"retry": 3,
"target_schema": "earth_boundary_source",
"license": source["license"],
"mapping_json": EARTH_BOUNDARY_SOURCE_MAPPING,
}

View File

@@ -47,18 +47,6 @@ class GenericRecord(BaseModel):
return value
class EarthBoundarySourceRecord(BaseModel):
source_id: str | None = None
source_kind: str = Field(pattern="^(admin0-boundaries|coastline|claim-lines)$")
name: str | None = None
geometry: dict[str, Any] | None = None
properties: dict[str, Any] = Field(default_factory=dict)
artifact_path: str | None = None
sha256: str | None = None
feature_count: int | None = Field(default=None, ge=0)
license: str | None = None
@dataclass(frozen=True)
class TargetField:
name: str
@@ -155,24 +143,6 @@ TARGET_SCHEMAS: dict[str, TargetSchema] = {
TargetField("observed_at", "datetime", False, "观测时间", "2026-04-28T00:00:00Z"),
),
),
"earth_boundary_source": TargetSchema(
key="earth_boundary_source",
label="Earth 边界矢量源",
description="Admin-0 国界、海岸线、主张线等 Earth 边界源数据 artifact。",
destination="collected_data",
model=EarthBoundarySourceRecord,
fields=(
TargetField("source_id", "string", False, "来源侧 ID", "feature-1"),
TargetField("source_kind", "string", True, "边界源类型", "admin0-boundaries"),
TargetField("name", "string", False, "记录名称", "China"),
TargetField("geometry", "object", False, "GeoJSON geometry", {"type": "Polygon", "coordinates": []}),
TargetField("properties", "object", False, "GeoJSON properties", {"ISO_A3": "CHN"}),
TargetField("artifact_path", "string", False, "完整源数据本地 artifact 路径", "data/earth-boundary-sources/earth_admin0_boundaries/abc.geojson"),
TargetField("sha256", "string", False, "源数据 artifact SHA-256", "abc123"),
TargetField("feature_count", "integer", False, "源数据 feature 数", 1),
TargetField("license", "string", False, "源数据许可", "ODbL"),
),
),
}