完成 lau fau shan → shenzhen 全量重命名,前端库和文档同步更新
This commit is contained in:
@@ -21,7 +21,6 @@ const CITY_REGION_FALLBACK: Record<string, TradingRegionKey> = {
|
|||||||
chongqing: "east_asia",
|
chongqing: "east_asia",
|
||||||
guangzhou: "east_asia",
|
guangzhou: "east_asia",
|
||||||
"hong kong": "east_asia",
|
"hong kong": "east_asia",
|
||||||
"lau fau shan": "east_asia",
|
|
||||||
qingdao: "east_asia",
|
qingdao: "east_asia",
|
||||||
seoul: "east_asia",
|
seoul: "east_asia",
|
||||||
shanghai: "east_asia",
|
shanghai: "east_asia",
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ const CITY_MARKER_DISPLAY_OFFSETS: Record<
|
|||||||
// Shek Kong sits between the Hong Kong and Shenzhen cards and gets visually buried
|
// Shek Kong sits between the Hong Kong and Shenzhen cards and gets visually buried
|
||||||
// by their wide marker bubbles. Shift only the rendered marker, not the true point.
|
// by their wide marker bubbles. Shift only the rendered marker, not the true point.
|
||||||
"shek kong": { x: 34, y: -26, zIndexOffset: 320 },
|
"shek kong": { x: 34, y: -26, zIndexOffset: 320 },
|
||||||
"lau fau shan": { x: -40, y: 14, zIndexOffset: 300 },
|
"shenzhen": { x: -40, y: 14, zIndexOffset: 300 },
|
||||||
};
|
};
|
||||||
|
|
||||||
function getMarkerDisplayOffset(cityName: string) {
|
function getMarkerDisplayOffset(cityName: string) {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const CITY_NAME_ZH: Record<string, string> = {
|
|||||||
Jakarta: "雅加达",
|
Jakarta: "雅加达",
|
||||||
Jeddah: "吉达",
|
Jeddah: "吉达",
|
||||||
Karachi: "卡拉奇",
|
Karachi: "卡拉奇",
|
||||||
"Lau Fau Shan": "流浮山",
|
"shenzhen": "深圳流浮山",
|
||||||
London: "伦敦",
|
London: "伦敦",
|
||||||
Lucknow: "勒克瑙",
|
Lucknow: "勒克瑙",
|
||||||
Madrid: "马德里",
|
Madrid: "马德里",
|
||||||
@@ -77,7 +77,7 @@ const AIRPORT_NAME_ZH: Record<string, string> = {
|
|||||||
Jakarta: "苏加诺-哈达国际机场",
|
Jakarta: "苏加诺-哈达国际机场",
|
||||||
Jeddah: "阿卜杜勒-阿齐兹国王国际机场",
|
Jeddah: "阿卜杜勒-阿齐兹国王国际机场",
|
||||||
Karachi: "真纳国际机场",
|
Karachi: "真纳国际机场",
|
||||||
"Lau Fau Shan": "流浮山监测站",
|
"shenzhen": "深圳流浮山监测站",
|
||||||
London: "希思罗机场",
|
London: "希思罗机场",
|
||||||
Lucknow: "乔杜里·查兰·辛格国际机场",
|
Lucknow: "乔杜里·查兰·辛格国际机场",
|
||||||
Madrid: "马德里-巴拉哈斯机场",
|
Madrid: "马德里-巴拉哈斯机场",
|
||||||
@@ -107,7 +107,7 @@ const AIRPORT_NAME_ZH: Record<string, string> = {
|
|||||||
|
|
||||||
const AIRPORT_NAME_EN: Record<string, string> = {
|
const AIRPORT_NAME_EN: Record<string, string> = {
|
||||||
"Hong Kong": "Hong Kong Observatory HQ",
|
"Hong Kong": "Hong Kong Observatory HQ",
|
||||||
"Lau Fau Shan": "Lau Fau Shan Monitoring Station",
|
"shenzhen": "shenzhen Monitoring Station",
|
||||||
};
|
};
|
||||||
|
|
||||||
function normalizeCityKey(value: string | null | undefined) {
|
function normalizeCityKey(value: string | null | undefined) {
|
||||||
|
|||||||
@@ -76,19 +76,19 @@ const CITY_SPECIFIC_SOURCES: Record<string, OfficialSourceLink[]> = {
|
|||||||
kind: "metar",
|
kind: "metar",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "流浮山站(HKO)",
|
label: "深圳流浮山站(HKO)",
|
||||||
href: "https://www.hko.gov.hk/sc/wxinfo/ts/index.htm",
|
href: "https://www.hko.gov.hk/sc/wxinfo/ts/index.htm",
|
||||||
kind: "agency",
|
kind: "agency",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"lau fau shan": [
|
"shenzhen": [
|
||||||
{
|
{
|
||||||
label: "香港天文台",
|
label: "香港天文台",
|
||||||
href: "https://www.hko.gov.hk/en/index.html",
|
href: "https://www.hko.gov.hk/en/index.html",
|
||||||
kind: "agency",
|
kind: "agency",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "流浮山站(HKO)",
|
label: "深圳流浮山站(HKO)",
|
||||||
href: "https://www.hko.gov.hk/sc/wxinfo/ts/index.htm",
|
href: "https://www.hko.gov.hk/sc/wxinfo/ts/index.htm",
|
||||||
kind: "airport",
|
kind: "airport",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export function getObservationSourceCode(detail: CityDetail): string {
|
|||||||
if (
|
if (
|
||||||
city === "hong kong" ||
|
city === "hong kong" ||
|
||||||
city === "shek kong" ||
|
city === "shek kong" ||
|
||||||
city === "lau fau shan"
|
city === "shenzhen"
|
||||||
) {
|
) {
|
||||||
return "hko";
|
return "hko";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ const CITY_REGION_FALLBACK: Record<string, MarketRegionKey> = {
|
|||||||
seoul: "asia_pacific",
|
seoul: "asia_pacific",
|
||||||
busan: "asia_pacific",
|
busan: "asia_pacific",
|
||||||
"hong kong": "asia_pacific",
|
"hong kong": "asia_pacific",
|
||||||
"lau fau shan": "asia_pacific",
|
"shenzhen": "asia_pacific",
|
||||||
taipei: "asia_pacific",
|
taipei: "asia_pacific",
|
||||||
shanghai: "asia_pacific",
|
shanghai: "asia_pacific",
|
||||||
singapore: "asia_pacific",
|
singapore: "asia_pacific",
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ class StartupCoordinator:
|
|||||||
"istanbul",
|
"istanbul",
|
||||||
"paris",
|
"paris",
|
||||||
"hong kong",
|
"hong kong",
|
||||||
"lau fau shan",
|
"shenzhen",
|
||||||
"taipei",
|
"taipei",
|
||||||
],
|
],
|
||||||
"chat_targets": len(chat_ids),
|
"chat_targets": len(chat_ids),
|
||||||
|
|||||||
@@ -134,8 +134,8 @@ CITY_REGISTRY = {
|
|||||||
"distance_km": 2.0,
|
"distance_km": 2.0,
|
||||||
"warning": "海风与地形共同作用,午后对流触发后温度回落可能偏快。",
|
"warning": "海风与地形共同作用,午后对流触发后温度回落可能偏快。",
|
||||||
},
|
},
|
||||||
"lau fau shan": {
|
"shenzhen": {
|
||||||
"name": "Lau Fau Shan",
|
"name": "Shenzhen",
|
||||||
"lat": 22.4686,
|
"lat": 22.4686,
|
||||||
"lon": 113.9970,
|
"lon": 113.9970,
|
||||||
"icao": "LFS",
|
"icao": "LFS",
|
||||||
@@ -146,12 +146,12 @@ CITY_REGISTRY = {
|
|||||||
"disable_aviationweather": True,
|
"disable_aviationweather": True,
|
||||||
"tz_offset": 28800,
|
"tz_offset": 28800,
|
||||||
"use_fahrenheit": False,
|
"use_fahrenheit": False,
|
||||||
"is_major": False,
|
"is_major": True,
|
||||||
"risk_level": "medium",
|
"risk_level": "medium",
|
||||||
"risk_emoji": "🟡",
|
"risk_emoji": "🟡",
|
||||||
"airport_name": "流浮山站",
|
"airport_name": "流浮山天文台站",
|
||||||
"distance_km": 0.0,
|
"distance_km": 0.0,
|
||||||
"warning": "HKO 结算取流浮山站分钟级观测;该站不是机场 METAR,不能与 VHHH/VHSK 报文混用。",
|
"warning": "香港天文台流浮山站分钟级观测,Polymarket 深圳温度市场结算源;非机场 METAR,不可与 ZGSZ/VHHH 报文混用。",
|
||||||
},
|
},
|
||||||
"taipei": {
|
"taipei": {
|
||||||
"name": "Taipei",
|
"name": "Taipei",
|
||||||
@@ -665,24 +665,6 @@ CITY_REGISTRY = {
|
|||||||
"distance_km": 19.0,
|
"distance_km": 19.0,
|
||||||
"warning": "四大火炉之一,夏季持续高温,夜间温度偏高,湿度大。",
|
"warning": "四大火炉之一,夏季持续高温,夜间温度偏高,湿度大。",
|
||||||
},
|
},
|
||||||
"shenzhen": {
|
|
||||||
"name": "Shenzhen",
|
|
||||||
"lat": 22.6393,
|
|
||||||
"lon": 113.8107,
|
|
||||||
"icao": "ZGSZ",
|
|
||||||
"settlement_source": "wunderground",
|
|
||||||
"settlement_station_code": "ZGSZ",
|
|
||||||
"settlement_station_label": "Shenzhen Bao'an International Airport Station",
|
|
||||||
"settlement_url": "https://www.wunderground.com/history/daily/cn/shenzhen/ZGSZ",
|
|
||||||
"tz_offset": 28800,
|
|
||||||
"use_fahrenheit": False,
|
|
||||||
"is_major": True,
|
|
||||||
"risk_level": "medium",
|
|
||||||
"risk_emoji": "🟡",
|
|
||||||
"airport_name": "深圳宝安国际机场",
|
|
||||||
"distance_km": 32.0,
|
|
||||||
"warning": "市场现按 Wunderground 深圳宝安国际机场站整度°C口径结算;以历史页当日最终完成后的最高整度摄氏值为准。",
|
|
||||||
},
|
|
||||||
"guangzhou": {
|
"guangzhou": {
|
||||||
"name": "Guangzhou",
|
"name": "Guangzhou",
|
||||||
"lat": 23.3924,
|
"lat": 23.3924,
|
||||||
@@ -816,7 +798,7 @@ ALIASES = {
|
|||||||
"dal": "dallas", "mia": "miami", "atl": "atlanta",
|
"dal": "dallas", "mia": "miami", "atl": "atlanta",
|
||||||
"sea": "seattle", "tor": "toronto", "sel": "seoul",
|
"sea": "seattle", "tor": "toronto", "sel": "seoul",
|
||||||
"seo": "seoul", "hkg": "hong kong", "hk": "hong kong",
|
"seo": "seoul", "hkg": "hong kong", "hk": "hong kong",
|
||||||
"lfs": "lau fau shan", "laufaushan": "lau fau shan",
|
"lfs": "shenzhen", "laufaushan": "shenzhen", "lau fau shan": "shenzhen",
|
||||||
"tpe": "taipei", "tp": "taipei", "taipei": "taipei",
|
"tpe": "taipei", "tp": "taipei", "taipei": "taipei",
|
||||||
"pus": "busan", "bus": "busan", "rkpk": "busan",
|
"pus": "busan", "bus": "busan", "rkpk": "busan",
|
||||||
"sha": "shanghai", "sh": "shanghai", "sin": "singapore",
|
"sha": "shanghai", "sh": "shanghai", "sin": "singapore",
|
||||||
@@ -858,7 +840,7 @@ ALIASES = {
|
|||||||
"多伦多": "toronto",
|
"多伦多": "toronto",
|
||||||
"首尔": "seoul",
|
"首尔": "seoul",
|
||||||
"香港": "hong kong",
|
"香港": "hong kong",
|
||||||
"流浮山": "lau fau shan",
|
"流浮山": "shenzhen",
|
||||||
"台北": "taipei",
|
"台北": "taipei",
|
||||||
"臺北": "taipei",
|
"臺北": "taipei",
|
||||||
"釜山": "busan",
|
"釜山": "busan",
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ CITY_TIME_ZONES = {
|
|||||||
"jeddah": "Asia/Riyadh",
|
"jeddah": "Asia/Riyadh",
|
||||||
"karachi": "Asia/Karachi",
|
"karachi": "Asia/Karachi",
|
||||||
"kuala lumpur": "Asia/Kuala_Lumpur",
|
"kuala lumpur": "Asia/Kuala_Lumpur",
|
||||||
"lau fau shan": "Asia/Hong_Kong",
|
"shenzhen": "Asia/Hong_Kong",
|
||||||
"london": "Europe/London",
|
"london": "Europe/London",
|
||||||
"los angeles": "America/Los_Angeles",
|
"los angeles": "America/Los_Angeles",
|
||||||
"lucknow": "Asia/Kolkata",
|
"lucknow": "Asia/Kolkata",
|
||||||
@@ -54,7 +54,6 @@ CITY_TIME_ZONES = {
|
|||||||
"seattle": "America/Los_Angeles",
|
"seattle": "America/Los_Angeles",
|
||||||
"seoul": "Asia/Seoul",
|
"seoul": "Asia/Seoul",
|
||||||
"shanghai": "Asia/Shanghai",
|
"shanghai": "Asia/Shanghai",
|
||||||
"shenzhen": "Asia/Shanghai",
|
|
||||||
"singapore": "Asia/Singapore",
|
"singapore": "Asia/Singapore",
|
||||||
"taipei": "Asia/Taipei",
|
"taipei": "Asia/Taipei",
|
||||||
"tel aviv": "Asia/Jerusalem",
|
"tel aviv": "Asia/Jerusalem",
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ CHINA_CMA_CITIES = {
|
|||||||
"guangzhou",
|
"guangzhou",
|
||||||
"qingdao",
|
"qingdao",
|
||||||
"shanghai",
|
"shanghai",
|
||||||
"shenzhen",
|
|
||||||
"wuhan",
|
"wuhan",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,10 +25,10 @@ HKO_STATIONS = {
|
|||||||
"icao": "HKO",
|
"icao": "HKO",
|
||||||
"label": "HK Observatory 1min (HKO)",
|
"label": "HK Observatory 1min (HKO)",
|
||||||
},
|
},
|
||||||
"lau fau shan": {
|
"shenzhen": {
|
||||||
"code": "Lau Fau Shan",
|
"code": "Shenzhen (LFS)",
|
||||||
"icao": "LFS",
|
"icao": "LFS",
|
||||||
"label": "Lau Fau Shan 1min (HKO)",
|
"label": "流浮山天文台 1min (HKO)",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,9 +84,6 @@ def _normalize_city_key(city: Any) -> str:
|
|||||||
|
|
||||||
|
|
||||||
MARKET_CITY_ALIASES: Dict[str, str] = {
|
MARKET_CITY_ALIASES: Dict[str, str] = {
|
||||||
# Lau Fau Shan has its own HKO observation / settlement layer, but
|
|
||||||
# Polymarket lists this temperature market under nearby Shenzhen.
|
|
||||||
"lau fau shan": "shenzhen",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MARKET_CITY_SLUG_ALIASES: Dict[str, str] = {
|
MARKET_CITY_SLUG_ALIASES: Dict[str, str] = {
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ class WeatherDataCollector(OpenMeteoCacheMixin, SettlementSourceMixin, MetarSour
|
|||||||
"chongqing": ["ZUCK", "ZUPS"],
|
"chongqing": ["ZUCK", "ZUPS"],
|
||||||
"guangzhou": ["ZGGG", "ZGSZ"],
|
"guangzhou": ["ZGGG", "ZGSZ"],
|
||||||
"qingdao": ["ZSQD"],
|
"qingdao": ["ZSQD"],
|
||||||
"shenzhen": ["ZGSZ", "ZGGG"],
|
|
||||||
"beijing": ["ZBAA", "ZBAD"],
|
"beijing": ["ZBAA", "ZBAD"],
|
||||||
"wuhan": ["ZHHH", "ZHES"],
|
"wuhan": ["ZHHH", "ZHES"],
|
||||||
"shanghai": ["ZSPD", "ZSSS", "ZSNB", "ZSHC"],
|
"shanghai": ["ZSPD", "ZSSS", "ZSNB", "ZSHC"],
|
||||||
@@ -657,9 +656,9 @@ class WeatherDataCollector(OpenMeteoCacheMixin, SettlementSourceMixin, MetarSour
|
|||||||
"vhsk": "Shek Kong",
|
"vhsk": "Shek Kong",
|
||||||
"石岗": "Shek Kong",
|
"石岗": "Shek Kong",
|
||||||
"石崗": "Shek Kong",
|
"石崗": "Shek Kong",
|
||||||
"lau fau shan": "Lau Fau Shan",
|
"shenzhen": "shenzhen",
|
||||||
"lfs": "Lau Fau Shan",
|
"lfs": "shenzhen",
|
||||||
"流浮山": "Lau Fau Shan",
|
"深圳流浮山": "shenzhen",
|
||||||
"taipei": "Taipei",
|
"taipei": "Taipei",
|
||||||
"台北": "Taipei",
|
"台北": "Taipei",
|
||||||
"臺北": "Taipei",
|
"臺北": "Taipei",
|
||||||
@@ -667,8 +666,6 @@ class WeatherDataCollector(OpenMeteoCacheMixin, SettlementSourceMixin, MetarSour
|
|||||||
"成都": "Chengdu",
|
"成都": "Chengdu",
|
||||||
"chongqing": "Chongqing",
|
"chongqing": "Chongqing",
|
||||||
"重庆": "Chongqing",
|
"重庆": "Chongqing",
|
||||||
"shenzhen": "Shenzhen",
|
|
||||||
"深圳": "Shenzhen",
|
|
||||||
"qingdao": "Qingdao",
|
"qingdao": "Qingdao",
|
||||||
"青岛": "Qingdao",
|
"青岛": "Qingdao",
|
||||||
"青島": "Qingdao",
|
"青島": "Qingdao",
|
||||||
@@ -846,7 +843,7 @@ class WeatherDataCollector(OpenMeteoCacheMixin, SettlementSourceMixin, MetarSour
|
|||||||
def _supports_aviationweather(self, city_lower: str) -> bool:
|
def _supports_aviationweather(self, city_lower: str) -> bool:
|
||||||
city_meta = self.CITY_REGISTRY.get(str(city_lower or "").strip().lower(), {}) or {}
|
city_meta = self.CITY_REGISTRY.get(str(city_lower or "").strip().lower(), {}) or {}
|
||||||
settlement_source = str(city_meta.get("settlement_source") or "").strip().lower()
|
settlement_source = str(city_meta.get("settlement_source") or "").strip().lower()
|
||||||
# HKO-settled Hong Kong cities (Hong Kong, Lau Fau Shan, future HKO stations)
|
# HKO-settled Hong Kong cities (Hong Kong, shenzhen, future HKO stations)
|
||||||
# are official observatory stations, not airport/METAR contracts. Do not fetch
|
# are official observatory stations, not airport/METAR contracts. Do not fetch
|
||||||
# AviationWeather for their city cards; Shenzhen remains ZGSZ/Bao'an METAR-backed.
|
# AviationWeather for their city cards; Shenzhen remains ZGSZ/Bao'an METAR-backed.
|
||||||
if settlement_source == "hko":
|
if settlement_source == "hko":
|
||||||
@@ -1085,7 +1082,7 @@ class WeatherDataCollector(OpenMeteoCacheMixin, SettlementSourceMixin, MetarSour
|
|||||||
def _attach_hko_obs_official_nearby(
|
def _attach_hko_obs_official_nearby(
|
||||||
self, results: Dict, city_lower: str, use_fahrenheit: bool
|
self, results: Dict, city_lower: str, use_fahrenheit: bool
|
||||||
) -> None:
|
) -> None:
|
||||||
if city_lower not in ("hong kong", "lau fau shan"):
|
if city_lower not in ("hong kong", "shenzhen"):
|
||||||
return
|
return
|
||||||
rows = self.fetch_hko_obs_official_nearby(
|
rows = self.fetch_hko_obs_official_nearby(
|
||||||
city_lower, use_fahrenheit=use_fahrenheit
|
city_lower, use_fahrenheit=use_fahrenheit
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ HIGH_FREQ_AIRPORT_ANALYSIS_CITIES = {
|
|||||||
"istanbul",
|
"istanbul",
|
||||||
"paris",
|
"paris",
|
||||||
"hong kong",
|
"hong kong",
|
||||||
"lau fau shan",
|
"shenzhen",
|
||||||
"taipei",
|
"taipei",
|
||||||
"beijing",
|
"beijing",
|
||||||
"shanghai",
|
"shanghai",
|
||||||
|
|||||||
@@ -91,13 +91,13 @@ SCAN_TERMINAL_PAYLOAD_TTL_SEC = max(
|
|||||||
)
|
)
|
||||||
SCAN_TERMINAL_BUILD_TIMEOUT_SEC = max(
|
SCAN_TERMINAL_BUILD_TIMEOUT_SEC = max(
|
||||||
8,
|
8,
|
||||||
int(os.getenv("POLYWEATHER_SCAN_TERMINAL_BUILD_TIMEOUT_SEC", "22")),
|
int(os.getenv("POLYWEATHER_SCAN_TERMINAL_BUILD_TIMEOUT_SEC", "60")),
|
||||||
)
|
)
|
||||||
SCAN_TERMINAL_MAX_WORKERS = _env_int(
|
SCAN_TERMINAL_MAX_WORKERS = _env_int(
|
||||||
"POLYWEATHER_SCAN_TERMINAL_MAX_WORKERS",
|
"POLYWEATHER_SCAN_TERMINAL_MAX_WORKERS",
|
||||||
2,
|
6,
|
||||||
min_value=1,
|
min_value=1,
|
||||||
max_value=4,
|
max_value=8,
|
||||||
)
|
)
|
||||||
DEFAULT_SCAN_AI_MODEL = "mimo-v2.5-pro"
|
DEFAULT_SCAN_AI_MODEL = "mimo-v2.5-pro"
|
||||||
DEFAULT_SCAN_AI_BASE_URL = "https://token-plan-cn.xiaomimimo.com/v1"
|
DEFAULT_SCAN_AI_BASE_URL = "https://token-plan-cn.xiaomimimo.com/v1"
|
||||||
|
|||||||
Reference in New Issue
Block a user