Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the WDL compiler. #4679

Merged
merged 10 commits into from
Dec 5, 2023
5 changes: 1 addition & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ stages:
- main_tests
- integration


lint:
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"
Expand All @@ -75,7 +74,6 @@ lint:
- make docs
# - make diff_pydocstyle_report


cwl_dependency_is_stand_alone:
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"
Expand All @@ -85,15 +83,14 @@ cwl_dependency_is_stand_alone:
- ${MAIN_PYTHON_PKG} -m virtualenv venv && . venv/bin/activate && make prepare && make develop extras=[cwl]
- make test threads="${TEST_THREADS}" marker="${MARKER}" tests=src/toil/test/docs/scriptsTest.py::ToilDocumentationTest::testCwlexample


wdl_dependency_is_stand_alone:
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"
stage: linting_and_dependencies
script:
- pwd
- ${MAIN_PYTHON_PKG} -m virtualenv venv && . venv/bin/activate && make prepare && make develop extras=[wdl]
- make test threads="${TEST_THREADS}" marker="${MARKER}" tests=src/toil/test/wdl/toilwdlTest.py::ToilWdlTest::testMD5sum
- make test threads="${TEST_THREADS}" marker="${MARKER}" tests=src/toil/test/wdl/wdltoil_test.py::WDLTests::test_MD5sum

quick_test_offline:
rules:
Expand Down
9 changes: 0 additions & 9 deletions contrib/admin/mypy-with-ignore.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@ def main():
'src/toil/__init__.py',
'src/toil/deferred.py',
'src/toil/version.py',
'src/toil/wdl/utils.py',
'src/toil/wdl/wdl_synthesis.py',
'src/toil/wdl/wdl_analysis.py',
'src/toil/wdl/wdl_functions.py',
'src/toil/wdl/toilwdl.py',
'src/toil/wdl/versions/draft2.py',
'src/toil/wdl/versions/v1.py',
'src/toil/wdl/versions/dev.py',
'src/toil/provisioners/abstractProvisioner.py',
'src/toil/provisioners/gceProvisioner.py',
'src/toil/provisioners/__init__.py',
Expand Down Expand Up @@ -104,7 +96,6 @@ def ignore(file_path):
if file_path.startswith(prefix):
return True
return False


filtered_files_to_check = []
for file_path in all_files_to_check:
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ def run_setup():
'cwltoil = toil.cwl.cwltoil:cwltoil_was_removed [cwl]',
'toil-cwl-runner = toil.cwl.cwltoil:main [cwl]',
'toil-wdl-runner = toil.wdl.wdltoil:main [wdl]',
'toil-wdl-runner-old = toil.wdl.toilwdl:main [wdl]',
'toil-wes-cwl-runner = toil.server.cli.wes_cwl_runner:main [server]',
'_toil_mesos_executor = toil.batchSystems.mesos.executor:main [mesos]',
'_toil_contained_executor = toil.batchSystems.contained_executor:executor']})
Expand Down
2 changes: 1 addition & 1 deletion src/toil/server/cli/wes_cwl_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def parse_params(self, workflow_params_file: str) -> Dict[str, Any]:

:param workflow_params_file: The URL or path to the CWL input file.
"""
loader = schema_salad.ref_resolver.Loader(
loader = schema_salad.ref_resolver.Loader( # type:ignore
{"location": {"@type": "@id"}, "path": {"@type": "@id"}}
)

Expand Down
50 changes: 17 additions & 33 deletions src/toil/test/utils/toilDebugTest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
"""A set of test cases for toilwdl.py"""
# Copyright (C) 2015-2021 Regents of the University of California
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -15,47 +14,44 @@
import logging
import os
import subprocess
from pathlib import Path
import tempfile

from toil.lib.resources import glob
from toil.test import slow
from toil.version import python

import pytest

logger = logging.getLogger(__name__)


@pytest.fixture
def workflow_debug_jobstore(tmp_path: Path) -> str:
jobStorePath = str(tmp_path / "toilWorkflowRun")
def workflow_debug_jobstore() -> str:
job_store_path = os.path.join(tempfile.mkdtemp(), "toilWorkflowRun")
subprocess.check_call(
[
python,
os.path.abspath("src/toil/test/utils/ABCWorkflowDebug/debugWorkflow.py"),
jobStorePath,
job_store_path,
]
)
return jobStorePath
return job_store_path


@slow
def testJobStoreContents(workflow_debug_jobstore: str):
def testJobStoreContents():
"""
Test toilDebugFile.printContentsOfJobStore().

Runs a workflow that imports 'B.txt' and 'mkFile.py' into the
jobStore. 'A.txt', 'C.txt', 'ABC.txt' are then created. This checks to
make sure these contents are found in the jobStore and printed.
"""
jobStoreDir = workflow_debug_jobstore
contents = ["A.txt", "B.txt", "C.txt", "ABC.txt", "mkFile.py"]

subprocess.check_call(
[
python,
os.path.abspath("src/toil/utils/toilDebugFile.py"),
jobStoreDir,
workflow_debug_jobstore(),
"--logDebug",
"--listFilesInJobStore=True",
]
Expand All @@ -78,7 +74,7 @@ def testJobStoreContents(workflow_debug_jobstore: str):
os.remove(jobstoreFileContents)


def fetchFiles(symLink, jobStoreDir: str, outputDir):
def fetchFiles(symLink: bool, jobStoreDir: str, outputDir: str):
"""
Fn for testFetchJobStoreFiles() and testFetchJobStoreFilesWSymlinks().

Expand All @@ -99,8 +95,8 @@ def fetchFiles(symLink, jobStoreDir: str, outputDir):
"*C.txt",
"*ABC.txt",
"*mkFile.py",
"--localFilePath=" + outputDir,
"--useSymlinks=" + str(symLink),
f"--localFilePath={outputDir}",
f"--useSymlinks={symLink}",
]
print(cmd)
subprocess.check_call(cmd)
Expand All @@ -114,22 +110,10 @@ def fetchFiles(symLink, jobStoreDir: str, outputDir):


# expected run time = 4s
def testFetchJobStoreFiles(tmp_path: Path, workflow_debug_jobstore: str) -> None:
"""Test toilDebugFile.fetchJobStoreFiles() without using symlinks."""
outputDir = tmp_path / "testoutput"
outputDir.mkdir()
fetchFiles(
symLink=False, jobStoreDir=workflow_debug_jobstore, outputDir=str(outputDir)
)


# expected run time = 4s
def testFetchJobStoreFilesWSymlinks(
tmp_path: Path, workflow_debug_jobstore: str
) -> None:
"""Test toilDebugFile.fetchJobStoreFiles() using symlinks."""
outputDir = tmp_path / "testoutput"
outputDir.mkdir()
fetchFiles(
symLink=True, jobStoreDir=workflow_debug_jobstore, outputDir=str(outputDir)
)
def testFetchJobStoreFiles() -> None:
"""Test toilDebugFile.fetchJobStoreFiles() symlinks."""
job_store_dir = workflow_debug_jobstore()
output_dir = os.path.join(os.path.dirname(job_store_dir), "testoutput")
os.makedirs(output_dir, exist_ok=True)
for symlink in (True, False):
fetchFiles(symLink=symlink, jobStoreDir=job_store_dir, outputDir=output_dir)
Loading