pollination_dsl.common module

pollination_dsl.common.camel_to_snake(name: str) str

Change name from CamelCase to snake-case.

pollination_dsl.common.get_docker_image_from_dependency(package, dependency, owner, alias=None)

Get a docker image id from package information.

Parameters:
  • package – Name of the package (e.g. pollination-honeybee-radiance)

  • dependency – Name of the dependency (e.g. honeybee-radiance)

  • owner – The account owner for docker image

  • alias – An alias name for the docker image. This input is useful in cases that docker image name (e.g. ladybug) is different from the dependency name (e.g. ladybug-core).

Returns:

0.5.2)

Return type:

str – docker image id (e.g. ladybugtools/honeybee-radiance

pollination_dsl.common.get_requirement_version(package_name, dependency_name)

Get assigned version to a dependency in package requirements.

pollination_dsl.common.import_module(name: str, pull=True)

Import a module by name.

This function only works for pollination namespace packages. If the module is not installed and pull is set to True it will try to pull the package from PyPI.

pollination_dsl.common.name_to_pollination(name: str) str

Add a pollination- in front of the name.