Skip to content

Commit

Permalink
readthedocs: install graphviz
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Jan 31, 2023
1 parent 0bbb82c commit b0838ea
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 22 deletions.
9 changes: 7 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ sphinx:
# Optionally build your docs in additional formats such as PDF and ePub
formats: all

# Optionally set the version of Python and requirements required to build your docs
build:
os: ubuntu-22.04
tools:
python: "3.11"
apt_packages:
- graphviz

python:
version: 3.7
install:
- requirements: docs/requirements.txt
- method: pip
Expand Down
8 changes: 4 additions & 4 deletions cwl_utils/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@


class ArrayMissingItems(BaseException):
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py"""
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py ."""


class JavascriptException(Exception):
pass


class MissingKeyField(BaseException):
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py"""
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py ."""


class MissingTypeName(BaseException):
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py"""
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py ."""


class RecordMissingFields(BaseException):
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py"""
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py ."""


class SubstitutionError(Exception):
Expand Down
1 change: 0 additions & 1 deletion cwl_utils/expression_refactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ def run(args: List[str]) -> int:

def refactor(args: argparse.Namespace) -> int:
"""Primary processing loop."""

return_code = 0
yaml = YAML(typ="rt")
yaml.preserve_quotes = True # type: ignore[assignment]
Expand Down
8 changes: 2 additions & 6 deletions cwl_utils/image_puller.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ def _run_command_pull(cmd_pull: List[str]) -> None:


class DockerImagePuller(ImagePuller):
"""
Pull docker image with Docker
"""
"""Pull docker image with Docker."""

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


class SingularityImagePuller(ImagePuller):
"""
Pull docker image with Singularity
"""
"""Pull docker image with Singularity."""

CHARS_TO_REPLACE = ["/"]
NEW_CHAR = "_"
Expand Down
2 changes: 2 additions & 0 deletions cwl_utils/pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# Copyright (c) 2020 Seven Bridges
# See https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/LICENSE
"""
CWL document packing functions.
The link resolution is as follows:
We always have two components: the base and the link
Expand Down
2 changes: 1 addition & 1 deletion cwl_utils/schemadef.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright (c) 2020 Seven Bridges
# See https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/LICENSE
"""
Valid forms of user defined types stored in external file
Valid forms of user defined types stored in external file.
A single dictionary (tests/types/singletype.yml)
A list of dictionaries (e.g. tests/types/recursive.yml)
Expand Down
23 changes: 15 additions & 8 deletions cwl_utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@


def _is_github_symbolic_link(base_url: urllib.parse.ParseResult, contents: str) -> bool:
"""Look for remote path with contents that is a single line with no new
"""
Test if link is a GitHub style symbolic link.
Look for remote path with contents that is a single line with no new
line with an extension.
https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py
Expand Down Expand Up @@ -82,7 +85,7 @@ def bytes2str_in_dicts(
def load_linked_file(
base_url: urllib.parse.ParseResult, link: str, is_import: bool = False
) -> Tuple[Any, urllib.parse.ParseResult]:
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py"""
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py ."""
new_url = resolved_path(base_url, link)

if new_url.scheme in ["file://", ""]:
Expand Down Expand Up @@ -123,7 +126,7 @@ def load_linked_file(
def normalize_to_map(
obj: Union[List[Any], Dict[str, Any]], key_field: str
) -> Dict[str, Any]:
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py"""
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py ."""
if isinstance(obj, dict):
return deepcopy(obj)
elif isinstance(obj, list):
Expand All @@ -144,7 +147,7 @@ def normalize_to_map(
def normalize_to_list(
obj: Union[List[Any], Dict[str, Any]], key_field: str, value_field: Optional[str]
) -> List[Any]:
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py"""
"""From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py ."""
if isinstance(obj, list):
return deepcopy(obj)
elif isinstance(obj, dict):
Expand All @@ -165,14 +168,18 @@ def resolved_path(
base_url: urllib.parse.ParseResult, link: str
) -> urllib.parse.ParseResult:
"""
Given a base_url ("this document") and a link ("string in this document")
return a new url (urllib.parse.ParseResult) that allows us to retrieve the
linked document. This function will
Derive a resolved path.
This function will
1. Resolve the path, which means dot and double dot components are resolved
2. Use the OS appropriate path resolution for local paths, and network
appropriate resolution for network paths
appropriate resolution for network paths
From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py
:param base_url: "this document"
:param link: "string in this document"
:returns: new URL that allows us to retrieve the linked document
"""
link_url = urllib.parse.urlparse(link)
# The link will always Posix
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Modules
:maxdepth: 2
:caption: Contents:

autoapi/index

Included Utility Programs
=========================
Expand Down

0 comments on commit b0838ea

Please sign in to comment.