mirror of
https://github.com/lynchaos/ashvale-station.git
synced 2026-09-12 12:47:49 +00:00
chore: enforce ruff config and fix lint findings
This commit is contained in:
@@ -30,7 +30,6 @@ Two jobs here, both familiar from soft-sensor work:
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import math
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Dict, Optional
|
||||
|
||||
|
||||
+8
-2
@@ -32,8 +32,14 @@ from typing import Dict, List, Tuple
|
||||
|
||||
import numpy as np
|
||||
|
||||
from .physics import (absolute_humidity, clear_sky_irradiance, dew_point,
|
||||
solar_position, vapour_pressure_deficit, wet_bulb)
|
||||
from .physics import (
|
||||
absolute_humidity,
|
||||
clear_sky_irradiance,
|
||||
dew_point,
|
||||
solar_position,
|
||||
vapour_pressure_deficit,
|
||||
wet_bulb,
|
||||
)
|
||||
|
||||
FEATURE_NAMES: List[str] = [
|
||||
"bias",
|
||||
|
||||
+1
-2
@@ -34,8 +34,7 @@ matters.
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import time
|
||||
from typing import Dict, List, Sequence, Tuple
|
||||
from typing import List, Sequence, Tuple
|
||||
|
||||
OFF = (0, 0, 0)
|
||||
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from .rls import RecursiveLeastSquares, AdaptiveConformal
|
||||
from .nowcast import NowcastEnsemble
|
||||
from .climatology import HarmonicClimatology
|
||||
from .precip import PrecipitationModel, zambretti
|
||||
from .anomaly import AnomalyMonitor
|
||||
from .climatology import HarmonicClimatology
|
||||
from .nowcast import NowcastEnsemble
|
||||
from .precip import PrecipitationModel, zambretti
|
||||
from .rls import AdaptiveConformal, RecursiveLeastSquares
|
||||
|
||||
__all__ = [
|
||||
"RecursiveLeastSquares", "AdaptiveConformal", "NowcastEnsemble",
|
||||
|
||||
@@ -141,9 +141,9 @@ class HarmonicClimatology:
|
||||
sigma0 = self.resid_std.get(target, 1.0)
|
||||
sigma = sigma0 * np.sqrt(1.0 + lead_h / 24.0)
|
||||
return [
|
||||
{"ts": float(t), "lead_h": float(l), "mu": float(m),
|
||||
{"ts": float(t), "lead_h": float(lh), "mu": float(m),
|
||||
"lo": float(m - 1.645 * s), "hi": float(m + 1.645 * s)}
|
||||
for t, l, m, s in zip(grid, lead_h, mu, sigma)
|
||||
for t, lh, m, s in zip(grid, lead_h, mu, sigma)
|
||||
]
|
||||
|
||||
def anomaly_now(self, target: str, ts: float, observed: float) -> float:
|
||||
|
||||
@@ -39,7 +39,7 @@ from __future__ import annotations
|
||||
|
||||
import math
|
||||
import time
|
||||
from typing import Dict, List, Optional, Tuple
|
||||
from typing import Dict, List, Optional
|
||||
|
||||
import numpy as np
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ same code to the Pi unchanged.
|
||||
from __future__ import annotations
|
||||
|
||||
import math
|
||||
import random
|
||||
import time
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
|
||||
+1
-2
@@ -34,7 +34,6 @@ from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import json
|
||||
import math
|
||||
import time
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, List, Optional
|
||||
@@ -44,7 +43,7 @@ import numpy as np
|
||||
from . import physics
|
||||
from .config import Config
|
||||
from .estimation import SignalTracker
|
||||
from .features import N_FEATURES, build_features
|
||||
from .features import build_features
|
||||
from .models.anomaly import AnomalyMonitor
|
||||
from .models.climatology import HarmonicClimatology
|
||||
from .models.nowcast import NowcastEnsemble
|
||||
|
||||
Reference in New Issue
Block a user