Skip to content

Commit

Permalink
add git data
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane committed Oct 15, 2024
1 parent af727d4 commit 61cb964
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/longitudinal_maneuvers/generate_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def format_car_params(CP):
return pprint.pformat({k: v for k, v in CP.to_dict().items() if not k.endswith('DEPRECATED')}, indent=2)


def report(platform, route, _description, CP, maneuvers):
def report(platform, route, _description, CP, ID, maneuvers):
output_path = Path(__file__).resolve().parent / "longitudinal_reports"
output_fn = output_path / f"{platform}_{route.replace('/', '_')}.html"
output_path.mkdir(exist_ok=True)
Expand All @@ -29,6 +29,7 @@ def report(platform, route, _description, CP, maneuvers):
"<h1>Longitudinal maneuver report</h1>\n",
f"<h3>{platform}</h3>\n",
f"<h3>{route}</h3>\n"
f"<h3>{ID.gitCommit}, {ID.gitBranch}, {ID.gitRemote}</h3>\n"
]
if _description is not None:
builder.append(f"<h3>Description: {_description}</h3>\n")
Expand Down Expand Up @@ -158,6 +159,7 @@ def report(platform, route, _description, CP, maneuvers):
lr = LogReader([os.path.join(Paths.log_root(), seg, 'rlog') for seg in segs])

CP = lr.first('carParams')
ID = lr.first('initData')
platform = CP.carFingerprint
print('processing report for', platform)

Expand All @@ -179,4 +181,4 @@ def report(platform, route, _description, CP, maneuvers):
if active_prev:
maneuvers[-1][1][-1].append(msg)

report(platform, args.route, args.description, CP, maneuvers)
report(platform, args.route, args.description, CP, ID, maneuvers)

0 comments on commit 61cb964

Please sign in to comment.