Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing end-time and hrefs in report #658

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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