qip.definition

qip.definition.NAMESPACE = 'library'

Common namespace for all Wiz definition.

qip.definition.export(path, package_mapping, output_path, editable_mode=False, custom_definition=None, existing_definition=None)[source]

Export Wiz definition to path for package mapping.

Parameters:
  • path – destination path for the Wiz definition.
  • package_mapping – mapping of the python package built as returned by qip.package.install().
  • output_path – root destination path for Python packages installation.
  • editable_mode – indicate whether the Python package location should target the source installation package. Default is False.
  • custom_definitionwiz.definition.Definition instance to update as returned by fetch_custom(). Default is None, which means that a default definition will be created from package mapping only.
  • existing_definitionwiz.definition.Definition instance to extract additional variants from as returned by fetch_existing(). Default is None which means that no additional variants will be added to new definition exported.
qip.definition.fetch_custom(package_mapping)[source]

Retrieve Wiz definition from package mapping installed.

Return the Wiz definition extracted from a package_data/wiz.json file found within the package installation path.

If extra requirement keywords are called, Wiz definition containing each keyword will also be fetched and merged together into one definition.

Parameters:package_mapping – mapping of the python package built as returned by qip.package.install().
Raises:wiz.exception.WizError – if the Wiz definition found is incorrect.
Returns:wiz.definition.Definition instance fetched, or None if no definition was found.
qip.definition.fetch_existing(package_mapping, definition_mapping, namespace=None)[source]

Retrieve corresponding Wiz definition in definition mapping.

Parameters:
Returns:

wiz.definition.Definition instance fetched, or None if no definition was found.

qip.definition.create(package_mapping, output_path, editable_mode=False, additional_variants=None)[source]

Create Wiz definition from package mapping.

Parameters:
  • package_mapping – mapping of the python package built as returned by qip.package.install().
  • output_path – root destination path for Python packages installation.
  • editable_mode – indicate whether the Python package location should target the source installation package. Default is False.
  • additional_variants – None or list of variant mappings that should be added to the definition created. Default is None.
Returns:

wiz.definition.Definition instance created.

qip.definition.update(definition, package_mapping, output_path, editable_mode=False, additional_variants=None)[source]

Update definition from package mapping.

Parameters:
  • definitionwiz.definition.Definition instance as returned by fetch_custom().
  • package_mapping – mapping of the python package built as returned by qip.package.install().
  • output_path – root destination path for Python packages installation.
  • editable_mode – indicate whether the Python package location should target the source installation package. Default is False.
  • additional_variants – None or list of variant mappings that should be added to the definition updated. Default is None.
Returns:

Updated wiz.definition.Definition instance.