mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Apply suggestions from code review
include file ext with a name, allow spaces in input datasets and notebook names Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>
This commit is contained in:
co-authored by
Marius van den Beek
parent
0b1bad8958
commit
54dd806c26
@@ -25,13 +25,13 @@
|
||||
|
||||
#set $cleaned_names = []
|
||||
#for $file in $input
|
||||
#set $cleaned_name = re.sub('[^\w\-\.]', '_', str($file.element_identifier))
|
||||
#set $cleaned_name = re.sub('[^\w\-\.\s]', '_', str($file.element_identifier))
|
||||
## prevent overwriting data with a randomized suffix
|
||||
#if $cleaned_name in $cleaned_names:
|
||||
#set $cleaned_name = $cleaned_name + '_' + ''.join(random.choice(string.ascii_lowercase) for _ in range(3))
|
||||
#end if
|
||||
#set $cleaned_names += [$cleaned_name]
|
||||
ln -sf '$file' './jupyter/data/${cleaned_name}' &&
|
||||
ln -sf '$file' './jupyter/data/${cleaned_name}.${file.ext}' &&
|
||||
#end for
|
||||
|
||||
## change into the directory where the notebooks are located
|
||||
@@ -46,7 +46,7 @@
|
||||
jupyter lab --allow-root --no-browser --NotebookApp.shutdown_button=True &&
|
||||
cp ./ipython_galaxy_notebook.ipynb '$jupyter_notebook'
|
||||
#else:
|
||||
#set $noteboook_name = re.sub('[^\w\-\.]', '_', str($mode.ipynb.element_identifier))
|
||||
#set $noteboook_name = re.sub('[^\w\-\.\s]', '_', str($mode.ipynb.element_identifier))
|
||||
cp '$mode.ipynb' ./${noteboook_name}.ipynb &&
|
||||
jupyter trust ./${noteboook_name}.ipynb &&
|
||||
#if $mode.run_it:
|
||||
|
||||
Reference in New Issue
Block a user