Skip to content

Commit

Permalink
[uss_qualifier/tested_requirements] Add other participants to tested_…
Browse files Browse the repository at this point in the history
…requirements summary (#242)

Add other participants to tested_requirements summary
  • Loading branch information
BenjaminPelletier authored Oct 12, 2023
1 parent 7dc6b9f commit bb082c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ <h2>Test run</h2>
<td>Participant</td>
<td>{{ participant_id }}</td>
</tr>
<tr>
<td>Other participants</td>
<td>{{ other_participants }}</td>
</tr>
<tr>
<td>Test run identifier</td>
<td>TR-{{ test_run.test_run_id[0:7] }}</td>
Expand Down
7 changes: 6 additions & 1 deletion monitoring/uss_qualifier/reports/tested_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ def generate_tested_requirements(
os.makedirs(config.output_path, exist_ok=True)
index_file = os.path.join(config.output_path, "index.html")

participant_ids = report.report.participant_ids()
participant_ids = list(report.report.participant_ids())
participant_ids.sort()
template = jinja_env.get_template("tested_requirements/test_run_report.html")
with open(index_file, "w") as f:
f.write(template.render(participant_ids=participant_ids))
Expand All @@ -235,10 +236,14 @@ def generate_tested_requirements(
)
_sort_breakdown(participant_breakdown)
participant_file = os.path.join(config.output_path, f"{participant_id}.html")
other_participants = ", ".join(
p for p in participant_ids if p != participant_id
)
with open(participant_file, "w") as f:
f.write(
template.render(
participant_id=participant_id,
other_participants=other_participants,
breakdown=participant_breakdown,
test_run=_compute_test_run_information(report),
)
Expand Down

0 comments on commit bb082c3

Please sign in to comment.