qip.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_definition –
wiz.definition.Definitioninstance to update as returned byfetch_custom(). Default is None, which means that a default definition will be created from package mapping only. - existing_definition –
wiz.definition.Definitioninstance to extract additional variants from as returned byfetch_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.jsonfile 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.Definitioninstance fetched, or None if no definition was found.See also
-
qip.definition.fetch_existing(package_mapping, definition_mapping, namespace=None)[source]¶ Retrieve corresponding Wiz definition in definition mapping.
Parameters: - package_mapping – mapping of the python package built as returned by
qip.package.install(). - definition_mapping – mapping regrouping all available definitions as
returned by
wiz.fetch_definition_mapping(). - namespace – Namespace of the definition to fetch. Default is
NAMESPACE.
Returns: wiz.definition.Definitioninstance fetched, or None if no definition was found.- package_mapping – mapping of the python package built as returned by
-
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.Definitioninstance created.- package_mapping – mapping of the python package built as returned by
-
qip.definition.update(definition, package_mapping, output_path, editable_mode=False, additional_variants=None)[source]¶ Update definition from package mapping.
Parameters: - definition –
wiz.definition.Definitioninstance as returned byfetch_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.Definitioninstance.- definition –