Skip to content

Commit

Permalink
Merge pull request #658 from qiboteam/fix_report
Browse files Browse the repository at this point in the history
Fixing end-time and hrefs in report
  • Loading branch information
andrea-pasquale authored Dec 12, 2023
2 parents 0adacdf + 2b74dcc commit 5f10133
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 260 deletions.
13 changes: 6 additions & 7 deletions src/qibocal/cli/autocalibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,12 @@ def autocalibrate(runcard, folder, force, update):
for _ in executor.run(mode=ExecutionMode.autocalibration):
report = ReportBuilder(path, qubits, executor, meta, executor.history)
report.run(path)

e = datetime.datetime.now(datetime.timezone.utc)
meta["end-time"] = e.strftime("%H:%M:%S")
# meta needs to be updated after each report to show correct end-time
e = datetime.datetime.now(datetime.timezone.utc)
meta["end-time"] = e.strftime("%H:%M:%S")
# dump updated meta
meta = add_timings_to_meta(meta, executor.history)
(path / META).write_text(json.dumps(meta, indent=4))

# stop and disconnect platform
if platform is not None:
Expand All @@ -73,7 +76,3 @@ def autocalibrate(runcard, folder, force, update):
# dump updated runcard
if platform is not None:
dump_runcard(platform, path / UPDATED_PLATFORM)

# dump updated meta
meta = add_timings_to_meta(meta, executor.history)
(path / META).write_text(json.dumps(meta, indent=4))
245 changes: 0 additions & 245 deletions src/qibocal/web/templates/autocalibration.html

This file was deleted.

14 changes: 6 additions & 8 deletions src/qibocal/web/templates/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,13 @@
Actions
</button>
<div class="collapse show" id="actions-collapse">
{% for routine, iteration in report.history %}
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
<!-- <li><a href="#{{ routine }}" class="link-dark d-inline-flex text-decoration-none rounded">{{
report.routine_name(routine, iteration) }}</a></li> -->
{% for task_uid in report.history %}
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
<li><a class="link-dark d-inline-flex text-decoration-none rounded"
href="#{{ routine }}-{{ iteration }}"> {{ report.routine_name(routine, iteration) }}</a></li>
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
<li><a class="link-dark d-inline-flex text-decoration-none rounded"
href="#{{report.routine_name(*task_uid)}}"> {{report.routine_name(*task_uid)}}</a></li>
</ul>
</ul>
</ul>
{% endfor %}
</div>
</li>
Expand Down Expand Up @@ -132,7 +130,7 @@ <h1>{{ report.title }}</h1>

{% for task_uid in report.history %}

<div id="{{ routine }}-{{ iteration}}" style="scroll-margin-top: 4em;">
<div id="{{report.routine_name(*task_uid)}}" style="scroll-margin-top: 4em;">
<h4
class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
{{ report.routine_name(*task_uid) }}</h4>
Expand Down

0 comments on commit 5f10133

Please sign in to comment.