cwl_utils.utils
Miscellaneous utility functions.
Attributes
Functions
|
Convert any present byte string to unicode string, inplace. |
|
From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py . |
|
From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py . |
|
From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py . |
|
Derive a resolved path. |
Confirm if the version of Singularity install supports the --userns flag. |
|
|
Shortcut. |
Module Contents
- cwl_utils.utils.fast_yaml
- cwl_utils.utils.bytes2str_in_dicts(inp)
Convert any present byte string to unicode string, inplace.
input is a dict of nested dicts and lists
- cwl_utils.utils.load_linked_file(base_url, link, is_import=False)
From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py .
- Parameters:
base_url (urllib.parse.ParseResult)
link (str)
is_import (bool)
- Return type:
Tuple[Any, urllib.parse.ParseResult]
- cwl_utils.utils.normalize_to_map(obj, key_field)
From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py .
- cwl_utils.utils.normalize_to_list(obj, key_field, value_field)
From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py .
- cwl_utils.utils.resolved_path(base_url, link)
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
From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py
- Parameters:
base_url (urllib.parse.ParseResult) – “this document”
link (str) – “string in this document”
- Returns:
new URL that allows us to retrieve the linked document
- Return type:
- cwl_utils.utils.singularity_supports_userns()
Confirm if the version of Singularity install supports the –userns flag.
- Return type: