Skip to content

Commit b0838ea

Browse files
committed
readthedocs: install graphviz
1 parent 0bbb82c commit b0838ea

File tree

8 files changed

+32
-22
lines changed

8 files changed

+32
-22
lines changed

.readthedocs.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@ sphinx:
1212
# Optionally build your docs in additional formats such as PDF and ePub
1313
formats: all
1414

15-
# Optionally set the version of Python and requirements required to build your docs
15+
build:
16+
os: ubuntu-22.04
17+
tools:
18+
python: "3.11"
19+
apt_packages:
20+
- graphviz
21+
1622
python:
17-
version: 3.7
1823
install:
1924
- requirements: docs/requirements.txt
2025
- method: pip

cwl_utils/errors.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33

44

55
class ArrayMissingItems(BaseException):
6-
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py"""
6+
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py ."""
77

88

99
class JavascriptException(Exception):
1010
pass
1111

1212

1313
class MissingKeyField(BaseException):
14-
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py"""
14+
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py ."""
1515

1616

1717
class MissingTypeName(BaseException):
18-
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py"""
18+
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py ."""
1919

2020

2121
class RecordMissingFields(BaseException):
22-
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py"""
22+
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py ."""
2323

2424

2525
class SubstitutionError(Exception):

cwl_utils/expression_refactor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ def run(args: List[str]) -> int:
110110

111111
def refactor(args: argparse.Namespace) -> int:
112112
"""Primary processing loop."""
113-
114113
return_code = 0
115114
yaml = YAML(typ="rt")
116115
yaml.preserve_quotes = True # type: ignore[assignment]

cwl_utils/image_puller.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ def _run_command_pull(cmd_pull: List[str]) -> None:
4141

4242

4343
class DockerImagePuller(ImagePuller):
44-
"""
45-
Pull docker image with Docker
46-
"""
44+
"""Pull docker image with Docker."""
4745

4846
def get_image_name(self) -> str:
4947
"""Get the name of the tarball."""
@@ -73,9 +71,7 @@ def save_docker_image(self) -> None:
7371

7472

7573
class SingularityImagePuller(ImagePuller):
76-
"""
77-
Pull docker image with Singularity
78-
"""
74+
"""Pull docker image with Singularity."""
7975

8076
CHARS_TO_REPLACE = ["/"]
8177
NEW_CHAR = "_"

cwl_utils/pack.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# Copyright (c) 2020 Seven Bridges
44
# See https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/LICENSE
55
"""
6+
CWL document packing functions.
7+
68
The link resolution is as follows:
79
810
We always have two components: the base and the link

cwl_utils/schemadef.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright (c) 2020 Seven Bridges
44
# See https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/LICENSE
55
"""
6-
Valid forms of user defined types stored in external file
6+
Valid forms of user defined types stored in external file.
77
88
A single dictionary (tests/types/singletype.yml)
99
A list of dictionaries (e.g. tests/types/recursive.yml)

cwl_utils/utils.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@
3232

3333

3434
def _is_github_symbolic_link(base_url: urllib.parse.ParseResult, contents: str) -> bool:
35-
"""Look for remote path with contents that is a single line with no new
35+
"""
36+
Test if link is a GitHub style symbolic link.
37+
38+
Look for remote path with contents that is a single line with no new
3639
line with an extension.
3740
3841
https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py
@@ -82,7 +85,7 @@ def bytes2str_in_dicts(
8285
def load_linked_file(
8386
base_url: urllib.parse.ParseResult, link: str, is_import: bool = False
8487
) -> Tuple[Any, urllib.parse.ParseResult]:
85-
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py"""
88+
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py ."""
8689
new_url = resolved_path(base_url, link)
8790

8891
if new_url.scheme in ["file://", ""]:
@@ -123,7 +126,7 @@ def load_linked_file(
123126
def normalize_to_map(
124127
obj: Union[List[Any], Dict[str, Any]], key_field: str
125128
) -> Dict[str, Any]:
126-
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py"""
129+
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py ."""
127130
if isinstance(obj, dict):
128131
return deepcopy(obj)
129132
elif isinstance(obj, list):
@@ -144,7 +147,7 @@ def normalize_to_map(
144147
def normalize_to_list(
145148
obj: Union[List[Any], Dict[str, Any]], key_field: str, value_field: Optional[str]
146149
) -> List[Any]:
147-
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py"""
150+
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py ."""
148151
if isinstance(obj, list):
149152
return deepcopy(obj)
150153
elif isinstance(obj, dict):
@@ -165,14 +168,18 @@ def resolved_path(
165168
base_url: urllib.parse.ParseResult, link: str
166169
) -> urllib.parse.ParseResult:
167170
"""
168-
Given a base_url ("this document") and a link ("string in this document")
169-
return a new url (urllib.parse.ParseResult) that allows us to retrieve the
170-
linked document. This function will
171+
Derive a resolved path.
172+
173+
This function will
171174
1. Resolve the path, which means dot and double dot components are resolved
172175
2. Use the OS appropriate path resolution for local paths, and network
173-
appropriate resolution for network paths
176+
appropriate resolution for network paths
174177
175178
From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py
179+
180+
:param base_url: "this document"
181+
:param link: "string in this document"
182+
:returns: new URL that allows us to retrieve the linked document
176183
"""
177184
link_url = urllib.parse.urlparse(link)
178185
# The link will always Posix

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Modules
1313
:maxdepth: 2
1414
:caption: Contents:
1515

16+
autoapi/index
1617

1718
Included Utility Programs
1819
=========================

0 commit comments

Comments
 (0)