Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
cbedfc4d
Commit
cbedfc4d
authored
Oct 07, 2020
by
marc duez
Browse files
migrator.py : display required config IDs
parent
fffe1c48
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/web2py/applications/vidjil/scripts/migrator.py
View file @
cbedfc4d
...
...
@@ -30,6 +30,13 @@ class MigrateLogger():
def
getLogger
(
self
):
return
self
.
log
def
infoConfig
(
self
,
tables
):
config_id
=
[]
for
res
in
tables
[
'results_file'
]:
config_id
.
append
(
tables
[
'results_file'
][
res
][
'config_id'
])
config_id
=
list
(
dict
.
fromkeys
(
config_id
))
self
.
info
(
"IDs of detected config %s"
%
str
(
config_id
))
def
get_dict_from_row
(
row
):
'''
Create a dict element from a Row element
...
...
@@ -281,6 +288,8 @@ def export_group_data(filesrc, filepath, groupids, log=MigrateLogger()):
tables
=
export_peripheral_data
(
ext
,
tables
,
sample_set_ids
,
log
=
log
)
log
.
infoConfig
(
tables
)
if
not
os
.
path
.
exists
(
filepath
):
os
.
makedirs
(
filepath
)
...
...
@@ -302,6 +311,8 @@ def export_sample_set_data(filesrc, filepath, sample_type, sample_ids, log=Migra
tables
=
export_peripheral_data
(
ext
,
tables
,
sample_set_ids
,
log
=
log
)
log
.
infoConfig
(
tables
)
if
not
os
.
path
.
exists
(
filepath
):
os
.
makedirs
(
filepath
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment