ophth_ds_utils
Utility functions for interacting with ophthalmology datasources.
Module
Functions
make_path_absolute
def make_path_absolute( file_path: Union[str, os.PathLike], parent_folder: Union[str, os.PathLike],) ‑> pathlib.Path:Makes a relative file path absolute with respect to a parent folder.
Does not change an already absolute file path.
make_path_relative
def make_path_relative( file_path: Union[str, os.PathLike], parent_folder: Union[str, os.PathLike],) ‑> pathlib.Path:Makes an absolute file path relative with respect to a parent folder.
Does not change an already relative file path.
This function normalizes paths to handle mapped drives vs UNC paths equivalently on Windows, ensuring that paths referring to the same location are treated as equivalent.
Classes
NoParserForFileExtension
class NoParserForFileExtension(*args, **kwargs):Indicates no parser was specified for a file extension.
Ancestors
- builtins.KeyError
- builtins.LookupError
- builtins.Exception
- builtins.BaseException