times report: sort after groupby #432
style.yml
on: push
Run linters
10s
Check for License headers
7s
Annotations
7 errors and 1 warning
/home/runner/work/seal5/seal5/seal5/backends/report/times/writer.py#L109
stage_times_df = pd.DataFrame(stage_times).sort_values("start")
if args.pass_times:
pass_times_df = pd.DataFrame(pass_times).sort_values("start")
if args.sum_level:
- pass_times_df["pass"] = pass_times_df["pass"].apply(lambda x: ".".join(x.split(".")[:args.sum_level]))
+ pass_times_df["pass"] = pass_times_df["pass"].apply(lambda x: ".".join(x.split(".")[: args.sum_level]))
pass_times_df = pass_times_df.groupby("pass", as_index=False).agg({"start": "min", "end": "max"})
pass_times_df["time_s"] = pass_times_df["end"] - pass_times_df["start"]
pass_times_df.sort_values("start", inplace=True)
times_df = pd.concat([stage_times_df, pass_times_df])
else:
|
/home/runner/work/seal5/seal5/seal5/backends/report/status/writer.py#L191
data_["n_skipped"] = len(data_["skipped"])
del data_["skipped"]
data_["n_failed"] = len(data_["failed"])
del data_["failed"]
data_["n_total"] = data_["n_failed"] + data_["n_skipped"] + data_["n_success"]
+
def helper(success, skipped, failed):
if failed:
return "bad"
if skipped:
return "ok"
if success:
return "good"
return "unknown"
+
data_["status"] = helper(data_["n_success"], data_["n_skipped"], data_["n_failed"])
status_data.append(data_)
status_df = pd.DataFrame(status_data)
fmt = args.fmt
if fmt == "auto":
|
/home/runner/work/seal5/seal5/seal5/backends/report/test_results/writer.py#L293
for group, group_df in results_df.groupby(["model", "set", "xlen", "instr"], dropna=False):
n_tests = len(group_df)
counts = group_df["result"].value_counts()
n_pass = counts.get("PASS", 0)
n_fail = counts.get("FAIL", 0)
+
def helper(n_tests, n_pass, n_fail):
if n_fail:
return "bad"
if n_pass:
return "good"
|
seal5/backends/report/status/writer.py#L196
Expected 1 blank line before a nested definition, found 0 (E306)
|
seal5/backends/report/test_results/writer.py#L298
Expected 1 blank line before a nested definition, found 0 (E306)
|
seal5/model.py#L92
Line too long (131 > 120 characters) (E501)
|
seal5/model.py#L104
Line too long (132 > 120 characters) (E501)
|
Run linters
The following actions use a deprecated Node.js version and will be forced to run on node20: wearerequired/lint-action@v2. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|