Skip to content

Commit 645fd25

Browse files
committed
Add wdl-conformance-tests to gitignore and sphinx config + remove unsued imports in job + get rid of wdl dependency in job.py
1 parent f12c199 commit 645fd25

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ venv*
1414
v3nv/
1515
tmp/
1616
/src/toil/test/cwl/spec*
17+
/src/toil/test/wdl/wdl-conformance-tests
1718
/cwltool_deps/
1819
/docs/generated_rst/
1920
/docker/Dockerfile

Diff for: docs/conf.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ def setup(app):
160160
autoapi_dirs = ["../src/toil"]
161161
autodoc_typehints = "description"
162162
autoapi_keep_files = True
163-
autoapi_ignore = ["*.pyi", "*/test/cwl/spec*/*.py", "*/fake_mpi_run.py", "*/tutorial_*.py", "*/example_*.py", "*/mkFile.py", "*/debugWorkflow.py"]
163+
autoapi_ignore = ["*.pyi", "*/test/cwl/spec*/*.py", "*/fake_mpi_run.py", "*/tutorial_*.py", "*/example_*.py", "*/mkFile.py", "*/debugWorkflow.py",
164+
"*/test/wdl/wdl-conformance-tests/*"]
164165
autoapi_options = [
165166
"members",
166167
"undoc-members",

Diff for: src/toil/job.py

+10-11
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,18 @@
4040
NamedTuple,
4141
Optional,
4242
Sequence,
43-
Set,
4443
Tuple,
4544
TypeVar,
4645
Union,
4746
cast,
48-
overload, TypedDict, Literal,
47+
overload,
48+
TypedDict,
49+
Literal,
4950
)
5051
from urllib.error import HTTPError
5152
from urllib.parse import urlsplit, unquote, urljoin
5253

53-
from configargparse import ArgParser
54-
5554
from toil import memoize
56-
from toil.bus import Names
57-
from toil.lib.compatibility import deprecated
5855

5956
import dill
6057
from configargparse import ArgParser
@@ -81,11 +78,13 @@
8178
from optparse import OptionParser
8279

8380
from toil.batchSystems.abstractBatchSystem import (
84-
BatchJobExitReason,
85-
InsufficientSystemResources,
81+
BatchJobExitReason
8682
)
8783
from toil.fileStores.abstractFileStore import AbstractFileStore
88-
from toil.jobStores.abstractJobStore import AbstractJobStore, UnimplementedURLException
84+
from toil.jobStores.abstractJobStore import (
85+
AbstractJobStore,
86+
UnimplementedURLException,
87+
)
8988

9089
logger = logging.getLogger(__name__)
9190

@@ -3793,7 +3792,7 @@ class FileMetadata(NamedTuple):
37933792
def potential_absolute_uris(
37943793
uri: str,
37953794
path: list[str],
3796-
importer: WDL.Tree.Document | None = None,
3795+
importer: str | None = None,
37973796
execution_dir: str | None = None,
37983797
) -> Iterator[str]:
37993798
"""
@@ -3834,7 +3833,7 @@ def potential_absolute_uris(
38343833

38353834
if importer is not None:
38363835
# Add the place the imported file came form, to search first.
3837-
full_path_list.append(Toil.normalize_uri(importer.pos.abspath))
3836+
full_path_list.append(Toil.normalize_uri(importer))
38383837

38393838
# Then the current directory. We need to make sure to include a filename component here or it will treat the current directory with no trailing / as a document and relative paths will look 1 level up.
38403839
# When importing on a worker, the cwd will be a tmpdir and will result in FileNotFoundError after os.path.abspath, so override with the execution dir

Diff for: src/toil/wdl/wdltoil.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ async def toil_read_source(
506506
# We track our own failures for debugging
507507
tried = []
508508

509-
for candidate_uri in potential_absolute_uris(uri, path, importer):
509+
for candidate_uri in potential_absolute_uris(uri, path, importer=importer.pos.abspath if importer else None):
510510
# For each place to try in order
511511
destination_buffer = io.BytesIO()
512512
logger.debug("Fetching %s", candidate_uri)

0 commit comments

Comments
 (0)