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
FluEgg
fluegg
Commits
278bcece
Commit
278bcece
authored
Sep 05, 2019
by
Domanski, Marian M.
Browse files
Merge branch 'master' into 'master'
Results compatibility See merge request
!45
parents
68b27fcf
f1d0a4b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
fluegg/simulation.py
View file @
278bcece
...
...
@@ -251,15 +251,20 @@ class SimulationResults:
depth
=
depth
[()]
# Reformat configuration to a dictionary from string
config_split
=
configuration
.
split
(
", '"
)
configuration
=
[]
for
pair
in
config_split
:
pair
=
pair
.
replace
(
'{'
,
''
)
pair
=
pair
.
replace
(
'}'
,
''
)
pair
=
pair
.
replace
(
'"'
,
''
)
pair
=
pair
.
replace
(
"'"
,
''
)
configuration
.
append
(
pair
.
split
(
': '
))
configuration
=
dict
(
configuration
)
# Reformatting will change everything to strings, so except if there is
# an issue
try
:
config_split
=
configuration
.
split
(
", '"
)
configuration
=
[]
for
pair
in
config_split
:
pair
=
pair
.
replace
(
'{'
,
''
)
pair
=
pair
.
replace
(
'}'
,
''
)
pair
=
pair
.
replace
(
'"'
,
''
)
pair
=
pair
.
replace
(
"'"
,
''
)
configuration
.
append
(
pair
.
split
(
': '
))
configuration
=
dict
(
configuration
)
except
BaseException
:
configuration
=
{}
results
=
cls
.
__new__
(
cls
)
results
.
_positions
=
positions
...
...
@@ -591,7 +596,7 @@ class SimulationResults:
# Check if sim_name exists in configuration, if not use current
# time
if
not
'sim_name'
in
self
.
_configuration
.
keys
():
if
'sim_name'
not
in
self
.
_configuration
.
keys
():
now
=
datetime
.
datetime
.
now
()
date_string
=
now
.
strftime
(
'%Y-%m-%d-%H-%M-%S'
)
self
.
_configuration
[
'sim_name'
]
=
'fluegg_'
+
date_string
...
...
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