pyastroweatherio 0.76.0.dev6__tar.gz → 0.76.0.dev8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/PKG-INFO +1 -1
- {pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/pyastroweatherio/client.py +18 -4
- {pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/pyastroweatherio/dataclasses.py +2 -0
- {pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/pyastroweatherio.egg-info/PKG-INFO +1 -1
- {pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/setup.py +1 -1
- {pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/LICENSE +0 -0
- {pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/README.md +0 -0
- {pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/pyastroweatherio/__init__.py +0 -0
- {pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/pyastroweatherio/const.py +0 -0
- {pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/pyastroweatherio/errors.py +0 -0
- {pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/pyastroweatherio/helper_functions.py +0 -0
- {pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/pyastroweatherio.egg-info/SOURCES.txt +0 -0
- {pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/pyastroweatherio.egg-info/dependency_links.txt +0 -0
- {pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/pyastroweatherio.egg-info/requires.txt +0 -0
- {pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/pyastroweatherio.egg-info/top_level.txt +0 -0
- {pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/setup.cfg +0 -0
- {pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/tests/test_calculations.py +0 -0
- {pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/tests/test_client.py +0 -0
|
@@ -140,6 +140,9 @@ class AstroWeather:
|
|
|
140
140
|
# Weather data
|
|
141
141
|
self._weather_df = None
|
|
142
142
|
|
|
143
|
+
# Whether GFS supplementary data was available in the last update
|
|
144
|
+
self._has_gfs_data: bool = False
|
|
145
|
+
|
|
143
146
|
# Forecast data
|
|
144
147
|
self._forecast_data = None
|
|
145
148
|
|
|
@@ -347,9 +350,11 @@ class AstroWeather:
|
|
|
347
350
|
# Merge GFS supplementary data (lifted_index, cape, boundary_layer_height, visibility)
|
|
348
351
|
if weather_df_gfs is not None:
|
|
349
352
|
self._weather_df = self._weather_df.merge(weather_df_gfs, on="time", how="left")
|
|
353
|
+
self._has_gfs_data = True
|
|
350
354
|
else:
|
|
351
355
|
for col in ("gfs_lifted_index", "gfs_cape", "gfs_boundary_layer_height", "gfs_visibility"):
|
|
352
356
|
self._weather_df[col] = float("nan")
|
|
357
|
+
self._has_gfs_data = False
|
|
353
358
|
|
|
354
359
|
# Merge CAMS AOD data (aerosol optical depth)
|
|
355
360
|
if weather_df_aod is not None:
|
|
@@ -618,18 +623,26 @@ class AstroWeather:
|
|
|
618
623
|
return True
|
|
619
624
|
|
|
620
625
|
def _test_weather_df(self) -> None:
|
|
621
|
-
#
|
|
626
|
+
# Optional columns are intentionally NaN when their source fetch failed.
|
|
627
|
+
# Warn about those once at fetch time; suppress per-cell noise here.
|
|
628
|
+
_OPTIONAL_COLUMNS = {
|
|
629
|
+
"gfs_lifted_index",
|
|
630
|
+
"gfs_cape",
|
|
631
|
+
"gfs_boundary_layer_height",
|
|
632
|
+
"gfs_visibility",
|
|
633
|
+
"aerosol_optical_depth",
|
|
634
|
+
}
|
|
635
|
+
|
|
622
636
|
nan_locations = self._weather_df.isna()
|
|
623
637
|
|
|
624
|
-
|
|
638
|
+
core_cols = [c for c in nan_locations.columns if c not in _OPTIONAL_COLUMNS]
|
|
625
639
|
result = [
|
|
626
640
|
(index, col)
|
|
627
|
-
for col in
|
|
641
|
+
for col in core_cols
|
|
628
642
|
for index in nan_locations.index
|
|
629
643
|
if nan_locations.at[index, col]
|
|
630
644
|
]
|
|
631
645
|
|
|
632
|
-
# Print results
|
|
633
646
|
if result:
|
|
634
647
|
_LOGGER.warning("NaN in main dataframe found at:")
|
|
635
648
|
for index, col in result:
|
|
@@ -700,6 +713,7 @@ class AstroWeather:
|
|
|
700
713
|
"night_duration_astronomical": await self._astro_routines.night_duration_astronomical(),
|
|
701
714
|
"deepsky_forecast": await self._get_deepsky_forecast(),
|
|
702
715
|
"condition_data": await self._get_condition(now),
|
|
716
|
+
"gfs_supplementary_data": self._has_gfs_data,
|
|
703
717
|
# Uptonight objects
|
|
704
718
|
"uptonight": await self._get_deepsky_objects(),
|
|
705
719
|
"uptonight_bodies": await self._get_bodies(),
|
{pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/pyastroweatherio/dataclasses.py
RENAMED
|
@@ -475,6 +475,7 @@ class LocationDataModel(TypedDict):
|
|
|
475
475
|
night_duration_astronomical: float
|
|
476
476
|
deepsky_forecast: list
|
|
477
477
|
condition_data: ConditionData
|
|
478
|
+
gfs_supplementary_data: bool
|
|
478
479
|
uptonight: list
|
|
479
480
|
uptonight_bodies: list
|
|
480
481
|
uptonight_comets: list
|
|
@@ -495,6 +496,7 @@ class LocationData:
|
|
|
495
496
|
self.night_duration_astronomical = data["night_duration_astronomical"]
|
|
496
497
|
self.deepsky_forecast = data["deepsky_forecast"]
|
|
497
498
|
self.condition_data = data["condition_data"]
|
|
499
|
+
self.gfs_supplementary_data = data["gfs_supplementary_data"]
|
|
498
500
|
self._uptonight = data["uptonight"]
|
|
499
501
|
self._uptonight_bodies = data["uptonight_bodies"]
|
|
500
502
|
self._uptonight_comets = data["uptonight_comets"]
|
|
@@ -11,7 +11,7 @@ if os.path.isfile(requirement_path):
|
|
|
11
11
|
setup(
|
|
12
12
|
name="pyastroweatherio",
|
|
13
13
|
packages=["pyastroweatherio"],
|
|
14
|
-
version="0.76.0.
|
|
14
|
+
version="0.76.0.dev8",
|
|
15
15
|
license="MIT",
|
|
16
16
|
description="Python Wrapper for OpenMeteo and Met.no REST API",
|
|
17
17
|
long_description=" ".join(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/pyastroweatherio/helper_functions.py
RENAMED
|
File without changes
|
{pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/pyastroweatherio.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{pyastroweatherio-0.76.0.dev6 → pyastroweatherio-0.76.0.dev8}/pyastroweatherio.egg-info/requires.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|