Skip to content

Commit

Permalink
Fix bugs and incorperate version 4.0.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasHickman committed Jan 16, 2018
1 parent 63fa4cd commit 5bc6064
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ You can also run the tests in parallel with `-n` to improve performance

## Creating a new version

To create a `gatk_cmdline_tools.zip` zip file containing all the generated cwl files for gatk versions 3.5, 3.6, 3.7, 3.8 and 4.beta.6, run `bash build.sh`. This file is uploaded as a release on GitHub for every new release of this package.
To create a `gatk_cmdline_tools.zip` zip file containing all the generated cwl files for gatk versions 3.5, 3.6, 3.7, 3.8 and 4.0.0.0, run `bash build.sh`. This file is uploaded as a release on GitHub for every new release of this package.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -euf -o pipefail
generator_version=$(git describe --tags --always)
echo "GATK CWL generator: gatk-cwl-generator-${generator_version}"

VERSIONS=( 3.5-0 3.6-0 3.7-0 3.8-0 4.beta.6 )
VERSIONS=( 3.5-0 3.6-0 3.7-0 3.8-0 4.0.0.0 )

tarbase="gatk-cwl-generator-${generator_version}-gatk_cmdline_tools"

Expand Down
2 changes: 1 addition & 1 deletion gatkcwlgenerator/gen_cwl_arg.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def handle_required(typ):

if has_file_type:
base_cwl_arg["inputBinding"] = {
"valueFrom": "$(applyTagsToArgument(\"--{0}\", inputs.{0}_tags))".format(arg_id)
"valueFrom": "$(applyTagsToArgument(\"--{0}\", inputs['{0}_tags']))".format(arg_id)
}
elif has_array_type:
base_cwl_arg["inputBinding"] = {
Expand Down
18 changes: 5 additions & 13 deletions gatkcwlgenerator/tests/test_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,23 +131,15 @@ def run_tool(toolname, tool_location, extra_info="", interval=1, filetext=None,

# Unit tests

supported_versions = ["3.5-0", "3.6-0", "3.7-0", "3.8-0", "4.beta.6"]
supported_versions = ["3.5-0", "3.6-0", "3.7-0", "3.8-0", "4.0.0.0"]

@pytest.mark.skip(reason="""
The API for gatk is probably going to remain the same for specific versions,
as this takes a lot of time, it should be disabled generally and used
for testing added supporting versions for the first time
The API for gatk is probably going to remain the same for specific versions.
As this takes a lot of time, it should be disabled generally and used
for testing added supporting versions for the first time.
""")
@pytest.mark.parametrize("version", supported_versions)
class TestGenerateCWL:
def test_get_json_links(self, version):
json_links = cwl_gen.get_json_links(version)
for link_type, links in json_links.__dict__.items():
assert links, "There are no links of type '{}' in gatk version {}".format(
link_type,
version
)

def test_no_arguments_in_annotator(self, version):
# If arguments are in annotator modules, we probably need to add them to the CWL file
for url in cwl_gen.get_json_links(version).annotator_urls:
Expand Down Expand Up @@ -284,7 +276,7 @@ def test_are_cwl_files_valid(cwl_files):
def test_haplotype_caller(request, HaplotypeCaller_runner):
HaplotypeCaller_runner()

@pytest.mark.skip("This takes a long time for the gain, so skip it")
@pytest.mark.skip("This takes too long, so skip it")
class TestGATKTypes:
# Test if the haplotype caller accepts all the correct types
def test_boolean_type(self, HaplotypeCaller_runner):
Expand Down

0 comments on commit 5bc6064

Please sign in to comment.