3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-08-16 18:05:31 +00:00

Add jsonl status format

Replace `--statuscsv` and `--livecsv` with `--statusfmt <fmt>` and `--live <fmt` respectively.
Currently supports both csv and jsonl.
In the case of `--live`, updates can be printed in multiple formats, while `--statusfmt` only supports one at a time.
This commit is contained in:
Krystine Sherwin 2025-07-29 10:00:52 +12:00
parent ac120cee92
commit 3bf5be0637
No known key found for this signature in database
5 changed files with 36 additions and 33 deletions

View file

@ -913,7 +913,7 @@ class SbySummary:
class SbyTask(SbyConfig):
def __init__(self, sbyconfig, workdir, early_logs, reusedir, status_cancels=False, taskloop=None, logfile=None, name=None, live_csv=False):
def __init__(self, sbyconfig, workdir, early_logs, reusedir, status_cancels=False, taskloop=None, logfile=None, name=None, live_formats=[]):
super().__init__()
self.used_options = set()
self.models = dict()
@ -921,7 +921,7 @@ class SbyTask(SbyConfig):
self.reusedir = reusedir
self.status_cancels = status_cancels
self.name = name
self.live_csv = live_csv
self.live_formats = live_formats
self.status = "UNKNOWN"
self.total_time = 0
self.expect = list()
@ -1430,7 +1430,7 @@ class SbyTask(SbyConfig):
except FileNotFoundError:
status_path = f"{self.workdir}/status.sqlite"
self.status_db = SbyStatusDb(status_path, self, live_csv=self.live_csv)
self.status_db = SbyStatusDb(status_path, self, live_formats=self.live_formats)
def setup_procs(self, setupmode, linkmode=False):
self.handle_non_engine_options()