ice_shelf_state_and_fate.entrypoint_helpers
Helper functions for entrypoint scripts.
Helps to optimise loading time by avoiding imports of large dependencies from helper_functions.py.
Module Attributes
A local path or web URL, represented as a string. |
Functions
|
Validate that the provided path is either a valid local path or a web URL. |
- type ZarrType
A local path or web URL, represented as a string.
Validated by
path_or_web_url_validator().
- path_or_web_url_validator(type_: object, path_or_url: Path | str) str
Validate that the provided path is either a valid local path or a web URL.
NOTE: Path(“”) resolves to the current directory (“.”) - which is considered a valid path.
- Parameters:
type (object) – The type of the argument being validated - unused, purely required for cyclopts validator compatibility.
path_or_url (Path | str) – The candidate path or URL to validate.
- Returns:
The validated path or URL as a string.
- Return type:
str
- Raises:
ValueError – If the provided path is neither a valid local path nor a web URL like string.