Skip to content

Commit 8241748

Browse files
allow project-level figures to display as columns instead of rows
1 parent 23808cd commit 8241748

File tree

2 files changed

+16
-58
lines changed

2 files changed

+16
-58
lines changed

pipestat/jinja_templates/project_object.html

+16-25
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,22 @@ <h3>Project level records</h3>
55
</div>
66
</div>
77
{% endif %}
8-
{% if figures[0] is defined %}
9-
<div class="row">
10-
<div class="col-12">
11-
<h5>Figures</h5>
12-
</div>
13-
</div>
14-
<div class="row">
15-
<div class="col-12">
16-
<!-- figures go here -->
17-
<div class='row justify-content-start'>
18-
{% for figure in figures %}
19-
<figure class="figure">
20-
<a href='{{ figure[0] }}'>
21-
<img id="fig" src='{{ figure[2] }}' class="figure-img img-fluid rounded" alt="">
22-
</a>
23-
<a href='{{ figure[0] }}'>
24-
<figcaption class="figure-caption text-left"><b>Fig.{{ loop.index }} </b><i>{{ figure[1] }}</i>
25-
</figcaption>
26-
</a>
27-
</figure>
28-
{% endfor %}
29-
</div>
30-
</div>
31-
</div>
32-
{% endif %}
8+
<div class='container-fluid'>
9+
{% if figures[0] is defined %}
10+
<h5>Figures</h5>
11+
{% for figure in figures %}
12+
<figure class="figure">
13+
<a href='{{ figure[0] }}'>
14+
<img id="fig" src='{{ figure[2] }}' class="figure-img img-fluid rounded" alt="">
15+
</a>
16+
<a href='{{ figure[0] }}'>
17+
<figcaption class="figure-caption text-center"><b>Fig.{{ loop.index }} </b><i>{{ figure[1] }}</i>
18+
</figcaption>
19+
</a>
20+
</figure>
21+
{% endfor %}
22+
{% endif %}
23+
</div>
3324
{% if links[0] is defined %}
3425
<div class="row">
3526
<div class="col-12">

tests/test_pipestat.py

-33
Original file line numberDiff line numberDiff line change
@@ -2132,36 +2132,3 @@ def test_multi_results_summarize(
21322132
psm.summarize()
21332133
data = YAMLConfigManager(filepath=os.path.join(temp_dir, "aggregate_results.yaml"))
21342134
assert r_id in data[psm.pipeline_name][psm.pipeline_type].keys()
2135-
2136-
# @pytest.mark.parametrize("backend", ["file"])
2137-
# def test_temp(
2138-
# self,
2139-
# config_file_path,
2140-
# results_file_path,
2141-
# recursive_schema_file_path,
2142-
# backend,
2143-
# range_values,
2144-
# ):
2145-
# # This is for temporary PEATAC testing for determining summarize function
2146-
# with TemporaryDirectory() as d, ContextManagerDBTesting(DB_URL):
2147-
# temp_dir = d
2148-
# # single_results_file_path = "{record_identifier}/results.yaml"
2149-
# # results_file_path = os.path.join(temp_dir, single_results_file_path)
2150-
# # args = dict(schema_path=recursive_schema_file_path, database_only=False)
2151-
# # n = 3
2152-
# config_file_path = "/home/drc/pepatac_tutorial/processed/looper_pipestat_config.yaml"
2153-
#
2154-
# # for i in range_values[:n]:
2155-
# # r_id = i[0]
2156-
# # val = i[1]
2157-
# # backend_data = {"record_identifier": r_id, "results_file_path": results_file_path}
2158-
# # args.update(backend_data)
2159-
# # psm = SamplePipestatManager(**args)
2160-
# # psm.report(record_identifier=r_id, values=val, force_overwrite=True)
2161-
# psm = PipestatManager(config_file=config_file_path)
2162-
# reportlink = psm.summarize()
2163-
# print(reportlink)
2164-
# statstsv = psm.table()
2165-
# print(statstsv)
2166-
# # data = YAMLConfigManager(filepath=os.path.join(temp_dir, "aggregate_results.yaml"))
2167-
# # assert r_id in data[psm.pipeline_name][psm.pipeline_type].keys()

0 commit comments

Comments
 (0)