Skip to content

Commit 8cccc3c

Browse files
committed
feat(metrics): add conversion metrics collection
1 parent a70af48 commit 8cccc3c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/eopf_geozarr/metrics.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ class MetricsRecorder:
2222
)
2323
attempt: int = 1
2424
started_at: str = field(
25-
default_factory=lambda: datetime.now(timezone.utc)
26-
.isoformat()
27-
.replace("+00:00", "Z")
25+
default_factory=lambda: datetime.now(timezone.utc).isoformat().replace("+00:00", "Z")
2826
)
2927
steps: List[Dict[str, Any]] = field(default_factory=list)
3028
input_info: Dict[str, Any] = field(default_factory=dict)
@@ -60,8 +58,7 @@ def _get_version(pkg: str) -> Optional[str]:
6058
"python": sys.version.split()[0],
6159
"platform": platform.platform(),
6260
"packages": {
63-
"eopf_geozarr": _get_version("eopf-geozarr")
64-
or _get_version("eopf_geozarr"),
61+
"eopf_geozarr": _get_version("eopf-geozarr") or _get_version("eopf_geozarr"),
6562
"xarray": _get_version("xarray"),
6663
"zarr": _get_version("zarr"),
6764
"dask": _get_version("dask"),

0 commit comments

Comments
 (0)