File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 1
1
[run]
2
2
branch = True
3
3
source = cwltool
4
+ omit = cwltool/run_job.py
4
5
5
6
[report]
6
7
exclude_lines =
Original file line number Diff line number Diff line change @@ -317,11 +317,11 @@ This file may be specified as either XML or YAML and very simply describes vario
317
317
plugins to enable to "resolve" ``SoftwareRequirement `` dependencies.
318
318
319
319
Using these hints will allow cwltool to modify the environment in
320
- which your tool runs, for example by loading one or more environment
321
- modules . The enviroment is constructed as normal (i.e. standard CWL
320
+ which your tool runs, for example by loading one or more Environment
321
+ Modules . The environment is constructed as normal (i.e. standard CWL
322
322
runtime enviroment, ``EnvVarRequirement ``, ``--preserve-environment ``
323
- are applied), then this is modified. This currently means that you
324
- cannot override variables set in this way .
323
+ are applied), then the environment may modified by the selected tool resolver. This currently means that you
324
+ cannot override any environment variables set by the selected tool resolver .
325
325
326
326
To discuss some of these plugins and how to configure them, first consider the
327
327
following ``hint `` definition for an example CWL tool.
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ def test_bioconda() -> None:
44
44
@pytest .mark .skipif (not deps , reason = "galaxy-lib is not installed" )
45
45
@pytest .mark .skipif (not which ("modulecmd" ), reason = "modulecmd not installed" )
46
46
def test_modules (monkeypatch : pytest .MonkeyPatch ) -> None :
47
+ """Do a basic smoke test using environment modules to satisfy a SoftwareRequirement."""
47
48
wflow = get_data ("tests/random_lines.cwl" )
48
49
job = get_data ("tests/random_lines_job.json" )
49
50
monkeypatch .setenv (
@@ -65,6 +66,11 @@ def test_modules(monkeypatch: pytest.MonkeyPatch) -> None:
65
66
@pytest .mark .skipif (not deps , reason = "galaxy-lib is not installed" )
66
67
@pytest .mark .skipif (not which ("modulecmd" ), reason = "modulecmd not installed" )
67
68
def test_modules_environment (tmp_path : Path , monkeypatch : pytest .MonkeyPatch ) -> None :
69
+ """
70
+ Check that the environment variables set by a module are being propagated correctly.
71
+
72
+ Do so by by running `env` as the tool and parsing its output.
73
+ """
68
74
monkeypatch .setenv (
69
75
"MODULEPATH" , os .path .join (os .getcwd (), "tests/test_deps_env/modulefiles" )
70
76
)
You can’t perform that action at this time.
0 commit comments