Commit 73e8083a authored by Vincent Noël's avatar Vincent Noël
Browse files

Renaming to pb4covid19

parent df4e6cb9
...@@ -149,12 +149,12 @@ def write_config_file(name): ...@@ -149,12 +149,12 @@ def write_config_file(name):
sub.update_params(config_tab, user_tab) sub.update_params(config_tab, user_tab)
# sub.numx = math.ceil( (config_tab.xmax.value - config_tab.xmin.value) / config_tab.xdelta.value ) # sub.numx = math.ceil( (config_tab.xmax.value - config_tab.xmin.value) / config_tab.xdelta.value )
# sub.numy = math.ceil( (config_tab.ymax.value - config_tab.ymin.value) / config_tab.ydelta.value ) # sub.numy = math.ceil( (config_tab.ymax.value - config_tab.ymin.value) / config_tab.ydelta.value )
# print("pc4covid19.py: ------- sub.numx, sub.numy = ", sub.numx, sub.numy) # print("pb4covid19.py: ------- sub.numx, sub.numy = ", sub.numx, sub.numy)
# callback from write_config_button # callback from write_config_button
# def write_config_file_cb(b): # def write_config_file_cb(b):
# path_to_share = os.path.join('~', '.local','share','pc4covid19') # path_to_share = os.path.join('~', '.local','share','pb4covid19')
# dirname = os.path.expanduser(path_to_share) # dirname = os.path.expanduser(path_to_share)
# val = write_config_box.value # val = write_config_box.value
...@@ -168,7 +168,7 @@ def write_config_file(name): ...@@ -168,7 +168,7 @@ def write_config_file(name):
# default & previous config options) # default & previous config options)
def get_config_files(): def get_config_files():
cf = {'DEFAULT': full_xml_filename} cf = {'DEFAULT': full_xml_filename}
path_to_share = os.path.join('~', '.local','share','pc4covid19') path_to_share = os.path.join('~', '.local','share','pb4covid19')
dirname = os.path.expanduser(path_to_share) dirname = os.path.expanduser(path_to_share)
try: try:
os.makedirs(dirname) os.makedirs(dirname)
...@@ -180,12 +180,12 @@ def get_config_files(): ...@@ -180,12 +180,12 @@ def get_config_files():
# Find the dir path (full_path) to the cached dirs # Find the dir path (full_path) to the cached dirs
if nanoHUB_flag: if nanoHUB_flag:
full_path = os.path.expanduser("~/data/results/.submit_cache/pc4covid19") # does Windows like this? full_path = os.path.expanduser("~/data/results/.submit_cache/pb4covid19") # does Windows like this?
else: else:
# local cache # local cache
try: try:
cachedir = os.environ['CACHEDIR'] cachedir = os.environ['CACHEDIR']
full_path = os.path.join(cachedir, "pc4covid19") full_path = os.path.join(cachedir, "pb4covid19")
except: except:
# print("Exception in get_config_files") # print("Exception in get_config_files")
return cf return cf
...@@ -234,7 +234,7 @@ def run_done_func(s, rdir): ...@@ -234,7 +234,7 @@ def run_done_func(s, rdir):
if nanoHUB_flag: if nanoHUB_flag:
# Email the user that their job has completed # Email the user that their job has completed
os.system("submit mail2self -s 'nanoHUB pc4covid19' -t 'Your Run completed.'&") os.system("submit mail2self -s 'nanoHUB pb4covid19' -t 'Your Run completed.'&")
# save the config file to the cache directory # save the config file to the cache directory
shutil.copy('config.xml', rdir) shutil.copy('config.xml', rdir)
...@@ -310,7 +310,7 @@ def run_sim_func(s): ...@@ -310,7 +310,7 @@ def run_sim_func(s):
if nanoHUB_flag: if nanoHUB_flag:
if remote_cb.value: if remote_cb.value:
s.run(run_name, "-v ncn-hub_M@brown -n 8 -w 1440 pc4covid19-r7 config.xml") # "-r7" suffix?? s.run(run_name, "-v ncn-hub_M@brown -n 8 -w 1440 pb4covid19-r7 config.xml") # "-r7" suffix??
else: else:
# read_config.index = 0 # reset Dropdown 'Load Config' to 'DEFAULT' when Run interactively # read_config.index = 0 # reset Dropdown 'Load Config' to 'DEFAULT' when Run interactively
s.run(run_name, "--local ../bin/myproj config.xml") s.run(run_name, "--local ../bin/myproj config.xml")
...@@ -378,14 +378,14 @@ if nanoHUB_flag: ...@@ -378,14 +378,14 @@ if nanoHUB_flag:
run_button = Submit(label='Run', run_button = Submit(label='Run',
start_func=run_sim_func, start_func=run_sim_func,
done_func=run_done_func, done_func=run_done_func,
cachename='pc4covid19', cachename='pb4covid19',
showcache=False, showcache=False,
outcb=outcb) outcb=outcb)
else: else:
if (hublib_flag): if (hublib_flag):
run_button = RunCommand(start_func=run_sim_func, run_button = RunCommand(start_func=run_sim_func,
done_func=run_done_func, done_func=run_done_func,
cachename='pc4covid19', cachename='pb4covid19',
showcache=False, showcache=False,
outcb=outcb) outcb=outcb)
else: else:
...@@ -422,7 +422,7 @@ else: ...@@ -422,7 +422,7 @@ else:
homedir = os.getcwd() homedir = os.getcwd()
tool_title = widgets.Label(r'\(\textbf{pc4covid19}\)') tool_title = widgets.Label(r'\(\textbf{pb4covid19}\)')
if nanoHUB_flag or hublib_flag: if nanoHUB_flag or hublib_flag:
# define this, but don't use (yet) # define this, but don't use (yet)
remote_cb = widgets.Checkbox(indent=False, value=False, description='Submit as Batch Job to Clusters/Grid') remote_cb = widgets.Checkbox(indent=False, value=False, description='Submit as Batch Job to Clusters/Grid')
......
#!/bin/sh #!/bin/sh
/usr/bin/invoke_app "$@" -C "start_jupyter -A -T @tool pc4covid19.ipynb" -t pc4covid19 -u anaconda3-5.1 /usr/bin/invoke_app "$@" -C "start_jupyter -A -T @tool pb4covid19.ipynb" -t pb4covid19 -u anaconda3-5.1
\ No newline at end of file \ No newline at end of file
...@@ -9,17 +9,17 @@ ...@@ -9,17 +9,17 @@
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
import sys, os import sys, os
sys.path.insert(0, os.path.abspath('bin')) sys.path.insert(0, os.path.abspath('bin'))
import pc4covid19 import pb4covid19
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
pc4covid19.gui pb4covid19.gui
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment