Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SGS18-READEX
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Ondrej Vysocky
SGS18-READEX
Commits
e9710193
Commit
e9710193
authored
6 years ago
by
Ivo Peterek
Browse files
Options
Downloads
Patches
Plain Diff
ENH: show source csv data on heatmap click
#6
parent
72871e29
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/csv_vals_edit.py
+8
-6
8 additions, 6 deletions
src/csv_vals_edit.py
with
8 additions
and
6 deletions
src/csv_vals_edit.py
+
8
−
6
View file @
e9710193
...
...
@@ -39,11 +39,11 @@ class Ui_csv_vals_edit(object):
self
.
tableWidget
.
setHorizontalHeaderLabels
([
yLabel
[
0
]
+
"
"
+
yLabel
[
1
]])
self
.
vals
=
self
.
get_vals_from_csv
(
region
,
xLabel
,
xLabelVal
,
funcLabel
,
funcLabelVal
,
yLabel
)
self
.
vals
=
list
(
self
.
get_vals_from_csv
(
region
,
xLabel
,
xLabelVal
,
funcLabel
,
funcLabelVal
,
yLabel
)
)
num_vals
=
len
(
self
.
vals
)
self
.
tableWidget
.
setRowCount
(
num_vals
)
for
item
in
range
(
num_vals
):
self
.
tableWidget
.
setItem
(
item
,
1
,
self
.
vals
[
item
][
0
])
self
.
tableWidget
.
setItem
(
item
,
1
,
QtWidgets
.
QTableWidgetItem
(
self
.
vals
[
item
][
0
]
[
1
],
0
)
)
def
retranslateUi
(
self
,
csv_vals_edit
):
_translate
=
QtCore
.
QCoreApplication
.
translate
...
...
@@ -56,14 +56,16 @@ class Ui_csv_vals_edit(object):
+
'
/.gui_tmp_config_{}.py
'
.
format
(
os
.
getpid
()))
xLabelInd
=
[
i
for
i
,
x
in
enumerate
(
config_dic
[
'
file_name_args_tup
'
])
if
xLabel
in
x
]
funcLabelInd
=
[
i
for
i
,
x
in
enumerate
(
config_dic
[
'
file_name_args_tup
'
])
if
funcLabel
in
x
]
xLabel_multiplier
=
config_dic
[
'
x_val_multiplier
'
]
funcLabel_multiplier
=
config_dic
[
'
label_val_multiplier
'
]
data_path
=
config_dic
[
'
root_folder
'
][
0
][
0
]
+
"
/
"
+
region
csv_names
=
glob
.
glob
(
data_path
+
'
/*.csv
'
)
first_csv_path
=
csv_names
[
0
]
first_csv_name
=
first_csv_path
.
split
(
'
/
'
)[
-
1
].
rsplit
(
'
.
'
,
1
)[
0
].
split
(
'
_
'
)
target_csv_name
=
first_csv_name
target_csv_name
[
xLabelInd
[
0
]]
=
xLabelVal
target_csv_name
[
funcLabelInd
[
0
]]
=
funcLabelVal
target_csv_name
[
xLabelInd
[
0
]]
=
str
(
int
(
round
(
float
(
xLabelVal
)
/
xLabel_multiplier
)))
target_csv_name
[
funcLabelInd
[
0
]]
=
str
(
int
(
round
(
float
(
funcLabelVal
)
/
funcLabel_multiplier
)))
target_csv_name
=
(
'
_
'
).
join
(
target_csv_name
)
+
"
.csv
"
target_csv_path
=
data_path
+
'
/
'
+
target_csv_name
...
...
@@ -89,12 +91,12 @@ class Ui_csv_vals_edit(object):
return
vals_with_ind
if
__name__
==
"
__main__
"
:
'''
if __name__ ==
"
__main__
"
:
import sys
app = QtWidgets.QApplication(sys.argv)
csv_vals_edit = QtWidgets.QMainWindow()
ui = Ui_csv_vals_edit()
ui.setupUi(csv_vals_edit,
'
LTimes
'
,
'
CF
'
,
'
12
'
,
'
UnCF
'
,
'
12
'
, (
'
Job info - rapl
'
,
'
Runtime of function [s]
'
))
csv_vals_edit.show()
sys
.
exit
(
app
.
exec_
())
sys.exit(app.exec_())
'''
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment