From d88d882ce6549bf347429d6ecf9103f14a79ec2a Mon Sep 17 00:00:00 2001 From: vsoch Date: Thu, 5 Oct 2023 14:53:52 -0600 Subject: [PATCH] ensure lammps parsing includes row names Signed-off-by: vsoch --- sdk/python/v1alpha2/CHANGELOG.md | 1 + sdk/python/v1alpha2/metricsoperator/metrics/app/lammps.py | 5 +++-- sdk/python/v1alpha2/setup.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sdk/python/v1alpha2/CHANGELOG.md b/sdk/python/v1alpha2/CHANGELOG.md index 933b1d1..7a62256 100644 --- a/sdk/python/v1alpha2/CHANGELOG.md +++ b/sdk/python/v1alpha2/CHANGELOG.md @@ -14,6 +14,7 @@ and **Merged pull requests**. Critical items to know are: The versions coincide with releases on pip. Only major versions will be released as tags on Github. ## [0.0.x](https://github.com/converged-computing/metrics-operator/tree/main) (0.0.x) + - LAMMPS parsing should include row names for component names (0.1.1) - More specific parsing / control for OSU benchmarks (0.0.21) - Support for OSU benchmark parsing with timed wrappers (0.0.2) - Allow getting raw logs for any metric (without parser) (0.0.19) diff --git a/sdk/python/v1alpha2/metricsoperator/metrics/app/lammps.py b/sdk/python/v1alpha2/metricsoperator/metrics/app/lammps.py index bd72bcf..053917f 100644 --- a/sdk/python/v1alpha2/metricsoperator/metrics/app/lammps.py +++ b/sdk/python/v1alpha2/metricsoperator/metrics/app/lammps.py @@ -213,9 +213,10 @@ def parse_lammps(lines): line = lines.pop(0) while line and line.strip(): parts = [x.strip() for x in line.split("|")] - _, rest = parts[0], parts[1:] + rowtitle, rest = parts[0], parts[1:] + rest = [float(x) for x in rest if x] if rest: - matrix.append(rest) + matrix.append([rowtitle] + rest) if not lines: break line = lines.pop(0) diff --git a/sdk/python/v1alpha2/setup.py b/sdk/python/v1alpha2/setup.py index a2ccf37..8702733 100644 --- a/sdk/python/v1alpha2/setup.py +++ b/sdk/python/v1alpha2/setup.py @@ -30,7 +30,7 @@ if __name__ == "__main__": setup( name="metricsoperator", - version="0.1.0", + version="0.1.1", author="Vanessasaurus", author_email="vsoch@users.noreply.github.com", maintainer="Vanessasaurus",