komodo package

Subpackages

Submodules

komodo.build module

komodo.build.cmake(package_name, ver, pkgpath, prefix, builddir, makeopts, jobs, fakeroot, ld_lib_path=None, bin_path=None, cmake='cmake')
komodo.build.download(package_name, ver, prefix, url, hash_str, fakeroot, destination)
komodo.build.make(pkgs: Dict[str, str], repo, data, prefix, dlprefix=None, builddir=None, jobs=1, cmk='cmake', pip='pip', fakeroot='.')
komodo.build.noop(package_name, ver)
komodo.build.pypaths(prefix, version)
komodo.build.rsync(package_name, ver, pkgpath, prefix, fakeroot, makeopts=None)
komodo.build.sh(package_name, ver, pkgpath, data, prefix, makefile, fakeroot, pythonpath, bin_path, pip, ld_lib_path, jobs=None, cmake=None, makeopts=None)

komodo.check_unused_package module

komodo.check_unused_package.check_for_unused_package(release_file: ReleaseFile, package_status_file: str, repository: RepositoryFile, builtin_python_versions: Dict[str, str])
komodo.check_unused_package.main()

komodo.check_up_to_date_pypi module

exception komodo.check_up_to_date_pypi.YankedException

Bases: Exception

komodo.check_up_to_date_pypi.compatible_versions(releases: dict, python_version, platform: str) List[Version]
komodo.check_up_to_date_pypi.get_args() Namespace
komodo.check_up_to_date_pypi.get_pypi_info(package_names)
komodo.check_up_to_date_pypi.get_pypi_packages(release: dict, repository: dict) list
komodo.check_up_to_date_pypi.get_python_requirement(sources: list)

Goes through the different sources of the package and returns the first python requirement :param sources: :return: Python requirement or empty string if there is no requirement.

komodo.check_up_to_date_pypi.get_upgrade_proposals_from_pypi(releases: dict, repository: dict, python_version: str, platform: str, minor_upgrade_only: bool = False, patch_upgrade_only: bool = False) dict
komodo.check_up_to_date_pypi.insert_upgrade_proposals(upgrade_proposals, repository, releases)
komodo.check_up_to_date_pypi.is_platform_compatible(build_info: List[Dict], platform: str) bool
komodo.check_up_to_date_pypi.load_from_file(yaml, fname)
komodo.check_up_to_date_pypi.main()
komodo.check_up_to_date_pypi.run_check_up_to_date(release_file, repository_file, python_version='3.11.11', propose_upgrade=False, ignore=None, platform='linux', minor_upgrade_only=False, patch_upgrade_only=False)
komodo.check_up_to_date_pypi.validate_release_file(file_path: str) None
komodo.check_up_to_date_pypi.validate_repository_file(file_path: str) None
komodo.check_up_to_date_pypi.yaml_parser()

komodo.cleanup module

komodo.cleanup.cleanup(repository_file_path: str, release_files_path: List[str])
komodo.cleanup.main()

komodo.cli module

class komodo.cli.KomodoNamespace(**kwargs)

Bases: Namespace

Komodo argument parser namespace

build: bool
cmake: str
download: bool
downloads: str
dry_run: bool
extra_data_dirs: List[str]
install: bool
jobs: int
overwrite: bool
pip: str
pkgs: ReleaseFile
postinst: str
prefix: str
release: str
repo: RepositoryFile
tmp: str
workspace: str
komodo.cli.apply_fallback_tmpdir_for_pip_if_set(tmp_dir: str | None = None)

Allows e.g. pip to use this folder as a destination for “pip download”, instead of in some cases falling back to /tmp, which is undesired when building on nfs.

Parameters:

tmp_dir (Optional) – Directory for pip to use as fallback.

komodo.cli.build_non_pypi_packages_and_move_to_release_path(args: KomodoNamespace, data: Data, tmp_prefix: Path)
komodo.cli.check_for_possible_build_overwrite(release_path: Path, overwrite_enabled: bool = False) None

Checks for possible overwrite of prior build.

Parameters:
  • release_path – The path where the new release will be built.

  • overwrite_enabled – Flag to enable overwriting of prior release build. Defaults to False.

Raises:
  • RuntimeError – if prior release build is detected,

  • --overwrite flag is not set, and build is not 'bleeding'.

komodo.cli.cli_main()

Pass the command-line args to argparse, then set up the workspace.

komodo.cli.compile_python_bytecode_files(*args: Any, **kwargs: Any) Any
komodo.cli.compile_python_bytecode_files_and_fix_permissions(release_root: Path, set_permissions_script_path, release_path: Path)
komodo.cli.create_enable_scripts(komodo_prefix: str, komodo_release: str) None

Render enable scripts (user facing) for bash and csh to an existing directory komodo_release (in current working directory).

Args:

komodo_prefix: The filesystem path to where the release is to be

deployed.

komodo_release: The name of the release.

komodo.cli.delete_old_previously_moved_releases(*args: Any, **kwargs: Any) Any
komodo.cli.download_packages(*args: Any, **kwargs: Any) Any
komodo.cli.generate_release_manifest(release_name: Path, release_file_content: Mapping[str, str], repository_file_content: Mapping[str, Mapping[str, str | Sequence[str]]], git_hashes: Mapping[str, str] | None = None) None
komodo.cli.generate_release_root(release_path: Path) Path

Append root to the temporary build dir, as we want a named root/ directory as the distribution root, organised under the distribution name

Parameters:

release_path (Path)

Returns:

release_root

komodo.cli.install_previously_downloaded_pip_packages(*args: Any, **kwargs: Any) Any
komodo.cli.is_build_only(args: KomodoNamespace) bool
komodo.cli.is_download_only(args: KomodoNamespace) bool
komodo.cli.move_new_release_to_release_path(args: KomodoNamespace, release_path: Path) None
komodo.cli.move_old_release_from_release_path_if_exists(release_path: Path) None
komodo.cli.parse_args(args: List[str]) KomodoNamespace

Parse the arguments from the command line into an argparse.Namespace. Having a separated function makes it easier to test the CLI.

Set up the command-line interface with three groups of arguments:
  • required positional arguments

  • required named arguments

  • optional named arguments

Args:

args: A sequence of arguments, e.g. as collected from the command line.

Returns:

The argparse.Namespace, a mapping of arg names to values.

komodo.cli.profile_time(msg: str) Callable[[Callable[[...], Any]], Callable[[...], Any]]
komodo.cli.rsync_komodo_to_destination(*args: Any, **kwargs: Any) Any
komodo.cli.run_post_installation_scripts_if_set(postinst: str | None, release_path: Path) None
komodo.cli.set_permissions(*args: Any, **kwargs: Any) Any

komodo.deployed module

komodo.deployed.deployed_main()
komodo.deployed.fetch_non_deployed(install_root: str, releases_folder: str, limit: int | None = None) List[str]
komodo.deployed.output_formatter(release_list: List[str], do_json: bool = False) str

komodo.fetch module

komodo.fetch.eprint(*args, **kwargs)
komodo.fetch.fetch(pkgs, repo, outdir, pip='pip') dict
komodo.fetch.grab(path, filename=None, version=None, protocol=None)

komodo.insert_proposals module

class komodo.insert_proposals.InsertProposalsNamespace(**kwargs)

Bases: Namespace

Komodo Insert Proposals argument parser namespace

base: str
git_fork: str
git_ref: str
git_repo: str
jobname: str
joburl: str
rhel8: bool
target: str
komodo.insert_proposals.clean_proposals_file(proposal_file_content: Mapping[str, Mapping], upgrade_key: str, repo: Repository, git_ref: GitRef, tmp_target) None
komodo.insert_proposals.create_new_release_file(repo: Repository, target: str, release_content: str, branch) str
komodo.insert_proposals.create_pr_with_changes(repo: Repository, git_ref: GitRef, target: str, from_sha: str, tmp_target: str, tmp_ref: GitRef, pr_msg: str, rhel8: bool | None = False)
komodo.insert_proposals.diff_file_and_string(file_contents, string, leftname, rightname)
komodo.insert_proposals.generate_contents_of_new_release_matrix(base_release_matrix_content: Mapping, repofile: RepositoryFile, upgrade: Dict | None) str
komodo.insert_proposals.get_upgrade_key(target: str) str
komodo.insert_proposals.insert_proposals(repo: Repository, base: str, target: str, git_ref: str, jobname: str, joburl: str, rhel8: bool | None = False) None
komodo.insert_proposals.load_yaml_from_repo(filename, repo, ref) bytes
komodo.insert_proposals.main()
komodo.insert_proposals.parse_args() InsertProposalsNamespace
komodo.insert_proposals.recursive_update(to_be_upgraded: Mapping[str, str | Mapping[str, str]], upgrades: Mapping[str, str | Mapping[str, str]] | None) None

Updates release in place with upgrades/additions of packages from upgrades.

Takes format:

package_name1: version_x

package_name2:

py38: version_y py312: version_z

package_name3:
rhel7:

py38: version_x

rhel8:

py38: version_x py311: version_y

Parameters:
  • to_be_upgraded (Mapping[str, Union[str, Mapping[str, str]]])

  • upgrades (Optional[Mapping[str, Union[str, Mapping[str, str]]]])

komodo.insert_proposals.recursive_validate_package_entries(package_name, package_version_or_matrix: str | Mapping | None, repository_file: RepositoryFile, errors: MutableSet) None
komodo.insert_proposals.validate_upgrades(upgrade_section: Dict[str, str], repofile: RepositoryFile) None
komodo.insert_proposals.verify_branch_does_not_exist(repo: Repository, branch_name: str) None

komodo.lint module

class komodo.lint.KomodoError(package, version, maintainer, depends, err)

Bases: tuple

depends

Alias for field number 3

err

Alias for field number 4

maintainer

Alias for field number 2

package

Alias for field number 0

version

Alias for field number 1

komodo.lint.Report

alias of LintReport

komodo.lint.get_args()
komodo.lint.lint(release_file: ReleaseFile, repository_file: RepositoryFile, check_dependencies: bool = False) LintReport
komodo.lint.lint_main()
komodo.lint.lint_version_numbers(package, version, repo)

komodo.lint_maturity module

komodo.lint_maturity.count_invalid_tags(dict_tag_maturity, invalid_tags)
komodo.lint_maturity.define_tag_exceptions(tag_exception_arg)
komodo.lint_maturity.get_files_to_lint(release_folder: str, release_file: str) List[str]
komodo.lint_maturity.get_packages_info(release_file: ReleaseFile, tag_exceptions_package)
komodo.lint_maturity.get_parser() ArgumentParser
komodo.lint_maturity.get_release_type(version: str)
komodo.lint_maturity.get_release_version(release_basename, tag_exceptions_release)
komodo.lint_maturity.main()
komodo.lint_maturity.msg_packages_exception(release_basename, dict_tag_maturity)
komodo.lint_maturity.msg_packages_invalid(release_basename, release_version, count_tag_invalid, dict_tag_maturity)
komodo.lint_maturity.msg_release_exception(release_basename, release_version)
komodo.lint_maturity.print_system_exit_message(system_exit_msg)
komodo.lint_maturity.print_warning_message(system_warning_msg)
komodo.lint_maturity.read_yaml_file(file_path)
komodo.lint_maturity.read_yaml_file_and_convert_to_release_file(release_file_path: str) ReleaseFile
komodo.lint_maturity.run(files_to_lint: List[str], tag_exceptions)

komodo.lint_package_status module

komodo.lint_package_status.compare_sets(set_a: set, set_b: set, message: str) None
komodo.lint_package_status.get_parser()
komodo.lint_package_status.main()
komodo.lint_package_status.run(package_status: PackageStatusFile, repository: RepositoryFile)

komodo.lint_upgrade_proposals module

komodo.lint_upgrade_proposals.get_args() ArgumentParser
komodo.lint_upgrade_proposals.main()
komodo.lint_upgrade_proposals.verify_package_versions_exist(upgrade_proposals: UpgradeProposalsFile, repository: RepositoryFile) None

komodo.maintainer module

komodo.maintainer.maintainers(pkgfile, repofile)

komodo.matrix module

the matrix package capture the social conventions baked into the komodo release matrix system. It should allow other parts of komodo to be capable of handling an arbitrary large and funky matrix, without having to guess and/or repeat itself.

komodo.matrix.format_release(base: str, rhel_ver: str, py_ver: str) str

Format a base (e.g. a matrix file without the .yml suffix) such that it looks like a concrete release.

komodo.matrix.get_matrix(rhel_versions: Sequence[str], py_versions: Sequence[str]) Iterator[Tuple[str, str]]

Return tuples of rhel version and Python version, representing the current release matrix.

komodo.matrix.get_matrix_base(release_name: str) str

Return the base (e.g. matrix part of a concrete release). Should be the inverse of format_release for actual, concrete matrix releases. Hard-coded the suffix pattern ‘-py..-rhel.’ or ‘-py…-rhel.’.

komodo.package_version module

komodo.package_version.get_git_revision_hash(path)
komodo.package_version.strip_version(version)

In order to be able to support both py2 and py3 we need to be able to have multiple versions of the same package/version due to differences in dependencies. This is achieved by adding i.e ‘+py3’ to a version-spec in both the release and repository file. This func strips the ‘+’ and everything behind for all pip packages so we are able to install.

komodo.post_messages module

komodo.post_messages.copy_files(file_list, dst_path, src_path)
komodo.post_messages.create_inline_messages(messages, dst_path)
komodo.post_messages.get_messages_and_scripts(release_name, motd_db)
komodo.post_messages.get_parser()
komodo.post_messages.main(args=None)

komodo.prettier module

komodo.prettier.is_repository(config)

Returns False if the configuration corresponds to a Komodo release (all config elements below top level key are strings). Returns True if it corresponds to a _repository_ (all config elements below top level key are themselves dictionaries). If config elements are both strings and dicts we assume the file is a release.

Raises ValueError if inconsistent throughout the config.

komodo.prettier.load_yaml(filename)
komodo.prettier.prettier(yaml_input_dict, check_type=True)

Takes in a string corresponding to a YAML Komodo configuration, and returns the corresponding prettified YAML string.

komodo.prettier.prettified_yaml(filepath, check_only=True)

Returns True if the file is already “prettified”, False otherwise. If check_only is False, the input file will be “prettified” in place if necessary.

komodo.prettier.repository_specific_formatting(empty_line_top_level, yaml_string)

Transform function to ruamel.yaml’s dump function. Makes sure there are only empty lines inbetween different top level keys (if empty_line_top_level is True, otherwise no empty lines).

komodo.prettier.write_to_file(repository, filename, check_type=True)
komodo.prettier.write_to_string(repository, check_type=True)

komodo.pypi_dependencies module

class komodo.pypi_dependencies.PypiDependencies(pypi_dependencies: Dict[str, str], to_install: Dict[str, str], python_version: str, cachefile: str = './pypi_dependencies.yml')

Bases: object

add_user_specified(package_name: str, depends: List[str]) None
dump_cache()
failed_requirements(packages=None)
>>>
>>> pypi_packages = {
...    "ert": "11.1.0",
...    "aiohttp": "3.10.10",
...    "deprecation": "2.1.0",
...    "filelock": "3.16.1",
...    "jinja2": "3.1.4",
...    "aiohappyeyeballs": "2.4.3",
...    "cryptography": "43.0.1",
...    "PyJWT": "2.3.0"}
>>> all_packages = {
...    **pypi_packages,
...    "xtgeo": "main",
...    "iterative_ensemble_smoother": "main"}
>>> dependencies = PypiDependencies(pypi_packages, all_packages, python_version="3.8")
>>> dependencies.add_user_specified("xtgeo", [])
>>> dependencies.add_user_specified("iterative_ensemble_smoother", [])
>>> dependencies.failed_requirements() 
Not installed: aiosignal...
satisfied(requirement: Requirement, package_name: str = '', extra=None) bool
>>> from packaging.requirements import Requirement
>>> PypiDependencies({}, {}, python_version="3.8").satisfied(
... Requirement("PyJWT[crypto] (<3, >=1.0.0)")
... )
Not installed: pyjwt
False
>>> packages = {"PyJWT": "2.3.0"}
>>> PypiDependencies(packages, packages, python_version="3.8").satisfied(
...     Requirement("PyJWT (<3, >=1.0.0)")
... )
True
used_packages(packages=None)
komodo.pypi_dependencies.format_full_version(info) str

komodo.release_cleanup module

komodo.release_cleanup.add_cleanup_parser(subparsers)
komodo.release_cleanup.add_prettier_parser(subparsers)
komodo.release_cleanup.check_missing_versions(used_versions, repository)
komodo.release_cleanup.find_unused_versions(used_versions, repository)
komodo.release_cleanup.load_all_releases(files)
komodo.release_cleanup.main(args=None)
komodo.release_cleanup.remove_unused_versions(repository, unused_versions)
komodo.release_cleanup.run_cleanup(args, parser)
komodo.release_cleanup.run_prettier(args, _)

komodo.release_transpiler module

komodo.release_transpiler.dir_path(should_be_valid_path: str) str
komodo.release_transpiler.get_py_coords(release_base: str, release_folder: str) Sequence[str]

Get python versions of release files inside a given release_folder.

komodo.release_transpiler.main()
komodo.release_transpiler.transpile(args)
komodo.release_transpiler.transpile_for_pip(args: Dict)
komodo.release_transpiler.transpile_releases(matrix_file: str, output_folder: str, matrix: dict) None

Transpile a matrix file possibly containing different os and framework versions (e.g. rhel6 and rhel7, py3.6 and py3.8). Write one dimension file for each element in the matrix (e.g. rhel7 and py3.8, rhel6 and py3.6).

komodo.release_transpiler.transpile_releases_for_pip(matrix_file: str, output_folder: str, repository_file: str, matrix: dict) None
komodo.release_transpiler.valid_file(path: str) str

komodo.shebang module

komodo.shebang.fixup_python_shebangs(prefix, release)

Fix shebang to $PREFIX/bin/python.

Some packages installed with pip do not respect target executable, that is, they set as their shebang executable the Python executable used to build the komodo distribution with instead of the Python executable that komodo deploys. This breaks the application since the corresponding Python modules won’t be picked up correctly.

For now, we use sed to rewrite the first line in some executables.

This is a hack that should be fixed at some point.

komodo.shell module

komodo.shell.pushd(path)
komodo.shell.shell(cmd: str, allow_failure=False) bytes

komodo.show_version module

komodo.show_version.get_komodo_path(release: str) Path

Use the release name to find the ‘real’ release path in an ordinary komodo environment. E.g., the release may be something like ‘2023.01.02-py38’ but the ‘real’ release (where the release manifest is stored) might be platform-specific, e.g. ‘2023.01.02-py38-rhel7’. The real path is in the PATH, so we try to get it from there.

Args:

release: The name of the release, e.g. from $KOMODO_RELEASE.

Returns:

The path to the release, where the ‘root/bin’ folder is.

komodo.show_version.get_komodoenv_path(release: str) Path

Use the release name to find the ‘real’ release path, but from a komodoenv environment. These environments overwrite the environment variable $KOMODO_RELEASE and $PATH, but they store the original path in the komodoenv at ‘root/pyvenv.cfg’.

Args:

release: The name of the release, e.g. as stored in the KOMODO_RELEASE

environment variable.

Returns:

The path to the release, where the ‘root/bin’ folder is.

komodo.show_version.get_release() str

Get the komodo release from the active environment.

The value of the KOMODO_RELEASE environment variable implicitly tells us the kind of environment we are in. If it looks like an ordinary name, it is probably a komodo environment. However, if it is a path, it is a komodoenv environment.

We need to know the kind of environment because komodo and komodoenv environments store their manifest files (and root folders) in different places.

komodo.show_version.get_version(pkg: str, manifest: Dict | None = None) str

Get the release number (or git commit hash) for a package in a komodo release file. If no file is specified, the current release is used. If no environment is active, the path to the release must be specified.

Args:

pkg: The name of the package to get the version for. manifest: Optional. A mapping of packages to dicts of version and

maintainer. Typically, this will come from the YAML file created by komodo when it builds a release.

Returns:

The version number or git hash of the version.

komodo.show_version.main() int

Run the CLI and return the result from get_version().

komodo.show_version.parse_args(args: List[str]) Namespace

Parse the arguments from the command line into an argparse.Namespace. Having a separated function makes it easier to test the CLI.

Args:

args: A sequence of arguments, e.g. as collected from the command line.

Returns:

The argparse.Namespace, a mapping of arg names to values.

komodo.show_version.read_config(fname: str | Path) dict

Read an INI file (aka config file) that does not have sections. Sections are part of the INI file format specification and cannot be read by a configparser.ConfigParser without them. This function creates a temporary ‘MAIN’ section and passes back its contents.

Args:

fname: the path to a ‘flat’ config file, i.e. one with no sections.

Returns:

The configuration.

komodo.snyk_reporting module

komodo.snyk_reporting.create_snyk_search_string(packages: Dict[str, str]) str
komodo.snyk_reporting.filter_pip_packages(packages: Dict[str, str], repository: Dict[str, Any]) Dict[str, str]
komodo.snyk_reporting.filter_vulnerability_issues(snyk_issues: List[Vulnerability], release_packages: Dict[str, str])
komodo.snyk_reporting.find_vulnerabilities(releases: Dict[str, Dict[str, str]], repository: Dict[str, Any], org: Organization) Dict[str, List[Vulnerability]]
komodo.snyk_reporting.get_unique_issues(issues: List[Vulnerability]) List[Vulnerability]
komodo.snyk_reporting.main() None
komodo.snyk_reporting.parse_args(args: List[str]) Namespace
komodo.snyk_reporting.snyk_main(releases: Dict[str, Dict[str, str]], repository: Dict[str, Any], api_token: str | None, org_id: str) Dict[str, List[Vulnerability]]

komodo.switch module

komodo.switch.create_activator_switch(data, prefix, release)

Given a prefix and a release, create an activator switch which will vary the selected activator based on the RHEL version and python version. The data argument is expected to be a komodo.data.Data instance.

komodo.yaml_file_types module

class komodo.yaml_file_types.KomodoError(package, version, maintainer, depends, err)

Bases: tuple

depends

Alias for field number 3

err

Alias for field number 4

maintainer

Alias for field number 2

package

Alias for field number 0

version

Alias for field number 1

exception komodo.yaml_file_types.KomodoException(error_message: KomodoError)

Bases: Exception

class komodo.yaml_file_types.ManifestFile(*args, **kwargs)

Bases: YamlFile

Return the data from ‘manifest’ YAML, but validate it first.

static validate_manifest_file(manifest_file_content: dict)
class komodo.yaml_file_types.Package

Bases: object

VALID_IMPORTANCES = ['low', 'medium', 'high']
VALID_MAKES = ['cmake', 'sh', 'pip', 'rsync', 'noop', 'download']
VALID_MATURITIES = ['experimental', 'stable', 'deprecated']
VALID_VISIBILITIES = ['public', 'private', 'private-plugin']
static validate_package_entry(package_name: str, package_version, is_matrix_file=False) None
static validate_package_entry_with_errors(package_name: str, package_version: str, is_matrix_file: bool = False) List[str]

Validates package name and version, and returns a list of error messages.

static validate_package_importance(package_name: str, package_importance: str) None
static validate_package_importance_with_errors(package_name, package_importance: str) List[str]

Validates package importance of a package and returns a list of error messages.

static validate_package_maintainer(package_name: str, package_version: str, package_maintainer: str) None
static validate_package_maintainer_with_errors(package_name: str, package_version: str, package_maintainer: str) List[str]

Validates maintainer of a package and returns a list of error messages.

static validate_package_make(package_name: str, package_version: str, package_make: str) None
static validate_package_make_with_errors(package_name: str, package_version: str, package_make: str) List[str]

Validates make of a package and returns a list of error messages.

static validate_package_maturity(package_name: str, package_maturity: str) None
static validate_package_maturity_with_errors(package_name: str, package_maturity: str) List[str]

Validates package maturity of a package and returns a list of error messages.

static validate_package_name(package_name: str) None
static validate_package_property_type(package_name: str, package_version: str, package_property: str, package_property_value: str)
static validate_package_source(package_name: str, package_version: str, package_source: str) None
static validate_package_source_with_errors(package_name: str, package_version: str, package_source: str) List[str]

Validates source of a package and returns a list of error messages.

static validate_package_version(package_name: str | None, package_version: str, is_matrix_file: bool = False) None
static validate_package_visibility(package_name: str, package_visibility: str) None
class komodo.yaml_file_types.PackageStatusFile(*args, **kwargs)

Bases: YamlFile

Return the data from ‘package_status’ YAML, but validate it first.

from_yaml_string(value: str)
validate_package_status_file() None
class komodo.yaml_file_types.ReleaseDir

Bases: object

class komodo.yaml_file_types.ReleaseFile(*args, **kwargs)

Bases: YamlFile

Return the data from ‘release’ YAML file, but validate it first.

from_yaml_string(value: bytes)
static validate_release_file(release_file_content: Mapping) None
class komodo.yaml_file_types.ReleaseMatrixFile(*args, **kwargs)

Bases: YamlFile

Return the data from ‘release’ YAML file, but validate it first.

classmethod from_yaml_string(value: bytes)
static validate_release_matrix_file(release_matrix_file_content: Mapping) None
komodo.yaml_file_types.Report

alias of LintReport

class komodo.yaml_file_types.RepositoryFile(*args, **kwargs)

Bases: YamlFile

Return the data from ‘repository’ YAML, but validate it first.

from_yaml_string(value: bytes)
lint_maintainer(package, version) KomodoError
validate_package_entry(package_name: str, package_version: str) KomodoError
validate_package_properties(package_name: str, package_version: str, package_property: str, package_property_value: str) List[str]

Validates package properties of the specified package and returns a list of error messages.

validate_repository_file() None
validate_versions(package_name: str, versions: dict) List[str]

Validates versions-dictionary of a package and returns a list of error messages.

class komodo.yaml_file_types.UpgradeProposalsFile(*args, **kwargs)

Bases: YamlFile

Return the data from ‘upgrade_proposals’ YAML, but validate it first.

from_yaml_string(value)
validate_upgrade_key(upgrade_key: str) None
static validate_upgrade_proposals_file(upgrade_proposals_file_content: dict) None
class komodo.yaml_file_types.YamlFile(*args, **kwargs)

Bases: FileType

komodo.yaml_file_types.handle_validation_errors(errors: Sequence[str], message: str)
komodo.yaml_file_types.load_package_status_file(package_status_string: str)
komodo.yaml_file_types.load_repository_file(repository_file_string)
komodo.yaml_file_types.load_yaml_from_string(value: str) dict

Module contents