Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MDANSE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Scientific Software
MDANSE
Commits
51f1d3e7
Commit
51f1d3e7
authored
9 years ago
by
eric pellegrini
Browse files
Options
Downloads
Patches
Plain Diff
Refactored the code such that the info about the configurators is
updated when setting up the configuration
parent
68b8af79
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MDANSE/Framework/Configurable.py
+9
-12
9 additions, 12 deletions
MDANSE/Framework/Configurable.py
with
9 additions
and
12 deletions
MDANSE/Framework/Configurable.py
+
9
−
12
View file @
51f1d3e7
...
...
@@ -65,10 +65,10 @@ class Configurable(object):
self
.
_configured
=
False
if
settings
is
not
None
:
self
.
settings
=
settings
self
.
_info
=
""
self
.
build_configuration
()
if
settings
is
not
None
:
self
.
set_settings
(
settings
)
def
build_configuration
(
self
):
...
...
@@ -154,6 +154,8 @@ class Configurable(object):
conf
.
configure
(
self
,
parameters
[
name
])
self
.
_configuration
[
name
]
=
conf
self
.
_info
+=
conf
.
get_information
()
configured
.
add
(
name
)
...
...
@@ -172,15 +174,10 @@ class Configurable(object):
:rtype: str
'''
if
not
self
.
_configured
:
return
"
Not yet configured
"
info
=
[]
for
configurator
in
self
.
_configuration
.
values
():
info
.
append
(
configurator
.
get_information
())
info
.
append
(
'
\n
'
)
return
""
.
join
(
info
)
if
not
self
.
_info
:
return
"
No information available yet.
"
return
self
.
_info
@classmethod
def
build_doc
(
cls
):
...
...
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