Merge parity/main into parity/T17-webapp
This commit is contained in:
@@ -15,13 +15,10 @@ from persistance.cluster import (
|
|||||||
ClusterVersionError,
|
ClusterVersionError,
|
||||||
Execution,
|
Execution,
|
||||||
ExecutionError,
|
ExecutionError,
|
||||||
Health,
|
|
||||||
Options,
|
|
||||||
Progress,
|
Progress,
|
||||||
Resolved,
|
Resolved,
|
||||||
Tasks,
|
Tasks,
|
||||||
Worker,
|
Worker,
|
||||||
health,
|
|
||||||
options,
|
options,
|
||||||
resolve,
|
resolve,
|
||||||
)
|
)
|
||||||
@@ -30,11 +27,8 @@ __all__ = [
|
|||||||
"ClusterVersionError",
|
"ClusterVersionError",
|
||||||
"Execution",
|
"Execution",
|
||||||
"ExecutionError",
|
"ExecutionError",
|
||||||
"Health",
|
|
||||||
"Options",
|
|
||||||
"Progress",
|
"Progress",
|
||||||
"Resolved",
|
"Resolved",
|
||||||
"health",
|
|
||||||
"map",
|
"map",
|
||||||
"options",
|
"options",
|
||||||
"resolve",
|
"resolve",
|
||||||
|
|||||||
@@ -587,9 +587,6 @@ class Ados2Association:
|
|||||||
return cls(d["level"], d["fitted"])
|
return cls(d["level"], d["fitted"])
|
||||||
|
|
||||||
|
|
||||||
MODULE = Ados2Association()
|
|
||||||
|
|
||||||
|
|
||||||
class Model(mlflow.pyfunc.PythonModel):
|
class Model(mlflow.pyfunc.PythonModel):
|
||||||
def __init__(self, fitted: dict):
|
def __init__(self, fitted: dict):
|
||||||
self.fitted = json.loads(json.dumps(fitted, default=float))
|
self.fitted = json.loads(json.dumps(fitted, default=float))
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ recording start minus `birth_date`. `analyze` never raises: a failure is an `Ana
|
|||||||
are None.
|
are None.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import math
|
|
||||||
import re
|
import re
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from datetime import date
|
from datetime import date
|
||||||
|
|
||||||
from models.tea.eeg import biomarkers, checks, preprocess, read, sleep
|
from models.tea.eeg import biomarkers, checks, preprocess, read, sleep
|
||||||
|
from models.tea.eeg.curves import _number
|
||||||
|
|
||||||
DAYS_PER_MONTH = 30.4375
|
DAYS_PER_MONTH = 30.4375
|
||||||
MAINS_HZ = 60.0
|
MAINS_HZ = 60.0
|
||||||
@@ -49,10 +49,6 @@ class Analysis:
|
|||||||
error: str | None
|
error: str | None
|
||||||
|
|
||||||
|
|
||||||
def _number(v) -> float | None:
|
|
||||||
return float(v) if v is not None and math.isfinite(v) else None
|
|
||||||
|
|
||||||
|
|
||||||
def _error(exc: Exception) -> str:
|
def _error(exc: Exception) -> str:
|
||||||
message = re.sub(r"(/|[A-Za-z]:\\)[^\s'\"]*", "<path>", str(exc))[:300]
|
message = re.sub(r"(/|[A-Za-z]:\\)[^\s'\"]*", "<path>", str(exc))[:300]
|
||||||
return f"{type(exc).__name__}: {message}"
|
return f"{type(exc).__name__}: {message}"
|
||||||
|
|||||||
@@ -48,10 +48,6 @@ class Validation:
|
|||||||
line_db: float
|
line_db: float
|
||||||
checks: list[dict] = field(default_factory=list)
|
checks: list[dict] = field(default_factory=list)
|
||||||
|
|
||||||
@property
|
|
||||||
def ears_usable(self) -> bool:
|
|
||||||
return all(ear not in self.bad for ear in ("A1", "A2"))
|
|
||||||
|
|
||||||
|
|
||||||
def check(
|
def check(
|
||||||
code,
|
code,
|
||||||
|
|||||||
Reference in New Issue
Block a user