Skip to content

Commit 1b03bb1

Browse files
committed
Resolve software requirements using Environment Modules
Use modulefile in tests/test_deps_env/ Resolve dependency using find by directory strategy Bump galaxy-lib to minimum 17.09.9 to obtain galaxyproject/galaxy@69a8700
1 parent dda97d7 commit 1b03bb1

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
':os.name=="posix"': ['subprocess32 >= 3.5.0'],
6666
':python_version<"3"': ['pathlib2 == 2.3.2'],
6767
':python_version<"3.6"': ['typing >= 3.5.3'],
68-
'deps': ["galaxy-lib >= 17.09.3"]
68+
'deps': ["galaxy-lib >= 17.09.9"]
6969
},
7070
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4',
7171
setup_requires=[] + pytest_runner,

tests/test_dependencies.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,16 @@ def test_bioconda():
3131
["--beta-conda-dependencies", "--debug", wflow, job])
3232

3333
assert error_code == 0, stderr
34+
35+
import os
36+
from distutils import spawn
37+
@pytest.mark.skipif(not spawn.find_executable("modulecmd"), reason="modulecmd not installed")
38+
def test_modules():
39+
wflow = get_data("tests/random_lines.cwl")
40+
job = get_data("tests/random_lines_job.json")
41+
os.environ["MODULEPATH"] = os.path.join(os.getcwd(), 'tests/test_deps_env/modulefiles')
42+
error_code, _, stderr = get_main_output(
43+
["--beta-dependency-resolvers-configuration",
44+
"tests/test_deps_env_modules_resolvers_conf.yml", "--debug", wflow, job])
45+
46+
assert error_code == 0, stderr
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#%Module -*- tcl -*-
2+
3+
set name random-lines
4+
set version 1.0
5+
set prefix [file normalize [file join [file dirname ${ModulesCurrentModulefile}] ../../${name}/${version}]]
6+
7+
module-whatis "Selects N random lines from a file and outputs to another file, maintaining original line order"
8+
9+
if {![file exists $prefix]} {
10+
puts stderr "\t[module-info name] Load Error: $prefix does not exist"
11+
break
12+
exit 1
13+
}
14+
15+
prepend-path PATH ${prefix}/scripts
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- type: modules
2+
prefetch: false
3+
find_by: directory

0 commit comments

Comments
 (0)