pkglts.version_management module

Set of function to store the version of each option each time the package is regenerated and access them later to prevent reverting changes.

pkglts.version_management.load_pkg_version(rep='.')[source]

Read version file associated to this package.

Parameters:

rep (Path) – directory to search for info

Returns:

option name, version

Return type:

(dict of str, str)

pkglts.version_management.option_current_version(name)[source]

Get current version of a given option.

Parameters:

name (str) – name of option

Returns:

X.X.X

Return type:

(str)

pkglts.version_management.outdated_options(cfg, rep='.')[source]

Find options which actual version is too old.

An option is outdated if it’s current version is older than the version used to regenerate the package.

Parameters:
  • cfg (Config) – current working config

  • rep (Path) – directory to search for info

Returns:

list of option names

Return type:

(list of str)

pkglts.version_management.write_pkg_version(cfg, rep='.')[source]

Store version of tools associated to this package on disk.

Parameters:
  • cfg (Config) – current working config

  • rep (Path) – directory to search for info

Returns:

None