ladybug_rhino.versioning.change module

Functions for changing the installed version of Ladybug Tools.

ladybug_rhino.versioning.change.change_installed_version(version_to_install=None)[source]

Change the currently installed version of Ladybug Tools.

This requires an internet connection and will update all core libraries and Grasshopper components to the specified version_to_install.

Parameters

version_to_install – An optional text string for the version of the LBT plugin to be installed. The input should contain only integers separated by two periods (eg. 1.0.0). If None, the Ladybug Tools plugin shall be updated to the latest available version. The version specified here does not need to be newer than the current installation and can be older but grasshopper plugin versions less than 0.3.0 are not supported. A list of all versions of the Grasshopper plugin can be found here - https://github.com/ladybug-tools/lbt-grasshopper/releases

ladybug_rhino.versioning.change.download_repo_github(repo, target_directory, version=None)[source]

Download a repo of a particular version from from github.

Parameters
  • repo – The name of a repo to be downloaded (eg. ‘lbt-grasshopper’).

  • target_directory – The directory where the library should be downloaded.

  • version – The version of the repository to download. If None, the most recent version will be downloaded. (Default: None)

ladybug_rhino.versioning.change.full_access_permission(directory)[source]

Give a directory any all of its files full permissions.

Parameters

directory – A directory containing for which full access will be given.

ladybug_rhino.versioning.change.get_config_dict()[source]

Get a dictionary of the ladybug configurations.

This is needed in order to put the configurations back after update.

ladybug_rhino.versioning.change.get_gem_directory()[source]

Get the directory where measures distributed with Ladybug Tools are installed.

ladybug_rhino.versioning.change.get_standards_directory()[source]

Get the directory where Honeybee standards are installed.

ladybug_rhino.versioning.change.latest_github_version(repo, target_directory)[source]

Get the latest version tag of a particular repo on github.

Parameters
  • repo – The name of a repo to be downloaded (eg. ‘lbt-grasshopper’).

  • target_directory – The directory where the HTML Tags page should be downloaded.

ladybug_rhino.versioning.change.parse_lbt_gh_versions(lbt_gh_folder)[source]

Parse versions of compatible libs from a clone of the lbt-grasshopper repo.

Parameters

lbt_gh_folder – Path to the clone of the lbt-grasshopper repo

Returns

A dictionary of library versions formatted like so (but with actual version numbers in place of ‘0.0.0’).

{

‘lbt-dragonfly’ = ‘0.0.0’, ‘ladybug-rhino’ = ‘0.0.0’, ‘lbt-recipes’ = ‘0.0.0’, ‘honeybee-openstudio-gem’ = ‘0.0.0’, ‘lbt-measures’ = ‘0.0.0’, ‘honeybee-standards’ = ‘0.0.0’, ‘honeybee-energy-standards’ = ‘0.0.0’, ‘ladybug-grasshopper’: ‘0.0.0’, ‘honeybee-grasshopper-core’: ‘0.0.0’, ‘honeybee-grasshopper-radiance’: ‘0.0.0’, ‘honeybee-grasshopper-energy’: ‘0.0.0’, ‘dragonfly-grasshopper’: ‘0.0.0’, ‘ladybug-grasshopper-dotnet’: ‘0.0.0’

}

ladybug_rhino.versioning.change.remove_dist_info_files(directory)[source]

Remove all of the PyPI .dist-info folders from a given directory.

Parameters

directory – A directory containing .dist-info folders to delete.

ladybug_rhino.versioning.change.set_config_dict(config_dict)[source]

Set the configurations using a dictionary.

Parameters

config_dict – A dictionary of configuration paths.

ladybug_rhino.versioning.change.update_libraries_pip(python_exe, package_name, version=None, target=None)[source]

Change python libraries to be of a specific version using pip.

Parameters
  • python_exe – The path to the Python executable to be used for installation.

  • package_name – The name of the PyPI package to install.

  • version – An optional string for the version of the package to install. If None, the library will be updated to the latest version with -U.

  • target – An optional target directory into which the package will be installed.

ladybug_rhino.versioning.change.update_requirements_version(uo_folder, lbt_version)[source]

Update the version of lbt_grasshopper in the user object requirements.txt file.

Parameters
  • uo_folder – The directory where the user objects currently exist.

  • lbt_version – The version of LBT-grasshopper to be updated in the requirements.txt file.