Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
MDANSE
Commits
a5878bca
Commit
a5878bca
authored
Nov 08, 2016
by
eric pellegrini
Browse files
Merge branch 'hotfix-1.0.3.c'
parents
f2ab7711
9d9458bb
Pipeline
#1141
passed with stages
in 18 minutes and 4 seconds
Changes
15
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
a5878bca
version 1.0:
version 1.0.3.c:
- first release
----------------
* bug fix when saving user definitions
* bug fix with the initial size of the user definitions plugins
* updated the job template writing
* small refactoring of the save job template command line option
* removed unused imports
* removed white spaces
version 1.0.3.b:
----------------
* bug fix with JobControllerPanel in case of crashing jobs
* regression fixed due to trials to get rid of relative imports MDANSE/Externals/pubsub package
version 1.0.3.a:
----------------
* updated `MDANSE/__pkginfo__.py` module
MDANSE/Framework/Jobs/IJob.py
View file @
a5878bca
...
@@ -472,17 +472,17 @@ class IJob(Configurable):
...
@@ -472,17 +472,17 @@ class IJob(Configurable):
f
.
write
(
f
.
write
(
'''import collections
'''import collections
from MDANSE import REGISTRY
from MDANSE.Framework.Jobs.IJob import IJob
from MDANSE.Framework.Jobs.IJob import IJob
class %s(IJob):
class %
(classname)
s(IJob):
"""
"""
You should enter the description of your job here ...
You should enter the description of your job here ...
"""
"""
type = %r
# You should enter the label under which your job will be viewed from the gui.
label = %(label)r
# You should enter the label under which your job will be referenced from the gui.
label = %r
# You should enter the category under which your job will be references.
# You should enter the category under which your job will be references.
category = ('My jobs',)
category = ('My jobs',)
...
@@ -532,7 +532,9 @@ class %s(IJob):
...
@@ -532,7 +532,9 @@ class %s(IJob):
# The trajectory is closed
# The trajectory is closed
self.configuration['trajectory']['instance'].close()
self.configuration['trajectory']['instance'].close()
'''
%
(
classname
,
shortname
,
classname
))
REGISTRY[%(shortname)r] = %(classname)s
'''
%
{
'classname'
:
classname
,
'label'
:
'label of the class'
,
'shortname'
:
shortname
})
except
IOError
:
except
IOError
:
return
None
return
None
...
...
MDANSE/Framework/Jobs/MeanSquareDisplacement.py
View file @
a5878bca
...
@@ -157,5 +157,4 @@ class MeanSquareDisplacement(IJob):
...
@@ -157,5 +157,4 @@ class MeanSquareDisplacement(IJob):
self
.
configuration
[
'trajectory'
][
'instance'
].
close
()
self
.
configuration
[
'trajectory'
][
'instance'
].
close
()
REGISTRY
[
'msd'
]
=
MeanSquareDisplacement
REGISTRY
[
'msd'
]
=
MeanSquareDisplacement
\ No newline at end of file
\ No newline at end of file
MDANSE/Framework/__init__.py
View file @
a5878bca
...
@@ -8,12 +8,3 @@ from MDANSE.Framework.OutputVariables import *
...
@@ -8,12 +8,3 @@ from MDANSE.Framework.OutputVariables import *
from
MDANSE.Framework.Projectors
import
*
from
MDANSE.Framework.Projectors
import
*
from
MDANSE.Framework.QVectors
import
*
from
MDANSE.Framework.QVectors
import
*
from
MDANSE.Framework.Selectors
import
*
from
MDANSE.Framework.Selectors
import
*
import
os
from
MDANSE
import
PLATFORM
,
REGISTRY
macrosDirectories
=
sorted
([
x
[
0
]
for
x
in
os
.
walk
(
PLATFORM
.
macros_directory
())][
0
:])
for
d
in
macrosDirectories
:
REGISTRY
.
update
(
d
)
MDANSE/GUI/MainFrame.py
View file @
a5878bca
...
@@ -31,7 +31,6 @@ Created on Apr 14, 2015
...
@@ -31,7 +31,6 @@ Created on Apr 14, 2015
'''
'''
import
collections
import
collections
import
operator
import
os
import
os
import
sys
import
sys
import
webbrowser
import
webbrowser
...
...
MDANSE/GUI/Plugins/AtomSelectionPlugin.py
View file @
a5878bca
...
@@ -166,11 +166,11 @@ class AtomSelectionPlugin(UserDefinitionPlugin):
...
@@ -166,11 +166,11 @@ class AtomSelectionPlugin(UserDefinitionPlugin):
PUBLISHER
.
subscribe
(
self
.
msg_select_atoms_from_viewer
,
'msg_select_atoms_from_viewer'
)
PUBLISHER
.
subscribe
(
self
.
msg_select_atoms_from_viewer
,
'msg_select_atoms_from_viewer'
)
UserDefinitionPlugin
.
__init__
(
self
,
parent
,
size
=
(
8
00
,
5
00
))
UserDefinitionPlugin
.
__init__
(
self
,
parent
,
size
=
(
6
00
,
6
00
))
def
build_panel
(
self
):
def
build_panel
(
self
):
self
.
_mainPanel
=
wx
.
ScrolledWindow
(
self
,
wx
.
ID_ANY
,
size
=
self
.
GetSize
()
)
self
.
_mainPanel
=
wx
.
ScrolledWindow
(
self
,
wx
.
ID_ANY
)
self
.
_mainPanel
.
SetScrollbars
(
20
,
20
,
50
,
50
)
self
.
_mainPanel
.
SetScrollbars
(
20
,
20
,
50
,
50
)
sizer
=
wx
.
BoxSizer
(
wx
.
VERTICAL
)
sizer
=
wx
.
BoxSizer
(
wx
.
VERTICAL
)
...
@@ -251,10 +251,7 @@ class AtomSelectionPlugin(UserDefinitionPlugin):
...
@@ -251,10 +251,7 @@ class AtomSelectionPlugin(UserDefinitionPlugin):
self
.
_mainSizer
=
wx
.
BoxSizer
(
wx
.
VERTICAL
)
self
.
_mainSizer
=
wx
.
BoxSizer
(
wx
.
VERTICAL
)
self
.
_mainSizer
.
Add
(
self
.
_mainPanel
,
1
,
wx
.
EXPAND
|
wx
.
ALL
,
5
)
self
.
_mainSizer
.
Add
(
self
.
_mainPanel
,
1
,
wx
.
EXPAND
|
wx
.
ALL
,
5
)
self
.
SetSizer
(
self
.
_mainSizer
)
self
.
SetSizer
(
self
.
_mainSizer
)
self
.
_mgr
.
AddPane
(
self
.
_mainPanel
,
wxaui
.
AuiPaneInfo
().
DestroyOnClose
().
Center
().
Dock
().
CaptionVisible
(
False
).
CloseButton
(
False
).
BestSize
(
self
.
GetSize
()))
self
.
_mgr
.
Update
()
self
.
Bind
(
wx
.
EVT_TREE_SEL_CHANGED
,
self
.
on_display_keyword_values
,
self
.
filterTree
)
self
.
Bind
(
wx
.
EVT_TREE_SEL_CHANGED
,
self
.
on_display_keyword_values
,
self
.
filterTree
)
self
.
Bind
(
wx
.
EVT_LISTBOX
,
self
.
on_insert_keyword_values
,
self
.
values
)
self
.
Bind
(
wx
.
EVT_LISTBOX
,
self
.
on_insert_keyword_values
,
self
.
values
)
...
@@ -268,9 +265,9 @@ class AtomSelectionPlugin(UserDefinitionPlugin):
...
@@ -268,9 +265,9 @@ class AtomSelectionPlugin(UserDefinitionPlugin):
def
plug
(
self
):
def
plug
(
self
):
self
.
parent
.
mgr
.
GetPane
(
self
).
Float
().
Dockable
(
Fals
e
).
CloseButton
(
True
)
.
BestSize
((
600
,
600
))
self
.
_
parent
.
_
mgr
.
GetPane
(
self
).
Float
().
Floatable
(
True
).
Dockable
(
Tru
e
).
CloseButton
(
True
)
self
.
parent
.
mgr
.
Update
()
self
.
_
parent
.
_
mgr
.
Update
()
self
.
set_trajectory
(
self
.
dataproxy
.
data
)
self
.
set_trajectory
(
self
.
dataproxy
.
data
)
...
...
MDANSE/GUI/Plugins/AtomsListPlugin.py
View file @
a5878bca
...
@@ -33,7 +33,6 @@ Created on Jun 30, 2015
...
@@ -33,7 +33,6 @@ Created on Jun 30, 2015
import
os
import
os
import
wx
import
wx
import
wx.aui
as
wxaui
from
MDANSE
import
LOGGER
,
REGISTRY
from
MDANSE
import
LOGGER
,
REGISTRY
from
MDANSE.GUI.Plugins.UserDefinitionPlugin
import
UserDefinitionPlugin
from
MDANSE.GUI.Plugins.UserDefinitionPlugin
import
UserDefinitionPlugin
...
@@ -85,7 +84,7 @@ class AtomsListPlugin(UserDefinitionPlugin):
...
@@ -85,7 +84,7 @@ class AtomsListPlugin(UserDefinitionPlugin):
self
.
_selection
=
[]
self
.
_selection
=
[]
UserDefinitionPlugin
.
__init__
(
self
,
parent
,
size
=
(
8
00
,
5
00
))
UserDefinitionPlugin
.
__init__
(
self
,
parent
,
size
=
(
6
00
,
6
00
))
def
build_panel
(
self
):
def
build_panel
(
self
):
...
@@ -139,9 +138,6 @@ class AtomsListPlugin(UserDefinitionPlugin):
...
@@ -139,9 +138,6 @@ class AtomsListPlugin(UserDefinitionPlugin):
self
.
_mainSizer
.
Add
(
self
.
_mainPanel
,
1
,
wx
.
EXPAND
|
wx
.
ALL
,
5
)
self
.
_mainSizer
.
Add
(
self
.
_mainPanel
,
1
,
wx
.
EXPAND
|
wx
.
ALL
,
5
)
self
.
SetSizer
(
self
.
_mainSizer
)
self
.
SetSizer
(
self
.
_mainSizer
)
self
.
_mgr
.
AddPane
(
self
.
_mainPanel
,
wxaui
.
AuiPaneInfo
().
DestroyOnClose
().
Center
().
Dock
().
CaptionVisible
(
False
).
CloseButton
(
False
).
BestSize
(
self
.
GetSize
()))
self
.
_mgr
.
Update
()
self
.
Bind
(
wx
.
EVT_SPINCTRL
,
self
.
on_define_list_size
,
self
.
_nAtomsSpinCtrl
)
self
.
Bind
(
wx
.
EVT_SPINCTRL
,
self
.
on_define_list_size
,
self
.
_nAtomsSpinCtrl
)
self
.
Bind
(
wx
.
EVT_TREE_BEGIN_DRAG
,
self
.
on_add_atom
,
self
.
_molecules
)
self
.
Bind
(
wx
.
EVT_TREE_BEGIN_DRAG
,
self
.
on_add_atom
,
self
.
_molecules
)
self
.
Bind
(
wx
.
EVT_TREE_ITEM_ACTIVATED
,
self
.
on_add_atom
)
self
.
Bind
(
wx
.
EVT_TREE_ITEM_ACTIVATED
,
self
.
on_add_atom
)
...
...
MDANSE/GUI/Plugins/JobPlugin.py
View file @
a5878bca
...
@@ -54,7 +54,7 @@ class JobPlugin(ComponentPlugin):
...
@@ -54,7 +54,7 @@ class JobPlugin(ComponentPlugin):
self
.
_job
=
REGISTRY
[
"job"
][
self
.
_type
]()
self
.
_job
=
REGISTRY
[
"job"
][
self
.
_type
]()
ComponentPlugin
.
__init__
(
self
,
parent
,
size
=
wx
.
Size
(
800
,
4
00
),
*
args
,
**
kwargs
)
ComponentPlugin
.
__init__
(
self
,
parent
,
size
=
wx
.
Size
(
800
,
6
00
),
*
args
,
**
kwargs
)
def
build_panel
(
self
):
def
build_panel
(
self
):
...
@@ -148,9 +148,9 @@ class JobPlugin(ComponentPlugin):
...
@@ -148,9 +148,9 @@ class JobPlugin(ComponentPlugin):
def
plug
(
self
):
def
plug
(
self
):
self
.
_parent
.
_mgr
.
GetPane
(
self
).
Float
().
Center
().
Floatable
(
True
).
Dockable
(
True
).
CloseButton
(
True
)
.
BestSize
((
800
,
600
))
self
.
_parent
.
_mgr
.
GetPane
(
self
).
Float
().
Center
().
Floatable
(
True
).
Dockable
(
True
).
CloseButton
(
True
)
self
.
_parent
.
mgr
.
Update
()
self
.
_parent
.
_
mgr
.
Update
()
PUBLISHER
.
sendMessage
(
"msg_set_data"
,
message
=
self
)
PUBLISHER
.
sendMessage
(
"msg_set_data"
,
message
=
self
)
...
@@ -162,14 +162,14 @@ class JobFrame(wx.Frame):
...
@@ -162,14 +162,14 @@ class JobFrame(wx.Frame):
def
__init__
(
self
,
parent
,
jobType
,
datakey
=
None
):
def
__init__
(
self
,
parent
,
jobType
,
datakey
=
None
):
wx
.
Frame
.
__init__
(
self
,
parent
,
wx
.
ID_ANY
,
size
=
(
800
,
800
),
style
=
wx
.
DEFAULT_DIALOG_STYLE
|
wx
.
MINIMIZE_BOX
|
wx
.
MAXIMIZE_BOX
|
wx
.
RESIZE_BORDER
)
wx
.
Frame
.
__init__
(
self
,
parent
,
wx
.
ID_ANY
,
style
=
wx
.
DEFAULT_DIALOG_STYLE
|
wx
.
MINIMIZE_BOX
|
wx
.
MAXIMIZE_BOX
|
wx
.
RESIZE_BORDER
)
self
.
_jobType
=
jobType
self
.
_jobType
=
jobType
job
=
REGISTRY
[
'job'
][
self
.
_jobType
]
job
=
REGISTRY
[
'job'
][
self
.
_jobType
]
self
.
SetTitle
(
job
.
label
)
self
.
SetTitle
(
job
.
label
)
data
=
REGISTRY
[
'input_data'
][
job
.
ancestor
[
0
]](
datakey
,
True
)
data
=
REGISTRY
[
'input_data'
][
job
.
ancestor
[
0
]](
datakey
,
True
)
self
.
datakey
=
data
.
name
self
.
datakey
=
data
.
name
...
@@ -178,6 +178,8 @@ class JobFrame(wx.Frame):
...
@@ -178,6 +178,8 @@ class JobFrame(wx.Frame):
DATA_CONTROLLER
[
data
.
name
]
=
data
DATA_CONTROLLER
[
data
.
name
]
=
data
plugin
=
REGISTRY
[
'plugin'
][
self
.
_jobType
](
self
)
plugin
=
REGISTRY
[
'plugin'
][
self
.
_jobType
](
self
)
self
.
SetSize
(
plugin
.
GetSize
())
PUBLISHER
.
sendMessage
(
"msg_set_data"
,
message
=
plugin
)
PUBLISHER
.
sendMessage
(
"msg_set_data"
,
message
=
plugin
)
...
@@ -186,6 +188,6 @@ if __name__ == "__main__":
...
@@ -186,6 +188,6 @@ if __name__ == "__main__":
filename
=
os
.
path
.
join
(
os
.
path
.
dirname
(
PLATFORM
.
package_directory
()),
'Data'
,
'Trajectories'
,
'MMTK'
,
'protein_in_periodic_universe.nc'
)
filename
=
os
.
path
.
join
(
os
.
path
.
dirname
(
PLATFORM
.
package_directory
()),
'Data'
,
'Trajectories'
,
'MMTK'
,
'protein_in_periodic_universe.nc'
)
app
=
wx
.
App
(
False
)
app
=
wx
.
App
(
False
)
f
=
JobFrame
(
None
,
'd
l_poly
'
,
filename
)
f
=
JobFrame
(
None
,
'd
acf
'
,
filename
)
f
.
Show
()
f
.
Show
()
app
.
MainLoop
()
app
.
MainLoop
()
\ No newline at end of file
MDANSE/GUI/Plugins/PartialChargesPlugin.py
View file @
a5878bca
...
@@ -33,7 +33,6 @@ Created on Jul 2, 2015
...
@@ -33,7 +33,6 @@ Created on Jul 2, 2015
import
os
import
os
import
wx
import
wx
import
wx.aui
as
wxaui
import
wx.grid
as
wxgrid
import
wx.grid
as
wxgrid
from
MMTK
import
AtomCluster
,
Molecule
from
MMTK
import
AtomCluster
,
Molecule
...
@@ -55,7 +54,7 @@ class PartialChargesPlugin(UserDefinitionPlugin):
...
@@ -55,7 +54,7 @@ class PartialChargesPlugin(UserDefinitionPlugin):
self
.
_selectedAtoms
=
[]
self
.
_selectedAtoms
=
[]
UserDefinitionPlugin
.
__init__
(
self
,
parent
)
UserDefinitionPlugin
.
__init__
(
self
,
parent
,
size
=
(
600
,
600
)
)
def
build_panel
(
self
):
def
build_panel
(
self
):
...
@@ -69,12 +68,9 @@ class PartialChargesPlugin(UserDefinitionPlugin):
...
@@ -69,12 +68,9 @@ class PartialChargesPlugin(UserDefinitionPlugin):
self
.
_mainPanel
.
SetSizer
(
sizer
)
self
.
_mainPanel
.
SetSizer
(
sizer
)
self
.
_mgr
.
AddPane
(
self
.
_mainPanel
,
wxaui
.
AuiPaneInfo
().
DestroyOnClose
().
Center
().
Dock
().
CaptionVisible
(
False
).
CloseButton
(
False
).
BestSize
(
self
.
GetSize
()))
self
.
_mgr
.
Update
()
def
plug
(
self
):
def
plug
(
self
):
self
.
parent
.
mgr
.
GetPane
(
self
).
Float
().
Dockable
(
False
).
CloseButton
(
True
)
.
BestSize
((
600
,
600
))
self
.
parent
.
mgr
.
GetPane
(
self
).
Float
().
Dockable
(
False
).
CloseButton
(
True
)
self
.
parent
.
mgr
.
Update
()
self
.
parent
.
mgr
.
Update
()
...
...
MDANSE/GUI/Plugins/QVectorsPlugin.py
View file @
a5878bca
...
@@ -191,9 +191,6 @@ class QVectorsPlugin(UserDefinitionPlugin):
...
@@ -191,9 +191,6 @@ class QVectorsPlugin(UserDefinitionPlugin):
sizer
.
Add
(
generateButton
,
0
,
wx
.
ALL
|
wx
.
EXPAND
,
5
)
sizer
.
Add
(
generateButton
,
0
,
wx
.
ALL
|
wx
.
EXPAND
,
5
)
self
.
_mainPanel
.
SetSizer
(
sizer
)
self
.
_mainPanel
.
SetSizer
(
sizer
)
self
.
_mgr
.
AddPane
(
self
.
_mainPanel
,
wxaui
.
AuiPaneInfo
().
DestroyOnClose
().
Center
().
Dock
().
CaptionVisible
(
False
).
CloseButton
(
False
).
BestSize
(
self
.
GetSize
()))
self
.
_mgr
.
Update
()
self
.
Bind
(
wxaui
.
EVT_AUINOTEBOOK_PAGE_CLOSE
,
self
.
on_close_tab
,
self
.
_notebook
)
self
.
Bind
(
wxaui
.
EVT_AUINOTEBOOK_PAGE_CLOSE
,
self
.
on_close_tab
,
self
.
_notebook
)
self
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
on_generate_q_vectors
,
generateButton
)
self
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
on_generate_q_vectors
,
generateButton
)
...
...
MDANSE/GUI/Plugins/UserDefinitionPlugin.py
View file @
a5878bca
...
@@ -30,10 +30,10 @@ Created on Sep 22, 2015
...
@@ -30,10 +30,10 @@ Created on Sep 22, 2015
'''
'''
import
wx
import
wx
import
wx.aui
as
wxaui
from
MDANSE
import
LOGGER
,
REGISTRY
from
MDANSE
import
LOGGER
,
REGISTRY
from
MDANSE.Framework.UserDefinitionStore
import
UD_STORE
from
MDANSE.Framework.UserDefinitionStore
import
UD_STORE
from
MDANSE.GUI
import
PUBLISHER
from
MDANSE.GUI
import
PUBLISHER
from
MDANSE.GUI.Plugins.ComponentPlugin
import
ComponentPlugin
from
MDANSE.GUI.Plugins.ComponentPlugin
import
ComponentPlugin
...
@@ -43,10 +43,14 @@ class UserDefinitionPlugin(ComponentPlugin):
...
@@ -43,10 +43,14 @@ class UserDefinitionPlugin(ComponentPlugin):
def
__init__
(
self
,
parent
,
*
args
,
**
kwargs
):
def
__init__
(
self
,
parent
,
*
args
,
**
kwargs
):
ComponentPlugin
.
__init__
(
self
,
parent
,
size
=
(
800
,
500
)
)
ComponentPlugin
.
__init__
(
self
,
parent
,
*
args
,
**
kwargs
)
self
.
add_ud_panel
()
self
.
add_ud_panel
()
self
.
_mgr
.
AddPane
(
self
.
_mainPanel
,
wxaui
.
AuiPaneInfo
().
DestroyOnClose
().
Center
().
Dock
().
CaptionVisible
(
False
).
CloseButton
(
False
).
BestSize
(
self
.
GetSize
()))
self
.
_mgr
.
Update
()
def
add_ud_panel
(
self
):
def
add_ud_panel
(
self
):
udPanel
=
wx
.
Panel
(
self
.
_mainPanel
,
wx
.
ID_ANY
)
udPanel
=
wx
.
Panel
(
self
.
_mainPanel
,
wx
.
ID_ANY
)
...
@@ -82,10 +86,10 @@ class UserDefinitionPlugin(ComponentPlugin):
...
@@ -82,10 +86,10 @@ class UserDefinitionPlugin(ComponentPlugin):
return
return
if
UD_STORE
.
has_definition
(
self
.
_target
,
self
.
_type
,
name
):
if
UD_STORE
.
has_definition
(
self
.
_target
,
self
.
_type
,
name
):
LOGGER
(
'There is already a user-definition with that name.'
,
'error'
,[
'dialog'
])
LOGGER
(
'There is already a
n
user-definition with that name.'
,
'error'
,[
'dialog'
])
return
return
UD_STORE
.
set_definition
(
self
.
_target
,
self
.
type
,
name
,
value
)
UD_STORE
.
set_definition
(
self
.
_target
,
self
.
_
type
,
name
,
value
)
PUBLISHER
.
sendMessage
(
"msg_set_ud"
,
message
=
None
)
PUBLISHER
.
sendMessage
(
"msg_set_ud"
,
message
=
None
)
...
...
MDANSE/GUI/Widgets/UserDefinitionWidget.py
View file @
a5878bca
...
@@ -57,6 +57,8 @@ class UserDefinitionDialog(wx.Dialog):
...
@@ -57,6 +57,8 @@ class UserDefinitionDialog(wx.Dialog):
self
.
SetTitle
(
self
.
_plugin
.
label
)
self
.
SetTitle
(
self
.
_plugin
.
label
)
self
.
SetSize
(
self
.
_plugin
.
GetSize
())
self
.
_plugin
.
set_trajectory
(
trajectory
)
self
.
_plugin
.
set_trajectory
(
trajectory
)
PUBLISHER
.
sendMessage
(
"msg_set_data"
,
message
=
self
.
_plugin
)
PUBLISHER
.
sendMessage
(
"msg_set_data"
,
message
=
self
.
_plugin
)
...
...
MDANSE/__init__.py
View file @
a5878bca
...
@@ -52,3 +52,8 @@ from MMTK import Database
...
@@ -52,3 +52,8 @@ from MMTK import Database
# The default database is still the MMTK one
# The default database is still the MMTK one
Database
.
path
.
append
(
os
.
path
.
join
(
PLATFORM
.
package_directory
(),
'Data'
))
Database
.
path
.
append
(
os
.
path
.
join
(
PLATFORM
.
package_directory
(),
'Data'
))
macrosDirectories
=
sorted
([
x
[
0
]
for
x
in
os
.
walk
(
PLATFORM
.
macros_directory
())][
0
:])
for
d
in
macrosDirectories
:
REGISTRY
.
update
(
d
)
MDANSE/__pkginfo__.py
View file @
a5878bca
__version__
=
"1.0.3.
b
"
__version__
=
"1.0.3.
c
"
__date__
=
"0
7
-11-2016"
__date__
=
"0
8
-11-2016"
__author__
=
"Eric Pellegrini"
__author__
=
"Eric Pellegrini"
Scripts/mdanse
View file @
a5878bca
...
@@ -233,7 +233,7 @@ class CommandLineParser(optparse.OptionParser):
...
@@ -233,7 +233,7 @@ class CommandLineParser(optparse.OptionParser):
if
len
(
parser
.
rargs
)
==
0
:
if
len
(
parser
.
rargs
)
==
0
:
print
"Registered interfaces:"
print
"Registered interfaces:"
for
interfaceName
in
REGISTRY
.
get_
interfaces
()
:
for
interfaceName
in
REGISTRY
.
interfaces
:
print
"
\t
- %s"
%
interfaceName
print
"
\t
- %s"
%
interfaceName
elif
len
(
parser
.
rargs
)
==
1
:
elif
len
(
parser
.
rargs
)
==
1
:
val
=
parser
.
rargs
[
0
]
val
=
parser
.
rargs
[
0
]
...
@@ -333,9 +333,10 @@ class CommandLineParser(optparse.OptionParser):
...
@@ -333,9 +333,10 @@ class CommandLineParser(optparse.OptionParser):
from
MDANSE.Framework.Jobs.IJob
import
IJob
from
MDANSE.Framework.Jobs.IJob
import
IJob
if
nargs
!=
2
:
if
nargs
!=
2
:
raise
CommandLineParserError
(
"Invalid number of arguments for %r option"
%
opt_str
)
print
"Two arguments required resp. the name and the shortname of the class to be templated"
return
shortname
,
class
name
=
parser
.
rargs
classname
,
short
name
=
parser
.
rargs
try
:
try
:
IJob
.
save_template
(
shortname
,
classname
)
IJob
.
save_template
(
shortname
,
classname
)
...
...
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