Spaces:
Sleeping
Sleeping
File size: 790 Bytes
536ba3d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | from __future__ import annotations
import asyncio
import sys
from pathlib import Path
import matplotlib
import pytest
matplotlib.use("Agg")
PROJECT_ROOT = Path(__file__).resolve().parents[1]
if str(PROJECT_ROOT) not in sys.path:
sys.path.insert(0, str(PROJECT_ROOT))
@pytest.fixture
def run_async():
def _run(coro):
return asyncio.run(coro)
return _run
@pytest.fixture
def sample_features():
return {
"battery_id": "B0005",
"cycle_number": 120,
"ambient_temperature": 24.0,
"peak_voltage": 4.19,
"min_voltage": 2.61,
"avg_current": 1.82,
"avg_temp": 24.0,
"temp_rise": 14.7,
"cycle_duration": 3690.0,
"Re": 0.045,
"Rct": 0.069,
"delta_capacity": -0.005,
}
|