Release Notes¶
3.7.0¶
27 May 2021- changed
command-lineUpdated
wiz run
andwiz use
subcommands to promotereturncode
attribute when a command is being executed within a resolved context. - changed
Updated
wiz.spawn.execute()
to returnreturncode
attribute. - fixed
Fixed
wiz.graph.Graph
to improve logic determining whether the conditions of a node are fulfilled. - fixed
Updated
wiz.logging.initiate()
to fix colored formatting for Python 2.7. - changed
Updated
wiz.utility.combine_command()
to make the output slightly more readable when escaping single quotes within single quoted strings. It now uses'\''
instead of'"'"'
as automatically returned byshlex.quote()
.
3.6.4¶
17 December 2020- fixed
Updated
wiz.logging.initiate()
to temporarily alter umask before creating the logging path instead of changing its mode to0o777
afterward. It prevent error to be raised if the new permissions cannot be applied.
3.6.3¶
17 December 2020- fixed
Updated
wiz.logging.initiate()
to change the mode of logging path to0o777
. Previously, it would sometimes lock the folder for other users depending on the umask.
3.6.2¶
12 November 2020- fixed
Fixed version order when listing packages and commands with the command line tool. Previously, it would sometimes sort versions in incoherent order.
- new
Added
wiz.utility.compare_versions()
to sort a list of version representation following logic defined in PEP 440.
3.6.1¶
2 November 2020- fixed
Updated
wiz.logging.initiate()
to ensure that default loggingPATH
exists so the file handler can be configured without raising an error.
3.6.0¶
1 November 2020- new
Added
wiz.logging.initiate()
to configure logging for the command line tool using adefault configuration
which can be modified from the Wiz configuration.See also
- changed
Updated
wiz analyze
to make results more condensed and easier to use for debugging.>>> wiz analyze Metrics Values --------------------- ------- Total 120 Errors 0 Warnings 2 With version dropdown 1 ≥ 5 combination(s) 1 ≥ 1 second(s) 0 Max resolution time 0.5484s Max combinations 12 Max version dropdown 5
Expanded results can be displayed by using
wiz analyze -V/--verbose
. - changed
Removed
wiz.validate_definition()
as it is using unsafe logic which modifies the logging configuration outside of the main program. This feature will be accessible fromwiz analyze
command only.
3.5.2¶
30 October 2020- fixed
Updated
wiz.graph.Combination.discover_combinations()
to always copy the combination before attempting to downgrade conflicting package versions, so that it can be safely reused to downgrade other conflicting package versions if necessary.
3.5.1¶
29 October 2020- fixed
Updated
wiz.graph._combined_requirements()
to return requirement including combined variant identifiers from incoming parents. - fixed
Updated
wiz.graph.Graph.downgrade_versions()
to preserve the same variant identifier when downgrading versions.
3.5.0¶
29 October 2020- changed
Updated
wiz.graph
to make the following functions private: - changed
Updated
wiz.graph._generate_variant_permutations()
to discard permutations containing variant nodes with conflicting requirements. Previously, the resolver had to consider all conflicting permutations before attempting todiscover
new combinations bydowngrading
the versions of conflicting nodes. - changed
Updated
wiz.graph.Graph.relink_parents()
to record errors asGraphConflictsError
exception which can be raised during thevalidation
of a combination. This allows the resolver todiscover
new combinations bydowngrading
the versions of the conflicting nodes involved if necessary.
3.4.0¶
23 October 2020- changed
Updated
wiz.resolve_context()
logic to only guess namespaces from initial requirements without taking implicit packages into account. - changed
Updated
wiz.graph.Resolver.compute_packages()
andwiz.graph.Graph
to take initial namespace counter as a keyword argument. This is necessary as the logic handling namespace frequency counting from initial requirements have been moved upstream. - new
Added
wiz.utility.compute_namespace_counter()
to compute a namespace frequency counter from a list of requirements.
3.3.1¶
22 October 2020- fixed
Reverted
wiz.exception.DefinitionsExist
to using definition labels instead of definitions instances for convenience as installer plugin might not have access to the entire definition data when raising the error.
3.3.0¶
21 October 2020- new
Added the following commands to limit the maximum number of attempts to resolve a context before raising an error:
- new
Added the following commands to limit the maximum number of combinations which can be generated from conflicting variants during the context resolution process:
- changed
Updated
wiz.resolve_context()
to add keyword arguments which provide a maximum number of attempts to resolve a context before raising an error, and a maximum number of combinations which can be generated from conflicting variants during the context resolution process. - changed
Updated
wiz.graph.Resolver
constructor to add keyword arguments which provide a maximum number of resolution attempts before raising an error, and a maximum number of combinations which can be generated from conflicting variants. - changed
Refactored
wiz.graph
to provide a better separation of concerns between stages of the resolution process.The
Resolver
class handles the creation of the initialGraph
and the extraction and management ofCombination
instances. The newly addedCombination
class handles the version conflict resolution, the graph validation and the packages extraction. - changed
Removed the following functions to improve code readability and move logic into different callbacks:
Removed wiz.graph.generate_variant_combinations()
Logic moved to Removed wiz.graph.trim_unreachable_from_graph()
wiz.graph.trim_invalid_from_graph()
Logic moved to Removed wiz.graph.updated_by_distance()
wiz.graph.extract_conflicting_nodes()
Logic moved to Removed wiz.graph.validate()
Logic moved to Removed wiz.graph.extract_ordered_packages()
Logic moved to - changed
Removed
wiz.graph.relink_parents()
and added logic towiz.graph.Graph.relink_parents()
. This change was necessary to record potential relinking error within the graph instead of raising an exception immediately as the node bearing the error might be removed during the conflict resolution process. - new
Added
wiz.graph.generate_variant_permutations()
to yield all possible permutations between variant groups in an optimized order. It now checks the requirement compatibility between each variant node to prevent wasting time in combinations that can not be resolved, hence providing a major performance boost for definition containing a lot of variants. - new
Added
wiz.graph.compute_conflicting_matrix()
to compute compatibility between each variant node. - changed
Moved
wiz.graph.sanitize_requirement()
towiz.utility.sanitize_requirement()
and improved logic to prevent confusion when the package does not contain a namespace. - new
Added
wiz.utility.match()
to check whether aRequirement
instance is compatible with awiz.package.Package
instance. This logic was previously included inwiz.graph.Graph.find()
. - new
Added
wiz.utility.extract_namespace()
to retrieve a namespace from aRequirement
instance. This logic was previously included inwiz.graph.Graph.find()
. - new
Added
wiz.utility.check_conflicting_requirements()
to check whether twowiz.package.Package
instances contain conflicting requirements. - fixed
Updated
wiz.graph.Resolver
to prevent discarding graph combinations containing a node which has been flagged as conflict or error in a previous iteration. This logic was flawed as these nodes could be removed during the conflict resolution process, leading to a false negative evaluation of a graph combination. - fixed
Updated
wiz.graph.Combination.resolve_conflicts()
to better handle resolution of circular conflicts. - fixed
Updated
wiz.graph.Resolver.discover_combinations()
to prune unreachable nodes from the graph after downgrading node versions. Previously, variant conflicts could be detected from nodes which had been removed from the graph. - changed
Updated following exception names for consistency:
wiz.exception.InvalidVersion
→wiz.exception.VersionError
wiz.exception.InvalidRequirement
→wiz.exception.RequirementError
wiz.exception.IncorrectSystem
→wiz.exception.CurrentSystemError
wiz.exception.IncorrectDefinition
→wiz.exception.DefinitionError
- new
Added new exceptions inheriting from
wiz.exception.GraphResolutionError
to better handle flow of data: - changed
Updated
wiz.package.Package
constructor to raise an error if the variant index is missing or incorrect. - fixed
Updated monkey patching of
packaging.requirements.Requirement
to allow for multiple namespaces separated by two colons (e.g.name1::name2::foo
).
3.2.5¶
15 September 2020- fixed
Fixed
wiz.graph.Graph.find()
to prevent returning nodes with a variant identifier not matching theextras
attribute of the incoming requirement. - fixed
Updated
wiz.graph.Resolver
to raise a more palatable exception message when graph combination cannot be resolved because packages from a single variant group have requirement conflicts. - new
Added
wiz.graph.Graph.variant_identifiers()
to return all variant identifiers from the same definition identifier within the graph.
3.2.4¶
12 September 2020- new
Added link to Google Group discussion page.
3.2.3¶
11 September 2020- fixed
Updated
wiz.command_line.display_definition()
to display definition path and registry path when usingwiz view
command. - fixed
Updated
wiz.history
to include definition path and registry path to history dump when serializing instances ofDefinition
.
3.2.2¶
9 September 2020- fixed
Updated
wiz.definition.Definition.ordered_data()
to sort all dictionaries ascollections.OrderedDict
instances in order to get consistent results.
3.2.1¶
8 September 2020- fixed
Updated
wiz.utility.compute_file_name()
to prevent including colons in the file name if the definition contains multiple namespaces (e.g. “foo::bar”). Namespace separator symbols (::
) are now replaced by hyphens.
3.1.2¶
27 August 2020- fixed
Updated
wiz.command_line._display_environ_from_context()
to stringify truncatedWIZ_CONTEXT
value in order to prevent error when displaying environment variables.
3.1.1¶
27 August 2020- fixed
Updated
wiz.spawn.shell()
to encode strings into “utf-8” before writing into the temporary file used for shell aliases. Previously, it would raise an error on Python 3.7 astempfile.NamedTemporaryFile()
only accept byte-like objects.See also
3.1.0¶
26 August 2020- changed
command-lineRenamed
wiz install --registry
towiz install --output
to better differentiate the command fromwiz --registry
. - new
command-lineAdded short option
-f
to overwrite output when installing definitions and when editing a definition: - changed
command-lineRenamed
wiz freeze -f/--format
towiz freeze -F/--format
to prevent confusion as the short option-f
is used for overwriting outputs. - changed
command-lineRemoved the
wiz analyze -f/--filter
options and make it into a non-required positional option instead to prevent confusion as the short option-f
is used for overwriting outputs.# Analyze all definitions whose identifiers matched "foo" or "bar" >>> wiz analyze -f "foo" -f "bar"
# Analyze all definitions whose identifiers matched "foo" or "bar" >>> wiz analyze "foo" "bar"
- changed
Updated the following modules to add compatibility with python 3.7 and 3.8:
- changed
Updated
wiz.validator
to use custom definition validation instead of the jsonschema library which is based on JSON Schema validation as it was hindering the performance when creating an instance ofwiz.definition.Definition
.Removed
wiz.validator.yield_definition_errors()
and addedwiz.validator.validate_definition()
to perform equivalent tests in shorter time.Here is a benchmark with average speed when loading a definition:
Examples jsonschema custom validation minimal definition ~199us ~63us simple definition ~2ms ~1.6ms complex definition ~4.2s ~3.3s (A complex definition contains 100 variants, 100 requirements and 100 environment variables.)
- changed
Updated
wiz.definition.Definition
construction to usewiz.validator.validate_definition()
. - changed
Updated
wiz.definition.Definition
construction to provide an option to prevent usingcopy.deepcopy()
on input data mapping to speed up instantiation whenever necessary:>>> Definition({"identifier": "foo"}, copy_data=False)
By default, “copy_data” is set to True as it can cause unexpected issues when input data is being mutated:
>>> data = {"identifier": "foo"} >>> definition = wiz.definition.Definition(data, copy_data=False) >>> print(definition.identifier) "foo" >>> del data["identifier"] >>> print(definition.identifier) KeyError: 'identifier'
- changed
Updated
wiz.definition.load()
to not copy input data mapping as it hindered performance.Here is a benchmark with average speed when loading a definition:
Examples with copy without copy minimal definition ~199us ~177us simple definition ~2ms ~1.8ms complex definition ~4.2s ~2.7s (A complex definition contains 100 variants, 100 requirements and 100 environment variables.)
- changed
Updated
wiz.definition.Definition
andwiz.package.Package
constructions to not perform the following conversions as it hindered performance:- Convert Version value into
Version
instance. - Convert Requirements and
Conditions values into
Requirement
instances. - Convert Requirements and
Conditions values within Variants
into
Requirement
instances.
Instead, these attributes will be converted and cached the first time they are accessed.
Here is a benchmark with average speed when loading a definition:
Examples with conversion without conversion minimal definition ~199us ~180us simple definition ~2ms ~300us complex definition ~4.2s ~156ms (A complex definition contains 100 variants, 100 requirements and 100 environment variables.)
- Convert Version value into
- changed
Updated
wiz.definition.Definition
construction to simplify logic. It does not inherit fromcollections.Mapping
anymore and does not require from registry and definition location to be included in the mapping.>>> Definition({ ... "identifier": "foo", ... "definition-location": "/path/to/definition.json", ... "registry": "/path/to/registry", ... })
>>> Definition( ... {"identifier": "foo"}, ... path="/path/to/definition.json", ... registry_path="/path/to/registry", ... )
This prevents having to sanitize the definition data before exporting.
- changed
Removed
wiz.definition.Definition.sanitized()
which was previously used to remove the “registry” and “definition-location” keywords from data definition as it is not necessary anymore. - changed
Updated
wiz.package.Package
construction to simplify logic and optimize performance. It does not inherit fromcollections.Mapping
anymore and useswiz.definition.Definition
keywords instead of copying data.Instance of
wiz.package.Package
can not mutate its content anymore. - changed
Removed
wiz.mapping
as logic has been moved intowiz.definition.Definition
. - changed
Updated
wiz.package.Package.identifier()
to prepend Namespace to ensure that a unique identifier is always used. As a result,wiz.package.Package.qualified_identifier()
has been removed. - changed
Updated
wiz.graph.Graph.update_from_requirements()
to raise a palatable error when a dependent definition uses an invalid requirement as Requirements or Conditions attributes.Previously, these attributes were sanitized when instantiating the
wiz.definition.Definition
. - fixed
Fixed
wiz.graph.Resolver
to ensure that conflicted nodes are always sorted in ascending order of distance from theroot
level of the graph.Previously, conflicting nodes would not be sorted properly when new packages are added to the graph during the conflict resolution process, resulting in potentially unresolvable conflicts of packages that should have been removed before.
- fixed
Fixed
wiz.utility.extract_version_ranges()
to sort specifiers properly for deterministic results.Previously, it would sometimes fail to update minimal and maximum versions of the range in particular conditions.
- changed
Updated
wiz.utility.compute_file_name()
to prepend the Namespace value when creating a JSON file name from an instance ofwiz.definition.Definition
. Previously, name clashes were possible when exporting two definitions with the same Identifier, Version and System Constraint into the same registry. - changed
Renamed following functions to use American spelling for consistency:
wiz.environ.sanitise()
→wiz.environ.sanitize()
wiz.filesystem.sanitise_value()
→wiz.filesystem.sanitize_value()
- changed
Updated all docstrings to use Sphinx format.
3.0.0¶
5 August 2020- changed
Project name has been changed to
wiz-env
to guarantee a unique name on Pypi. - new
Added
wiz.config
to handle TOML configuration and plugins to customize Wiz default values and callbacks.See also
- new
Added default plugin to register installation callback to deploy package definitions to a registry path.
See also
- new
Added default plugin to initialize environment variables.
See also
- changed
Removed
wiz.install_definitions()
andwiz.registry.install_to_vcs()
as the concept of Local and VCS registry has been removed.Default plugin only install package definition to a registry path.
See also
Custom plugin can be used to extend the installation logic.
- changed
Updated Command line to use configuration mapping to initialize default values.
- changed
Updated
wiz.registry.get_defaults()
to return registry paths from the configuration mapping instead of using a hardcoded list of paths.See also
- changed
Updated
wiz.environ.initiate()
to set initial environment variables from configuration mapping instead of using a hardcoded mapping.See also
- new
Added
wiz.utility.deep_update()
to merge two mappings recursively. - changed
Updated documentation to remove Mill Specific examples.
2.6.5¶
4 April 2019- fixed
Updated the GitLab links to their fully qualified domain name, as the resolv.conf setup is not consistent globally, which leads to it currently not resolving in all Mill sites.
- fixed
resolverUpdated
wiz.graph.Graph.variant_groups()
to preserve the order of variants defined in the definition. Previously it would sort the variant by version and by name.
2.6.4¶
2 April 2019- fixed
command-lineUpdated
wiz search
to use the qualified definition identifier when registering the commands. Otherwise, it wouldn’t find the definition corresponding to a particular command.
2.6.3¶
29 March 2019- fixed
APIUpdated
wiz.resolve_context()
to use qualified identifiers when creating theWIZ_CONTEXT
environment variable which contains theencoded
list of package identifiers. Previously, it would sometimes be impossible to retrieve a package from identifier in this list when the namespace is not specified.
2.6.2¶
29 March 2019- fixed
APIRemoved
wiz.graph.Timeout
and updatedwiz.resolve_context()
,wiz.validate_definition()
andwiz.graph.Resolver
to remove the “timeout” keyword argument.The timeout logic uses
signal
which can only be used in the main thread, therefore it was impossible to use Wiz within threads.
2.6.1¶
28 March 2019- fixed
documentationFixed error in
tutorial
.
2.6.0¶
28 March 2019- changed
documentationUpdated
tutorial
. - changed
command-lineUpdated
wiz list command
to display the corresponding system requirement only ifwiz list command --no-arch
is used. - changed
command-lineUpdated
wiz list package
to display the corresponding system requirement only ifwiz list package --no-arch
is used. - fixed
APIcommand-lineUpdated
wiz.definition.fetch()
andwiz list command
to use the qualified definition identifier when registering the commands. Otherwise, it wouldn’t find the definition corresponding to a particular command.
2.5.0¶
27 March 2019- changed
debugUpdated
wiz.history.start_recording()
to add a “minimal_actions” option which only keeps the ‘identifier’ keyword from each action recorded and discards all other elements passed towiz.history.record_action()
.This option is used to preserve the accuracy of execution time in the
wiz analyze --verbose
command line option. - fixed
debugUpdated
wiz.history.record_action()
to copy each action in order to prevent mutating its content.
2.4.0¶
26 March 2019- changed
command-lineExplicitly set the name of the program to “wiz” instead of relying on
sys.argv
in order to prevent “__main__.py” to be displayed when the command is being run as follows:python -m wiz --help
2.3.0¶
20 March 2019- new
command-lineAdded
wiz analyze --verbose
to print out information about history and execution time for each definition. - new
command-lineAdded wiz analyze –filter to only display targeted definitions. The
qualified version identifier
should match all filters for each definition displayed. - new
APIAdded
wiz.logging.Logger.debug_traceback()
to log traceback from latest error raised as a debug message. - changed
debugUpdated
wiz.history.start_recording()
to reset global history. Previously, part of the global history mapping would be kept when the recording was started several times. - changed
debugUpdated
wiz.history.record_action()
to prevent it from serializing all actions as it affects the execution time tremendously. - changed
command-lineUpdated to always log tracebacks as debug messages in order to reduce verbosity for command line usage in non-debug verbosity level.
- fixed
Updated
wiz.registry.install_to_vcs()
tosanitize
definitions before installation.
2.2.0¶
14 March 2019- new
command-lineAdded
wiz analyze
sub-command to check the validity of accessible definitions from registries. - new
APIAdded
wiz.utility.colored_text()
to return a text with a specific terminal color. - new
APIAdded
wiz.utility.extract_version_ranges()
to extract the minimum and maximum version from apackaging.requirements.Requirement
instance. - new
APIAdded
wiz.utility.is_overlapping()
to indicate whether twopackaging.requirements.Requirement
instances are overlapping. It will be used to identify the nodes with conflicting requirements within during the graph resolution process. - new
APIAdded
wiz.validate_definition()
to return a validation mapping of a definition with possible errors and warnings. - changed
APIcommand-lineRemoved
mlog
dependency and addedwiz.logging
usingsawmill
directly to have more flexibility to configure thewiz.logging.Logger
instance.wiz.logging.configure_for_debug()
has then be added in order to record logs instead of displaying it directly to the user. It was necessary to ensure a clear formatting for thewiz analyze
sub-command. - changed
APIUpdated
wiz.utility.compute_label()
to retrieve qualified identifier of input definition. - changed
APIRenamed
wiz.graph.remove_node_and_relink()
towiz.graph.relink_parents()
as the node removal process is extracted out of the function.During the conflict resolution process, sometimes an extra step is needed that adds additional packages to the graph. This ensures that the matching nodes exist in the graph when the parents of the conflicting nodes are relinked.
Furthermore, the matching nodes are now fetched via the
wiz.Graph.find()
method instead of passing a list of package identifiers to the function to simplify the function’s logic.Finally, an error is raised when a node’s parent cannot be linked to any other node to ensure that their requirements are always fulfilled.
- changed
APIRenamed
wiz.graph.extract_parents()
towiz.graph.extract_conflicting_requirements()
to return a list of requirement conflict mappings from a list of nodes instead of simply returning the list of parent identifiers.wiz.utility.is_overlapping()
is used to identify the parent with conflicting requirements. - changed
APIUpdated
wiz.exception.GraphResolutionError
to record a requirement conflict mapping in a conflicts attribute if necessary. It will be used to record requirement conflicts from failed combinations in thewiz.graph.Resolver
instance. - changed
Updated
wiz.graph.Resolver
to better keep track of node errors and requirement conflicts to prevent any graph combination to be generated when at least one node error or conflict is detected.It uses the conflicts attribute added to the
wiz.exception.GraphResolutionError
exception. - changed
Updated
wiz.graph.Resolver
to add an additional step once all graph combinations from the initial requirements have failed to resolve. This step attempts to replace the nodes with conflicting requirements by compatible versions which could lead to a resolution.It uses the conflicts attribute added to the
wiz.exception.GraphResolutionError
exception. - fixed
Updated
wiz.graph.Resolver
andwiz.graph.Graph
to ensure that packages added during the conflict resolution process are correctly linked to the parent nodes instead ofroot
. - fixed
Updated
wiz.graph.Resolver
andwiz.graph.Graph
to ensure that node requirements are always fulfilled when computing a graph with one particularcombination
. Previously, nodes removed during the graph combination process were not properly reconnected to other node(s) in the graph. - fixed
APIUpdated
wiz.definition.query()
to take an extra parameter from apackaging.requirements.Requirement
instance into account when querying a definition with a specific variant (e.g. “foo[Variant]”). If the best matching definition version does not contain the required variant, older versions would be fetched until one that contains the required variant will be returned.
2.1.0¶
11 February 2019- changed
Updated
wiz.definition.query()
to add the following rule when guessing the namespace of a package definition: If several namespaces are available, default to the one which is identical to the identifier if possible.For instance, the following command will default to
massive::massive
even ifmaya::massive
is available:>> wiz use massive
2.0.0¶
4 February 2019- new
command-lineAdded
--add-registry
to specify a path to be added to the default registry paths. Previously it was only possible to replace the default paths with--definition-search-paths
. - new
command-lineAdded
--timeout
to specify a time limit after which a graph resolve should be aborted to avoid the process hanging. - new
command-lineAdded
--init
to specify initial environment variables, which will be extended by the resolved environment. For example, now it is possible to hand in a PATH or PYTHONPATH, without making them available in a definition. - new
command-lineAdded
--version
to display the package version. - new
command-lineAdded
wiz edit
sub-command to edit one or several definitions with the default editor or with operation option(s). - new
command-lineUpdated
wiz run
sub-command to accept unknown arguments and automatically consider it as an extra argument which will be appended to the command.For instance, both of the following commands are valid:
>>> wiz run python -- -c 'print("TEST")' >>> wiz run python -c 'print("TEST")'
- new
command-lineAdded
wiz search --no-arch
,wiz list command --no-arch
andwiz list package --no-arch
options to display all definitions discovered, even when not compatible with the current system. - new
backwards-incompatibledefinitionAdded optional conditions keyword to definition schema which can be used to indicate a list of packages which must be in the resolution graph for the package to be included.
- new
backwards-incompatibledefinitionAdded optional namespace keyword which can be used to provide a scope to a definition. It replaces the “group” keyword as it is also used to define where in the hierarchy of a VCS Registry a definition will be installed.
- new
definitionAdded optional install-root keyword to definition schema to indicate the root of the install location of a package. The value set for this keyword can be referenced in the definition with
INSTALL_ROOT
and should form the base of the install-location value. - new
APIAdded
wiz.environ
module to regroup functions dealing with the environment mapping resolution. Addedwiz.environ.contains
to identify specific environment variable in string andwiz.environ.substitute
to replace environment variables by their respective values in string. - new
APIAdded
wiz.utility.combine_command()
to return command elements as a unified command string while keeping quoted elements in order to preserve the command in the log as it was typed. - new
APIAdded
wiz.graph.validate()
to ensure that aGraph
instance does not contain any remaining error after the conflict resolution process. Thewiz.exception.WizError
error encapsulated in the nearest accessible node will be raised if necessary. - changed
definitionRemoved the
constraints
keyword to simplify the graph resolution as conditions could be used instead to reach the same logic.With constraint:
{ "constraints": [ "maya ==2016.*" ] }
With condition:
{ "conditions": [ "maya" ], "requirements": [ "maya ==2016.*" ] }
- changed
shellUpdated
wiz.spawn.shell()
to add “command” aliases to subprocess when a Wiz shell is being opened, thereby enabling the user to use the same aliases in the sub-shell that have been defined in the definitions. - changed
backwards-incompatibleshellUpdated
wiz.spawn.shell()
to limit the Wiz shell to “bash”. - changed
command-lineUpdated
wiz.command_line
to useclick
instead ofargparse
in order to improve code maintainability. - new
command-lineRenamed
--definition-search-paths
to--registry
for clarity. - new
command-lineRenamed
--definition-search-depth
to--registry-depth
for clarity. - changed
backwards-incompatiblecommand-lineUpdated command line arguments to use the same option
--registry
for installing to a Local Registry and installing to a VCS Registry. Previously the argument was split into –registry-path and –registry-id.Now definitions can be installed using the following commands syntax:
# For local registries >>> wiz install foo.json --registry /path/to/registry >>> wiz install foo.json -r /path/to/registry # For VCS registries >>> wiz install foo.json -registry wiz://primary-registry >>> wiz install foo.json -r wiz://primary-registry
- changed
command-lineUpdated
wiz search
sub-command to also search packages using command aliases. - changed
command-lineUpdated sub-commands to only accept extra arguments for the
wiz use
andwiz run
sub-commands in order to execute a custom command within a resolved context. Previously, extra arguments were accepted by all sub-commands, which is not desired.For instance, extra arguments could be used as follow:
wiz use python -- python -c 'print("TEST")' wiz run python -- -c 'print("TEST")'
- changed
APIbackwards-incompatibleUpdated
wiz.resolve_context()
to prepend implicit requests to explicit requests, rather than append as it previously did.Previously when resolving the environment, a path set in the ‘environ’ of an implicit package would be appended to the ones from explicit packages, making it impossible to overwrite (e.g. shader paths from within implicit packages).
This change enables the use of implicit packages for job setups by guaranteeing that implicit packages will be resolved before explicit packages.
- changed
APIcommand-lineUpdated
wiz.spawn.execute()
to substitute environment variables within command elements before the execution process. User can then use environment variables in command, such as:>>> wiz use python -- echo \$PIP_CONFIG_FILE
- changed
APIbackwards-incompatiblecommand-lineUpdated
wiz.definition.fetch()
to remove “requests” option which could filter definitions discovered. The filtering process has been moved to the command line in order to filter definitions from all systems as the definition mapping returned bywiz.definition.fetch()
only records one definition per identifier and version. - changed
APIbackwards-incompatiblecommand-lineRemoved –install-location option from
wiz install
sub-command and “install_location” argument fromwiz.install_definitions()
as this can already be set with thewiz edit
command before installing, and just adds redundant complexity. - changed
APIUpdated
wiz.spawn.execute()
to display a nicer error handling for the shell, when a command can not be found or executed. Now, when anOSError
is detected, it will throw an error message instead of a traceback (A traceback is available if verbosity is set to ‘debug’). - changed
APIUpdated
wiz.definition.discover()
to add a “system_mapping” option which can filter out definitionsinvalid
with a system mapping. - changed
APIbackwards-incompatibleMoved
wiz.package.initiate_environ()
towiz.environ.initiate()
. - changed
APIbackwards-incompatibleMoved
wiz.package.sanitise_environ_mapping()
towiz.environ.sanitise()
. - changed
APIUpdated
wiz.resolve_command
to return resolved list of elements composing the command from elements composing input command. It prevents unnecessary combination which could affect the nature of the command by removing single and double quotes. - changed
APIUpdated
wiz.package.initiate_environ()
to add theHOSTNAME
environment variable into the initial environment. - changed
APIUpdated
wiz.definition.export()
to sanitized the definition withwiz.definition.Definition.sanitized()
before exporting it. - changed
APIUpdated
wiz.definition.load()
to add ‘definition-location’ keyword in mapping. Previously this would only be added bywiz.definition.discover()
. - changed
APIbackwards-incompatibleAdded
wiz.package.create()
to instantiate aPackage
instance from aDefinition
instance and variant identifier, and updatedPackage
constructor to just take a mapping. This modification ensure that edition methods will work with packages (e.g.set()
,remove()
,…). - changed
APIbackwards-incompatibleRemoved
wiz.package.generate_identifier()
and addwiz.definition.Definition.version_identifier
property to get version identifiers fromDefinition
instance. - changed
APIAdded the following properties to get qualified identifiers from
Definition
andPackage
instances:wiz.definition.Definition.qualified_identifier
wiz.definition.Definition.qualified_version_identifier
wiz.package.Package.qualified_identifier
- changed
APIUpdated
wiz.graph.Resolver
andwiz.graph.Graph
to take conditions into account while resolving the graph. - changed
APIUpdated
wiz.graph.Resolver
andwiz.graph.Graph
to handle package extraction error so that it does not raise if faulty packages are not in resolved packages. If a package extraction error is raised for one combination of the graph, another graph combination will be fetched and the error will be raised only if it appears for all combinations.The package extraction error has now a lower priority, so that it will not be raised if a conflict error is raised before.
- changed
APIUpdated
graph.Graph.create_link()
to not raise an error when a link is assigned twice between two nodes. This caused an issue when a package implicitly required were also explicitly required. Instead, it now gives priority to the link with the lowest weight so it has the highest priority possible.Note
If a package is required twice with two different requests, the first request only will be kept:
# The following command will discard 'foo>2' wiz use foo foo>2
- changed
APIUpdated
wiz.resolve_context
to add an optional “timeout” argument in order to modify the default graph resolution time limit. - fixed
Fixed
wiz.graph.combined_requirements()
to take requirements from all parent nodes into account. Previously it would use the distance mapping, which would automatically pick the node with the shortest path as the only parent to consider for requirements. That lead to the elimination of all requirement from other parents, so conflicts would not be properly detected and resolved within the graph. - fixed
Fixed
wiz.graph.updated_by_distance()
to not filter outroot
node. - fixed
Changed
wiz.validator
to open the definition JSON Schema once the module is loaded, rather than once per validation. Previously a “too many files opened” issue could be encountered when creating multiple definitions in parallel. - fixed
Fixed
wiz.registry.fetch()
to resolve the absolute path of the registry in order to prevent the fetching process to fail with relative paths or trailing slashes. - fixed
Fixed
wiz.mapping.Mapping
to ensure that creating an instance does not mutate original data. - fixed
command-linedebugFixed
--record
command to ensure that path exists before exporting history.
1.2.1¶
24 October 2018- fixed
Fixed
wiz.spawn.execute()
to use thesubprocess.call()
convenience function which is less likely to leave remaining sub-processed when the parent is killed.This was an issue as the render farm is using
signal.SIGKILL
to interrupt a job.
1.2.0¶
24 October 2018- new
command-lineAdded
wiz install
sub-command to install package definition to a registry. - new
definitionAdded optional group keyword to definition schema, which can be used to define where in the hierarchy of a VCS Registry a definition will be installed (e.g. “python”, “maya”).
- new
definitionAdded optional install-location keyword to definition schema to indicate the location of a package data.
- new
APIAdded
wiz.install_definitions_to_path()
andwiz.install_definitions_to_vcs()
to install one or several definition files to a Local Registry or a VCS Registry. - new
APIAdded
wiz.registry.install_to_path()
andwiz.registry.install_to_vcs()
to install a definition instance to a Local Registry or a VCS Registry. - new
APIAdded
wiz.package.Package.localized_environ()
to return environment mapping of a package which replace theINSTALL_LOCATION
environment variable by the install-location keyword value. - new
APIAdded
wiz.definition.Definition.sanitized()
to return a definition without keywords implemented when the definition isdiscovered
. Only the keywords unrelated to the registry are preserved so that sanitized definition can be compared and installed. - new
APIAdded
wiz.utility.compute_label()
to compute a unique label for a definition (e.g. “‘foo’ [0.1.0]”). - new
APIAdded
wiz.utility.compute_system_label()
to compute a unique label for the system value of a definition (e.g. “linux : x86_64 : el >= 6, 7”). - new
APIAdded
wiz.utility.compute_file_name()
to compute a unique JSON file name for a definition (e.g. “foo-0.1.0.json”). - new
documentationAdded environment variable section to list and describe the environment variables used by Wiz.
- new
documentationAdded Install Location to Using Package Definitions section.
- changed
definitionRenamed keyword ‘origin’ to ‘definition-location’, to be more consistent with the newly added ‘install-location’ keyword.
- fixed
Actually return a copy in
wiz.definition._Variant.copy()
.
1.1.1¶
23 October 2018- fixed
APIFixed
wiz.definition._Variant
to ensure that it can be initiated with “*args” and “**kwargs” like its mother classwiz.mapping.Mapping
. The manipulation methods would not work otherwise as it attempted to create a new Variant instance without the “definition_identifier” argument.
1.1.0¶
23 October 2018- changed
APIMoved manipulation methods
set()
,update()
,extend()
,insert()
,remove()
,remove_key()
,remove_index()
to mother classwiz.mapping.Mapping
to ensure that logic is available inwiz.definition._Variant
object.
1.0.2¶
18 October 2018- fixed
Updated
wiz.command_line
to convert version to a string when freezing the environment. Previously it would fail with a type error.
1.0.1¶
24 September 2018- fixed
debugFixed
wiz.graph.Resolver()
to store the extracted graph in the history mapping instead of the original one when recording the graph combination extraction action (identified withGRAPH_COMBINATION_EXTRACTION_ACTION
).
1.0.0¶
5 September 2018- new
APIAdded
wiz.graph.generate_variant_combinations()
to create a generator iterator with all graph combinations from a list of conflicting variant groups. Implemented it withinwiz.graph.Resolver
instance instead of dividing the graph with all possible combinations to optimize the resolution process. - new
APIAdded
wiz.graph.remove_node_and_relink()
to remove a node from the graph and connect node’s parents to other nodes with a new requirement. This logic was previously part ofwiz.graph.Resolver.resolve_conflicts()
. - new
APIAdded
wiz.graph.extract_parents()
to extract existing parent node identifiers from a node. - changed
APIUpdated
wiz.graph.Resolver
andwiz.graph.Graph
to better handle graph division from variant groups added to the graph. Previously variant groups were simply identified during the package extraction process so a single variant could appear in several groups, which led to unnecessary graph divisions. Variant groups are now organized per definition identifier and updated for each package added to the graph when necessary. - changed
APIUpdated
wiz.graph.Graph
to record the number of times a node variant has been added to the graph and sort each variant group following two criteria: First by the number of occurrences of each node identifier in the graph and second by the variant index defined in the package definition. This will ensure that a variant called multiple times will have priority over the others during the graph division. - changed
APIUpdated
wiz.graph.Resolver
to better identify compatibility between package requirements during the conflict resolution process. Previously conflicting packages were compared with each other’s requirement to ensure that at least one of them were matching both requirements. For instance:- 'foo==0.5.0' is required by 'foo<1'; - 'foo==1.0.0' is required by 'foo'; - The version '0.5.0' is matching both requirements; - Requirements 'foo<1' and 'foo' are seen as compatible.
However, this strategy could not recognize when two conflicting packages had compatible requirements even when neither package versions could match both requirements:
- 'foo==0.5.0' is required by 'foo<1'; - 'foo==1.0.0' is required by 'foo!=0.5.0'; - Versions '0.5.0' and '1.0.0' cannot match both requirements; - Requirements 'foo<1' and 'foo!=0.5.0' are seen as incompatible.
The new strategy chosen is to directly attempt to
extract
packages from the combination of both requirements so that an error could be raised according to the result. As a consequence, the latest example would not fail if a version ‘foo==0.2.0’ can be fetched. - changed
APIRenamed
wiz.graph.compute_priority_mapping()
towiz.graph.compute_distance_mapping()
to prevent confusion as a shortest path algorithm (Dijkstra’s algorithm) is being used to define the “priorities” which are the shortest possible paths from nodes to the root of the graph. - changed
APIRenamed
wiz.graph.sorted_from_priority()
towiz.graph.updated_by_distance()
for clarity. - changed
APIRenamed
wiz.graph.extract_conflicted_nodes()
towiz.graph.extract_conflicting_nodes()
for clarity. - changed
APIUpdated
wiz.graph.Resolver
to keep track of updates in the graph during the conflict resolution process in order to compute a new distance mapping only when necessary. - changed
APIRemoved
wiz.graph.validate_requirements()
as this functionality is not necessary anymore. - changed
APIRemoved
wiz.graph.extract_requirement()
as this functionality is not necessary anymore. - changed
APIRemoved
wiz.graph.Graph.copy()
as this functionality is not necessary anymore. - fixed
APIFixed
wiz.graph.Resolver
to keep track of definition identifiers which led to graph divisions to prevent dividing several time the graph with the same package variants when graph is being updated during conflict resolution process.
0.17.0¶
28 August 2018- changed
APIUpdated
wiz.package.initiate_environ()
to forward theXAUTHORITY
environment variable into the initial environment as it is required by some applications.
0.16.0¶
16 August 2018- changed
APIUpdated
wiz.resolve_context()
to make the definition_mapping argument optional. If no definition mapping is provided, a sensible one will be fetched from default registries. - changed
APIUpdated
remove()
method to returnDefinition
instance without raisingKeyError
exception when element to remove does not exist. - changed
APIUpdated
remove_key()
method to returnDefinition
instance without raisingKeyError
exception when element to remove does not exist. - changed
APIUpdated
remove_key()
method to return copy of aDefinition
instance without element mapping if the latest key is removed. - changed
APIUpdated
remove_index()
method to returnDefinition
instance without raisingKeyError
exception when index to remove does not exist. - changed
APIUpdated
remove_index()
method to return copy of aDefinition
instance without element list if the latest item is removed. - fixed
APIFixed
wiz.mapping
to prevent serialisation of boolean values as it causes validation errors when serialized mapping is used to create a newDefinition
instance.
0.15.1¶
14 August 2018- fixed
APIFixed
wiz.definition.fetch()
to sort implicit packages in inverse order of discovery to ensure that the package from the latest registries have highest priority. - fixed
APIFixed
wiz.mapping.Mapping.to_ordered_dict()
to ensure that the auto-use keyword is displayed at a logical position in the serialized definition and package instances.
0.15.0¶
14 August 2018- new
APIAdded
set()
method to return copy of aDefinition
instance with a new element. - new
APIAdded
update()
method to return copy of aDefinition
instance with element mapping updated. - new
APIAdded
extend()
method to return copy of aDefinition
instance with element list extended. - new
APIAdded
insert()
method to return copy of aDefinition
instance with element added to list at specific index. - new
APIAdded
remove()
method to return copy of aDefinition
instance without a specific element. - new
APIAdded
remove_key()
method to return copy of aDefinition
instance without a specific key in element mapping. - new
APIAdded
remove_index()
method to return copy of aDefinition
instance without a specific index in element list. - new
APIAdded
wiz.load_definition()
to conveniently alias thewiz.definition.load()
function. - changed
APIUpdated
wiz.export_definition()
to export a JSON file from a mapping or aDefinition
instance.
0.14.0¶
10 August 2018- new
definitionAdded optional
constraints
keyword to definition schema which indicates a list of package requirements which should be used to resolve a context only if another package with the same definition identifier is required. - new
definitionAdded optional auto-use keyword to definition schema which indicates whether corresponding package should be used implicitly to resolve context. Default is False.
- new
command-lineAdded
--ignore-implicit
command line option to skip implicit packages. - new
APIAdded
wiz.package.generate_identifier()
to generate corresponding package identifier from a definition. - changed
APIUpdated
wiz.definition.fetch()
to detect implicit package identifiers and add it to the definition mapping returned. - changed
APIUpdated
wiz.graph.Graph.update_from_requirements()
to take constraint packages into account while resolving the graph. - fixed
APIFixed
wiz.graph.extract_requirement()
to retrieve requirement when the parent node iswiz.graph.Graph.ROOT
.
0.13.0¶
26 July 2018- changed
registryChanged
wiz.registry.get_defaults()
to update the location of the site registry folder in order to prevent using the.common
hidden folder./jobs/.common/wiz/registry/default
→/jobs/.wiz/registry/default
- changed
registryChanged
wiz.registry.discover()
to update the location of the project registry sub-folder in order to prevent using the.common
hidden folder.[PREFIX_PROJECT]/.common/wiz/registry
→[PREFIX_PROJECT]/.wiz/registry
0.12.0¶
8 June 2018- changed
registryChanged
wiz.registry.get_defaults()
to update the location of the site registry folder./jobs/.common/wiz/registry
→/jobs/.common/wiz/registry/default
0.11.1¶
6 June 2018- fixed
Changed the MANIFEST template to release the package source with JSON files.
0.11.0¶
6 June 2018- new
API
Added
wiz.validator.yield_definition_errors()
to identify and yield potential errors in a definition data following JSON Schema. - changed
APIChanged
wiz.definition.Definition
to validate data mapping on instantiation and raise potential error asIncorrectDefinition
. - changed
APIChanged
wiz.export_definition()
to take a data mapping instead of individually requesting each keyword.The “packages” argument which were used to pass a list of
Package
instances to indicate the requirements list is no longer necessary as the requirements list could directly be passed to the data mapping. This implies that the user no longer need to fetch the corresponding packages prior to export a definition. - changed
APIThe
wiz.export_bash_wrapper()
andwiz.export_csh_wrapper()
functions have been removed and replaced by anwiz.export_script()
function which simply take a “script_type” argument.
0.10.0¶
24 May 2018- changed
Changed
wiz.registry.discover()
to yield all registry folders available within the path folder hierarchy if under/jobs/ads
- changed
Changed
wiz.registry.get_defaults()
to update the location of the site registry folder and global registry folders.
0.9.2¶
30 April 2018- changed
loggingChanged
wiz.package.combine_command_mapping()
to display a debug message instead of a warning message when a command from a package definition is being overridden in another package definition. As commands are being overridden for basically every usage (e.g. to add plugins to an application), this created confusion for the user.
0.9.1¶
27 April 2018- changed
APIChanged
wiz.discover_context()
to add the resolved environment and command mappings to the context mapping returned.
0.9.0¶
26 April 2018- new
APIAdded
wiz.fetch_package()
to return best matching package instance from a package request. - new
APIAdded
wiz.fetch_package_request_from_command()
to fetch the package request corresponding to a command request. - new
APIAdded
wiz.utility.get_version()
to buildpackaging.version.Version
instances while raising aWizError
exception in case of failure. - new
APIAdded
wiz.utility.get_requirement()
to buildpackaging.requirements.Requirement
instances while raising aWizError
exception in case of failure. - changed
command-lineChanged the
wiz view
sub-command to only display the full definition if the request is identified as a package definition. If the request is identified as a command, only the corresponding definition identifier is displayed. - changed
APIRenamed
wiz.query_definition()
towiz.fetch_definition()
for consistency.To prevent confusion, it now returns definition instance from a package definition request only, not from a command request.
- changed
APIRenamed
wiz.fetch_definitions()
function towiz.fetch_definition_mapping()
for clarity.To keep track of the origin of the definitions fetched, the registry paths are now added as a “registries” keyword to the mapping returned.
- changed
APIRenamed
wiz.query_current_context()
function towiz.discover_context()
for clarity.To prevent incorrect packages to be fetched from different registries, the original registry list is now stored in a
WIZ_CONTEXT
environment variable along with the package identifiers so that a valid definition mapping could be fetched internally. - changed
APIRenamed
wiz.resolve_package_context()
function towiz.resolve_context()
for consistency.To prevent incorrect packages to be fetched from different registries when discovering the context from a resolved environment, the encoded package identifiers are now stored in a
WIZ_CONTEXT
environment variable along with the registry list. - changed
APIRemoved
wiz.resolve_command_context()
for consistency as the context should be only retrievable with a package request.
0.8.2¶
23 April 2018- fixed
APIAdded packages list to the context mapping retrieved by the
wiz.query_current_context()
function.
0.8.1¶
23 April 2018- fixed
APIAdded missing argument to
wiz.query_current_context()
function.
0.8.0¶
23 April 2018- new
documentationAdded
tutorial
section to documentation, including a guide for project registries, as well as some introduction into Using Registries and Using Package Definitions. Additional Guidelines and “tools” sections have been added to provide help for developers.
0.7.1¶
20 April 2018- fixed
command-lineFixed
wiz.command_line.main()
to correctly launch a command within a resolved context as follow:wiz use baselight-nuke -- nukex
- fixed
debugChanged
wiz.history.get()
to correctly set the timestamp to the history mapping returned.
0.7.0¶
18 April 2018- fixed
resolverWhen a node was removed from the graph due to a requirement conflict which prioritize another version of the same package identifier, the link was not re-assigned to the correct node. This could lead to an incorrect priority mapping computation which would alter the package order resolution.
Changed
wiz.graph.Resolver.resolve_conflicts()
to update the link when a conflicted node is removed.
0.6.0¶
18 April 2018- fixed
registryChanged
wiz.registry.fetch()
to return the registry folders is the correct order so that package definitions from the secondary registry h ave priority order package definitions from the primary registry.
0.5.0¶
17 April 2018- changed
command-lineMoved
--definition-search-paths
, to the top level parser so that registries could be modified for every sub-commands.
0.4.0¶
17 April 2018- changed
registryChanged
wiz.registry.get_defaults()
to return two global registry folders instead of one: The “primary” registry would store all vanilla package definitions and the “secondary” one would store all package combinations that need to be available globally.
0.3.0¶
16 April 2018- new
debugAdded
wiz.history
to let the user record a compressed file with all necessary information about the API calls executed and the context in which it was executed (wiz version, username, hostname, time, timezone,…).wiz.history.record_action()
is called within precise functions with a clear action identifier and relevant arguments to record all major steps of the graph resolution process (including errors). - new
command-linedebugAdded
--record
command line option to export a dump file withrecorded history
. - changed
debugChanged
wiz.graph.Resolver.compute_packages()
to traverse package requirements in Breadth First Mode in order to include packages with highest priority first in the graph. This allow for better error message (incorrect package with higher priority will fail before a less important one), and a more logical order for actions recorded inrecorded history
.
0.2.0¶
30 March 2018- changed
deploymentRemove
package.py
script as the tool will be installed as a library within a python context instead.
0.1.0¶
30 March 2018- new
command-lineAdded
wiz.command_line
to initiate the command line tool. - new
APIAdded
wiz
to expose high-level API. - new
APIAdded
wiz.definition
to discover and createDefinition
instances from registry folder. - new
APIAdded
wiz.package
to extractPackage
instances from aDefinition
instance and resolve a context mapping with initial environment mapping. - new
APIAdded
wiz.registry
to query available registry folders. - new
APIAdded
wiz.system
to query current system information and filter fetched definitions accordingly. - new
APIAdded
wiz.filesystem
to deal with files and folders creation. - new
internalAdded
wiz.mapping
to define immutable serializable mapping object used byDefinition
andPackage
instances. - new
APIAdded
wiz.symbol
to regroup all Wiz symbols. - new
APIAdded
wiz.exception
to regroup all Wiz exceptions.