Skip to content

Commit 7f56acf

Browse files
committed
[Graph] Some cleanup
1 parent 1776f9f commit 7f56acf

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

smtcomp/generate_graphics.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,17 @@ def create_output(
6464

6565
# Replace integer by names
6666
# It should be possible to do it later in altair; the html file would be smaller
67-
for lookup, replaced in [
68-
(defs.Answer, "answer"),
69-
(defs.Answer, "answer2"),
70-
(defs.Logic, "logic"),
71-
(defs.Division, "division"),
72-
]:
73-
lf_lookup = pl.DataFrame(
74-
data=((int(n), str(n)) for n in lookup), schema=[(replaced, pl.Int8), ("pretty", pl.String)]
75-
).lazy()
76-
results = results.join(lf_lookup, how="left", on=replaced).drop(replaced).rename({"pretty": replaced})
67+
if True:
68+
for lookup, replaced in [
69+
(defs.Answer, "answer"),
70+
(defs.Answer, "answer2"),
71+
(defs.Logic, "logic"),
72+
(defs.Division, "division"),
73+
]:
74+
lf_lookup = pl.DataFrame(
75+
data=((int(n), str(n)) for n in lookup), schema=[(replaced, pl.Int8), ("pretty", pl.String)]
76+
).lazy()
77+
results = results.join(lf_lookup, how="left", on=replaced).drop(replaced).rename({"pretty": replaced})
7778

7879
buckets = results.select(c_bucket.unique())
7980

smtcomp/main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,12 +1131,11 @@ def generate_certificates(
11311131
@app.command()
11321132
def generate_graphics(
11331133
data: Path,
1134-
output_dir: Path,
1134+
output: Path,
11351135
logic: list[defs.Logic] = [],
11361136
division: list[defs.Division] = [],
11371137
track: defs.Track = defs.Track.SingleQuery,
11381138
src: List[Path] = typer.Argument(None),
1139-
kind: smtcomp.scoring.Kind = typer.Argument(default="par"),
11401139
) -> None:
11411140
"""
11421141
Generate graphics in html format
@@ -1150,4 +1149,4 @@ def generate_graphics(
11501149

11511150
results = smtcomp.scoring.add_disagreements_info(results, track).filter(disagreements=False).drop("disagreements")
11521151

1153-
smtcomp_generate_graphics.create_output(config, results, output_dir / "test.html", logic, division)
1152+
smtcomp_generate_graphics.create_output(config, results, output, logic, division)

0 commit comments

Comments
 (0)