Skip to content

Commit

Permalink
allow project-level figures to display as columns instead of rows
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldcampbelljr committed Dec 20, 2023
1 parent 23808cd commit 8241748
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 58 deletions.
41 changes: 16 additions & 25 deletions pipestat/jinja_templates/project_object.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,22 @@ <h3>Project level records</h3>
</div>
</div>
{% endif %}
{% if figures[0] is defined %}
<div class="row">
<div class="col-12">
<h5>Figures</h5>
</div>
</div>
<div class="row">
<div class="col-12">
<!-- figures go here -->
<div class='row justify-content-start'>
{% for figure in figures %}
<figure class="figure">
<a href='{{ figure[0] }}'>
<img id="fig" src='{{ figure[2] }}' class="figure-img img-fluid rounded" alt="">
</a>
<a href='{{ figure[0] }}'>
<figcaption class="figure-caption text-left"><b>Fig.{{ loop.index }} </b><i>{{ figure[1] }}</i>
</figcaption>
</a>
</figure>
{% endfor %}
</div>
</div>
</div>
{% endif %}
<div class='container-fluid'>
{% if figures[0] is defined %}
<h5>Figures</h5>
{% for figure in figures %}
<figure class="figure">
<a href='{{ figure[0] }}'>
<img id="fig" src='{{ figure[2] }}' class="figure-img img-fluid rounded" alt="">
</a>
<a href='{{ figure[0] }}'>
<figcaption class="figure-caption text-center"><b>Fig.{{ loop.index }} </b><i>{{ figure[1] }}</i>
</figcaption>
</a>
</figure>
{% endfor %}
{% endif %}
</div>
{% if links[0] is defined %}
<div class="row">
<div class="col-12">
Expand Down
33 changes: 0 additions & 33 deletions tests/test_pipestat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2132,36 +2132,3 @@ def test_multi_results_summarize(
psm.summarize()
data = YAMLConfigManager(filepath=os.path.join(temp_dir, "aggregate_results.yaml"))
assert r_id in data[psm.pipeline_name][psm.pipeline_type].keys()

# @pytest.mark.parametrize("backend", ["file"])
# def test_temp(
# self,
# config_file_path,
# results_file_path,
# recursive_schema_file_path,
# backend,
# range_values,
# ):
# # This is for temporary PEATAC testing for determining summarize function
# with TemporaryDirectory() as d, ContextManagerDBTesting(DB_URL):
# temp_dir = d
# # single_results_file_path = "{record_identifier}/results.yaml"
# # results_file_path = os.path.join(temp_dir, single_results_file_path)
# # args = dict(schema_path=recursive_schema_file_path, database_only=False)
# # n = 3
# config_file_path = "/home/drc/pepatac_tutorial/processed/looper_pipestat_config.yaml"
#
# # for i in range_values[:n]:
# # r_id = i[0]
# # val = i[1]
# # backend_data = {"record_identifier": r_id, "results_file_path": results_file_path}
# # args.update(backend_data)
# # psm = SamplePipestatManager(**args)
# # psm.report(record_identifier=r_id, values=val, force_overwrite=True)
# psm = PipestatManager(config_file=config_file_path)
# reportlink = psm.summarize()
# print(reportlink)
# statstsv = psm.table()
# print(statstsv)
# # data = YAMLConfigManager(filepath=os.path.join(temp_dir, "aggregate_results.yaml"))
# # assert r_id in data[psm.pipeline_name][psm.pipeline_type].keys()

0 comments on commit 8241748

Please sign in to comment.