rmellipse.workflows.local_interfaces ==================================== .. py:module:: rmellipse.workflows.local_interfaces Classes ------- .. autoapisummary:: rmellipse.workflows.local_interfaces.CacheInterface rmellipse.workflows.local_interfaces.EnvInterface Module Contents --------------- .. py:class:: CacheInterface(cache_dir: pathlib.Path) Interface for a local cache. .. py:attribute:: cache_dir .. py:method:: rm_cached_release(host: str, workspace: str, release_title: str) Remove a cached release. :param host: Name of host :type host: str :param workspace: Name of workspace. :type workspace: str :param release_title: Name of release title. :type release_title: str .. py:method:: get_cached_release_dir(host: str, workspace: str, release_title: str) -> pathlib.Path Get a directory in the local cache for a given release. :param cache_dir: _description_ :type cache_dir: str :param host: _description_ :type host: str :param workspace: _description_ :type workspace: str :param release: _description_ :type release: str :returns: _description_ :rtype: Path .. py:method:: in_cache(host: str, workspace: str, release_title: str) -> bool Check if a release exists in the cache. :param host: _description_ :type host: str :param workspace: _description_ :type workspace: str :param release_title: _description_ :type release_title: str :returns: _description_ :rtype: bool .. py:class:: EnvInterface(envdir: pathlib.Path) Interface with an Enviornment. .. py:attribute:: envdir .. py:attribute:: packages_dir .. py:method:: rm_broken_packages() Remove any broken packages in the environment .. py:method:: installed_in_packages() -> list[str] Get a list of installed packages :returns: _description_ :rtype: list[str] .. py:method:: installed_in_registry() -> list[str] Get a list of releases installed in the registry :returns: _description_ :rtype: list[str] .. py:method:: release_reg_dir(release_title: str) Dataset registry directory for a release. :param release_title: _description_ :type release_title: str :returns: _description_ :rtype: _type_ .. py:method:: release_package_dir(release_title: str) Package directory for a release. :param release_title: _description_ :type release_title: str :returns: _description_ :rtype: _type_ .. py:method:: in_env(release_title: str) Determine if a release is installed in the environment. :param release_title: _description_ :type release_title: str :returns: _description_ :rtype: _type_ .. py:method:: rm_release(release_title: str) Remove a release from the environment. :param release_title: _description_ :type release_title: str .. py:method:: with_suffixes_of(path: str | pathlib.Path, use_suffixes_of: str | pathlib.Path) -> pathlib.Path :staticmethod: Replace name with the suffixes of use_suffixes_of. :param name: string or path :type name: str | Path :param use_suffixes_of: String or path. :type use_suffixes_of: str | Path :returns: Updated path :rtype: Path .. py:method:: install_files_namespace(name: str, files: dict[str | pathlib.Path], resolve_relative_to: pathlib.Path) .. py:method:: install_release(release_record: dict, workspace: str, host: str, cache: CacheInterface) Install a release into the environment. :param release_record: _description_ :type release_record: dict :param workspace: _description_ :type workspace: str :param host: _description_ :type host: str :param cache: _description_ :type cache: CacheInterface .. py:method:: make_registry(release_record: dict, cache_release_dir: pathlib.Path, use_versioned_name: bool = True) Make a registry that symbolically links to datasets in the cache. Only symbolic links to files are made, directory structures are copied. :param release_record: The record of the of the package being linked too. :type release_record: dict :param cache: The cache of the package being linked too. It is assumed to already be downloaded. :type cache: Path :param env: The data environment directory. :type env: Path :param use_versioned_name: If True, used the versioned name when making the registry folder. :type use_versioned_name: bool