:py:mod:`medcat.utils.saving.envsnapshot` ========================================= .. py:module:: medcat.utils.saving.envsnapshot Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: medcat.utils.saving.envsnapshot.get_direct_dependencies medcat.utils.saving.envsnapshot._update_installed_dependencies_recursive medcat.utils.saving.envsnapshot.get_transitive_deps medcat.utils.saving.envsnapshot.get_installed_packages medcat.utils.saving.envsnapshot.get_environment_info Attributes ~~~~~~~~~~ .. autoapisummary:: medcat.utils.saving.envsnapshot.logger medcat.utils.saving.envsnapshot.ENV_SNAPSHOT_FILE_NAME medcat.utils.saving.envsnapshot.INSTALL_REQUIRES_FILE_PATH medcat.utils.saving.envsnapshot.INSTALL_REQUIRES_FILE_PATH_PIP .. py:data:: logger .. py:data:: ENV_SNAPSHOT_FILE_NAME :value: 'environment_snapshot.json' .. py:data:: INSTALL_REQUIRES_FILE_PATH .. py:data:: INSTALL_REQUIRES_FILE_PATH_PIP .. py:function:: get_direct_dependencies() Get the set of direct dependency names. The current implementation reads install_requires.txt for dependenceies, removes comments, whitespace, quotes; removes the versions and returns the names as a set. :Returns: **Set[str]** -- The set of direct dependency names. .. py:function:: _update_installed_dependencies_recursive(gathered, package) .. py:function:: get_transitive_deps(direct_deps) Get the transitive dependencies of the direct dependencies. :param direct_deps: List of direct dependencies. :type direct_deps: List[str] :Returns: **List[List[str]]** -- The list of dependency names along with their versions. .. py:function:: get_installed_packages() Get the installed packages and their versions. :Returns: **List[List[str]]** -- List of lists. Each item contains of a dependency name and version. .. py:function:: get_environment_info(include_transitive_deps = True) Get the current environment information. :param include_transitive_deps: Whether to include transitive dependencies. Defaults to True. :type include_transitive_deps: bool This includes dependency versions, the OS, the CPU architecture and the python version. :Returns: **Dict[str, Any]** -- _description_