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

Add section to reports that show system info, tedana call and version #747

Merged
merged 29 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f968eb4
Added function to get system info and save into json
eurunuela Jul 10, 2021
ccf832b
Add missing dependency
eurunuela Jul 10, 2021
8044a99
Info table almost ready, need to figure out how to save json
eurunuela Jul 10, 2021
5a53ced
Added system info output structure, only missing command now
eurunuela Jul 10, 2021
5140f42
First working version, style missing now
eurunuela Jul 10, 2021
6d377e8
Styled info table
eurunuela Jul 10, 2021
aded008
Changed where system info is saved and how it is displayed on report
eurunuela Jul 15, 2021
056ac84
Merge branch 'main' of https://github.com/ME-ICA/tedana into reports/…
eurunuela Jul 15, 2021
80f4e64
Remove import of unused library
eurunuela Jul 15, 2021
fcf54fc
Assess review comments
eurunuela Jul 15, 2021
05d9ac3
Correct silly mistake
eurunuela Jul 15, 2021
9f8467c
Update tedana/utils.py
eurunuela Jul 15, 2021
7c8e901
Merge remote-tracking branch 'upstream/main' into reports/info
eurunuela Aug 9, 2023
10c9eba
Added system info to report after merge with main removed it
eurunuela Aug 9, 2023
865a3c6
Increase spacing in info table
eurunuela Aug 9, 2023
cbd6801
Added tedana call file to reports and tedana call from Python to report
eurunuela Aug 9, 2023
acd594b
Only generate call.sh when cli is used.
eurunuela Aug 9, 2023
363bc46
Fix command in dictionary bug
eurunuela Aug 10, 2023
942377f
Add system info to ica_reclassify
eurunuela Aug 10, 2023
ed7ab14
Remove call from 3-echo results
eurunuela Aug 10, 2023
cc3dc8f
Add call to ica_reclassify tests
eurunuela Aug 10, 2023
ec69f75
Trigger tests
eurunuela Aug 14, 2023
b6fb863
Merge remote-tracking branch 'upstream/main' into reports/info
eurunuela Aug 14, 2023
e34b6d0
Ran black on repo
eurunuela Aug 14, 2023
0183e1d
Revert changes black made to selection_nodes.py
eurunuela Aug 14, 2023
69979c3
Remove unused import
eurunuela Aug 14, 2023
11b9701
Fixed artifacts path and did some style fixing too
eurunuela Aug 25, 2023
4d3ed72
Added highlighted code block
eurunuela Aug 28, 2023
83ffeff
Moved up the creation of the tedana command
eurunuela Aug 30, 2023
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
34 changes: 16 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ version: 2.1
orbs:
codecov: codecov/[email protected]
jobs:

makeenv_38:
docker:
- image: continuumio/miniconda3
Expand All @@ -26,7 +25,7 @@ jobs:
- save_cache:
key: conda-py38-v2-{{ checksum "pyproject.toml" }}
paths:
- /opt/conda/envs/tedana_py38
- /opt/conda/envs/tedana_py38

unittest_38:
docker:
Expand All @@ -48,7 +47,7 @@ jobs:
- persist_to_workspace:
root: /tmp
paths:
- src/coverage/.coverage.py38
- src/coverage/.coverage.py38

unittest_39:
docker:
Expand Down Expand Up @@ -78,11 +77,11 @@ jobs:
- save_cache:
key: conda-py39-v2-{{ checksum "pyproject.toml" }}
paths:
- /opt/conda/envs/tedana_py39
- /opt/conda/envs/tedana_py39
- persist_to_workspace:
root: /tmp
paths:
- src/coverage/.coverage.py39
- src/coverage/.coverage.py39

unittest_310:
docker:
Expand Down Expand Up @@ -112,11 +111,11 @@ jobs:
- save_cache:
key: conda-py310-v1-{{ checksum "pyproject.toml" }}
paths:
- /opt/conda/envs/tedana_py310
- /opt/conda/envs/tedana_py310
- persist_to_workspace:
root: /tmp
paths:
- src/coverage/.coverage.py310
- src/coverage/.coverage.py310

style_check:
docker:
Expand Down Expand Up @@ -153,11 +152,11 @@ jobs:
mkdir /tmp/src/coverage
mv /tmp/src/tedana/.coverage /tmp/src/coverage/.coverage.three-echo
- store_artifacts:
path: /tmp/data
path: /tmp/src/tedana/.testing_data_cache/outputs
- persist_to_workspace:
root: /tmp
paths:
- src/coverage/.coverage.three-echo
- src/coverage/.coverage.three-echo

four-echo:
docker:
Expand All @@ -178,11 +177,11 @@ jobs:
mkdir /tmp/src/coverage
mv /tmp/src/tedana/.coverage /tmp/src/coverage/.coverage.four-echo
- store_artifacts:
path: /tmp/data
path: /tmp/src/tedana/.testing_data_cache/outputs
- persist_to_workspace:
root: /tmp
paths:
- src/coverage/.coverage.four-echo
- src/coverage/.coverage.four-echo

five-echo:
docker:
Expand All @@ -203,11 +202,11 @@ jobs:
mkdir /tmp/src/coverage
mv /tmp/src/tedana/.coverage /tmp/src/coverage/.coverage.five-echo
- store_artifacts:
path: /tmp/data
path: /tmp/src/tedana/.testing_data_cache/outputs
- persist_to_workspace:
root: /tmp
paths:
- src/coverage/.coverage.five-echo
- src/coverage/.coverage.five-echo

reclassify:
docker:
Expand All @@ -228,12 +227,11 @@ jobs:
mkdir /tmp/src/coverage
mv /tmp/src/tedana/.coverage /tmp/src/coverage/.coverage.reclassify
- store_artifacts:
path: /tmp/data
path: /tmp/src/tedana/.testing_data_cache/outputs
- persist_to_workspace:
root: /tmp
paths:
- src/coverage/.coverage.reclassify

- src/coverage/.coverage.reclassify

t2smap:
docker:
Expand All @@ -254,11 +252,11 @@ jobs:
mkdir /tmp/src/coverage
mv /tmp/src/tedana/.coverage /tmp/src/coverage/.coverage.t2smap
- store_artifacts:
path: /tmp/data
path: /tmp/src/tedana/.testing_data_cache/outputs
- persist_to_workspace:
root: /tmp
paths:
- src/coverage/.coverage.t2smap
- src/coverage/.coverage.t2smap

merge_coverage:
working_directory: /tmp/src/tedana
Expand Down
71 changes: 53 additions & 18 deletions tedana/reporting/data/html/report_body_template.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<style type="text/css">
.report {
display: flex;
flex-direction: column;
}

.content {
margin-left: 5%;
margin-right: 5%;
Expand Down Expand Up @@ -42,6 +47,14 @@
margin-top: 20px;
}

.info {
margin-left: 5%;
margin-right: 5%;
margin-bottom: 150px;
height: auto;
float: left;
}

button {
margin-right: 15px;
width: auto;
Expand Down Expand Up @@ -126,6 +139,24 @@
border-left: #c5a13e 1px solid;
border-right: #c5a13e 1px solid;
}

td {
padding: 0.3rem 1.5rem;
}

pre {
width: 60%;
white-space: pre-wrap; /* Since CSS 2.1 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}

.code_block {
padding: 2em !important;
border-radius: 5px;
}
</style>
<script language="javascript">
function updateCarpetPlot(name) {
Expand Down Expand Up @@ -153,27 +184,31 @@
}
}
</script>
<div class="content">
<h1>ICA components</h1>
$content
</div>
<div class="carpet-plots">
<h1>Carpet plots</h1>
<div class="carpet-wrapper">
<div class="carpet-buttons">
$buttons
</div>
<div class="carpet-plots-image">
<img id="imgCarpetPlot" src="./figures/carpet_optcom.svg" />
<div class="report">
<div class="content">
<h1>ICA components</h1>
$content
</div>
<div class="carpet-plots">
<h1>Carpet plots</h1>
<div class="carpet-wrapper">
<div class="carpet-buttons">$buttons</div>
<div class="carpet-plots-image">
<img id="imgCarpetPlot" src="./figures/carpet_optcom.svg" />
</div>
</div>
</div>
</div>
<div class="about">
<h1>About tedana</h1>
$about
<div class="info">
<h1>Info</h1>
$info
</div>
<div class="about">
<h1>About tedana</h1>
$about

<h1>References</h1>
$references
<h1>References</h1>
$references
</div>
</div>

$javascript
88 changes: 60 additions & 28 deletions tedana/reporting/data/html/report_head_template.html
Original file line number Diff line number Diff line change
@@ -1,38 +1,70 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>tedana report</title>
<meta
name="viewport"
content="width = device-width, initial-scale = 1"
charset="UTF-8"
/>
<script
src="https://cdn.bokeh.org/bokeh/release/bokeh-$bokehversion.min.js"
crossorigin="anonymous"
></script>
<script
src="https://cdn.bokeh.org/bokeh/release/bokeh-widgets-$bokehversion.min.js"
crossorigin="anonymous"
></script>
<script
src="https://cdn.bokeh.org/bokeh/release/bokeh-tables-$bokehversion.min.js"
crossorigin="anonymous"
></script>
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/build/pure-min.css"
integrity="sha384-oAOxQR6DkCoMliIh8yFnu25d7Eq/PHS21PClpwjOTeU2jRSq11vu66rf90/cZr47"
crossorigin="anonymous"
/>

<head>
<title>tedana report</title>
<meta name="viewport" content="width = device-width, initial-scale = 1" charset="UTF-8">
<script src="https://cdn.bokeh.org/bokeh/release/bokeh-$bokehversion.min.js"
crossorigin="anonymous"></script>
<script src="https://cdn.bokeh.org/bokeh/release/bokeh-widgets-$bokehversion.min.js"
crossorigin="anonymous"></script>
<script src="https://cdn.bokeh.org/bokeh/release/bokeh-tables-$bokehversion.min.js"
crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/build/pure-min.css"
integrity="sha384-oAOxQR6DkCoMliIh8yFnu25d7Eq/PHS21PClpwjOTeU2jRSq11vu66rf90/cZr47" crossorigin="anonymous">
<!-- CSS for the report -->
<style type="text/css">
body {
padding: 10px 20px 10px 20px;
}
</style>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/tokyo-night-dark.min.css"
/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>

<!-- and it's easy to individually load additional languages -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/languages/go.min.js"></script>

</head>
<script>
hljs.highlightAll();
</script>

<!-- CSS for the report -->
<style type="text/css">
body {
padding: 10px 20px 10px 20px;
}
</style>
</head>

<nav>
<div class="pure-menu pure-menu-horizontal">
<a href="https://github.com/ME-ICA/tedana" class="pure-menu-heading pure-menu-link">tedana $version</a>
<ul class="pure-menu-list">
<nav>
<div class="pure-menu pure-menu-horizontal">
<a
href="https://github.com/ME-ICA/tedana"
class="pure-menu-heading pure-menu-link"
>tedana $version</a
>
<ul class="pure-menu-list">
<li class="pure-menu-item">
<a href="https://tedana.readthedocs.io" class="pure-menu-link">Reporting documentation</a>
<a href="https://tedana.readthedocs.io" class="pure-menu-link"
>Reporting documentation</a
>
</li>
</ul>
</div>
</nav>
</ul>
</div>
</nav>

<body>
<body>
$body
</body>
</body>
</html>
44 changes: 44 additions & 0 deletions tedana/reporting/data/html/report_info_table_template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<div>
<p>
<span class="title">Tedana command used:</span>
<pre class="language-python">
<code class="code_block">
$command
</code>
</pre>
</p>
<table>
<tr>
<td class="title">System:</td>
<td>$system</td>
</tr>
<tr>
<td class="title">Node:</td>
<td>$node</td>
</tr>
<tr>
<td class="title">Release:</td>
<td>$release</td>
</tr>
<tr>
<td class="title">System version:</td>
<td>$sysversion</td>
</tr>
<tr>
<td class="title">Machine:</td>
<td>$machine</td>
</tr>
<tr>
<td class="title">Processor:</td>
<td>$processor</td>
</tr>
<tr>
<td class="title">Python:</td>
<td>$python</td>
</tr>
<tr>
<td class="title">Tedana version:</td>
<td>$tedana</td>
</tr>
</table>
</div>
Loading