Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
atdb-ldv
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ASTRON SDC
atdb-ldv
Merge requests
!269
small bugfix
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Merged
small bugfix
SDC-779-add-summary-info
into
master
Overview
0
Commits
1
Pipelines
1
Changes
3
Merged
Nico Vermaas
requested to merge
SDC-779-add-summary-info
into
master
2 years ago
Overview
0
Commits
1
Pipelines
1
Changes
3
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
000a6907
1 commit,
2 years ago
3 files
+
75
−
72
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
atdb/taskdatabase/services/algorithms.py
+
74
−
69
Options
@@ -708,85 +708,90 @@ def construct_summary(task):
results
=
""
# find the plots in the quality json structure
summary
=
task
.
quality_json
[
"
summary
"
]
total_size_input
=
0
total_size_output
=
0
for
key
in
summary
:
record
=
summary
[
key
]
try
:
summary
=
task
.
quality_json
[
"
summary
"
]
results
=
"
<h4>Summary File (for sas_id
"
+
task
.
sas_id
+
"
)</h4>
"
#<h4><img src="{% static 'taskdatabase/ldvlogo_small.png' %}" height="30" alt="summary">
# Summary File (sas_id {{ task.sas_id }}) </h4>
total_size_input
=
0
total_size_output
=
0
for
key
in
summary
:
record
=
summary
[
key
]
total_size_input
+=
record
[
'
input_size
'
]
total_size_output
+=
record
[
'
output_size
'
]
line
=
''
line
+=
'
<tr style=
"
background-color:#7EB1C4
"
><td colspan=
"
3
"
><b>
'
+
key
+
'
</b></td></tr>
'
line
+=
'
<th></th><th>Name</th><th>Size</th>
'
line
+=
'
<tr><td><b>Input</b></td>
'
line
+=
'
<td>
'
+
record
[
'
input_name
'
]
+
'
</td>
'
line
+=
'
<td>
'
+
str
(
record
[
'
input_size
'
])
+
'
(
'
+
record
[
'
input_size_str
'
]
+
'
)</td>
'
line
+=
'
</tr>
'
line
+=
'
<tr><td><b>Output</b></td>
'
line
+=
'
<td>
'
+
record
[
'
output_name
'
]
+
'
</td>
'
line
+=
'
<td>
'
+
str
(
record
[
'
output_size
'
])
+
'
(
'
+
record
[
'
output_size_str
'
]
+
'
)</td>
'
line
+=
'
</tr>
'
line
+=
'
<tr><td><b>Ratio</b></td>
'
line
+=
'
<td>
'
+
str
(
round
(
record
[
'
size_ratio
'
],
3
))
+
'
</td>
'
line
+=
'
</tr>
'
total_size_input
+=
record
[
'
input_size
'
]
total_size_output
+=
record
[
'
output_size
'
]
try
:
input_content
=
record
[
'
input_content
'
]
if
input_content
:
line
+=
'
<th>Input Content</th>
'
line
+=
'
<tr><td colspan=
"
3
"
>
'
for
filename
in
input_content
:
line
+=
filename
+
'
\n
'
line
+=
'
</td></tr>
'
except
:
pass
line
=
''
line
+=
'
<tr style=
"
background-color:#7EB1C4
"
><td colspan=
"
3
"
><b>
'
+
key
+
'
</b></td></tr>
'
try
:
output_content
=
record
[
'
output_content
'
]
if
output_content
:
line
+=
'
<th>Output Content</th>
'
line
+=
'
<tr><td colspan=
"
3
"
>
'
for
filename
in
output_content
:
line
+=
filename
+
'
\n
'
line
+=
'
</td></tr>
'
except
:
pass
line
+=
'
<th></th><th>Name</th><th>Size</th>
'
line
+=
'
<tr><td><b>Input</b></td>
'
line
+=
'
<td>
'
+
record
[
'
input_name
'
]
+
'
</td>
'
line
+=
'
<td>
'
+
str
(
record
[
'
input_size
'
])
+
'
(
'
+
record
[
'
input_size_str
'
]
+
'
)</td>
'
line
+=
'
</tr>
'
line
+=
'
<tr><td><b>Output</b></td>
'
line
+=
'
<td>
'
+
record
[
'
output_name
'
]
+
'
</td>
'
line
+=
'
<td>
'
+
str
(
record
[
'
output_size
'
])
+
'
(
'
+
record
[
'
output_size_str
'
]
+
'
)</td>
'
line
+=
'
</tr>
'
line
+=
'
<tr><td><b>Ratio</b></td>
'
line
+=
'
<td>
'
+
str
(
round
(
record
[
'
size_ratio
'
],
3
))
+
'
</td>
'
line
+=
'
</tr>
'
try
:
to_add
=
record
[
'
to_add
'
]
if
to_add
:
line
+=
'
<th>to_add</th>
'
line
+=
'
<tr><td colspan=
"
3
"
>
'
for
filename
in
to_add
:
line
+=
filename
+
'
\n
'
line
+=
'
</td></tr>
'
except
:
pass
try
:
input_content
=
record
[
'
input_content
'
]
if
input_content
:
line
+=
'
<th>
Input Content
</th>
'
line
+=
'
<tr><td colspan=
"
3
"
>
'
for
filename
in
input_content
:
line
+=
filename
+
'
\n
'
line
+=
'
</td></tr>
'
except
:
pass
try
:
to_delete
=
record
[
'
to_delete
'
]
if
to_delete
:
line
+=
'
<th>
to_delete
</th>
'
line
+=
'
<tr><td colspan=
"
3
"
>
'
for
filename
in
to_delete
:
line
+=
filename
+
'
\n
'
line
+=
'
</td></tr>
'
except
:
pass
try
:
output_content
=
record
[
'
output_content
'
]
if
output_content
:
line
+=
'
<th>Output Content</th>
'
line
+=
'
<tr><td colspan=
"
3
"
>
'
for
filename
in
output_content
:
line
+=
filename
+
'
\n
'
line
+=
'
</td></tr>
'
except
:
pass
results
+=
line
try
:
to_add
=
record
[
'
to_add
'
]
if
to_add
:
line
+=
'
<th>to_add</th>
'
line
+=
'
<tr><td colspan=
"
3
"
>
'
for
filename
in
to_add
:
line
+=
filename
+
'
\n
'
line
+=
'
</td></tr>
'
except
:
pass
results
+=
'
<th>Totals</th>
'
results
+=
'
<tr><td colspan=
"
1
"
><b>Input size</b></td><td>
'
+
str
(
total_size_input
)
+
'
</td></tr>
'
results
+=
'
<tr><td colspan=
"
1
"
><b>Output size</b><td>
'
+
str
(
total_size_output
)
+
'
</td></tr>
'
results
+=
'
<tr><td colspan=
"
1
"
><b>Ratio</b></td><td>
'
+
str
(
total_size_output
/
total_size_output
)
+
'
</td></tr>
'
try
:
to_delete
=
record
[
'
to_delete
'
]
if
to_delete
:
line
+=
'
<th>to_delete</th>
'
line
+=
'
<tr><td colspan=
"
3
"
>
'
for
filename
in
to_delete
:
line
+=
filename
+
'
\n
'
line
+=
'
</td></tr>
'
except
:
pass
results
+=
line
try
:
results
+=
'
<th>Totals</th>
'
results
+=
'
<tr><td colspan=
"
1
"
><b>Input size</b></td><td>
'
+
str
(
total_size_input
)
+
'
</td></tr>
'
results
+=
'
<tr><td colspan=
"
1
"
><b>Output size</b><td>
'
+
str
(
total_size_output
)
+
'
</td></tr>
'
results
+=
'
<tr><td colspan=
"
1
"
><b>Ratio</b></td><td>
'
+
str
(
total_size_output
/
total_size_output
)
+
'
</td></tr>
'
except
:
pass
Loading