content: [build-system]
  requires = ["setuptools", "wheel"]
  build-backend = "setuptools.build_meta"
  
  [tool.setuptools.packages.find]
  include = ["kubemarine*"]
  
  [project]
  dynamic = ["version", "readme"]
  name = "kubemarine"
  description = "Management tool for Kubernetes cluster deployment and maintenance"
  authors = [
      {name = "Kubemarine Group", email = "kubemarinegroup@netcracker.com"},
  ]
  license = {text = "Apache-2.0"}
  classifiers = [
      "License :: OSI Approved :: Apache Software License",
      "Programming Language :: Python",
      "Programming Language :: Python :: 3.8",
      "Programming Language :: Python :: 3.9",
      "Programming Language :: Python :: 3.10",
      "Programming Language :: Python :: 3.11",
      "Programming Language :: Python :: 3.12",
      "Operating System :: OS Independent",
      "Intended Audience :: System Administrators",
      "Intended Audience :: Developers",
      "Development Status :: 5 - Production/Stable",
      "Environment :: Console",
  ]
  keywords = ["kubernetes", "devops", "administration", "helm"]
  dependencies = [
      "PyYAML==6.0.*",
      "deepmerge==1.1.*",
      "fabric==3.2.*",
      "jinja2==3.1.*",
      "MarkupSafe==2.1.*",
      "invoke==2.2.*",
      "ruamel.yaml==0.18.*",
      "pygelf==0.4.*",
      "toml==0.10.*",
      "python-dateutil==2.9.*",
      "deepdiff==7.0.*",
      "ordered-set==4.1.*",
      # Each time cryptography version is updated, need to regenerate scripts/ci/custom-hooks/hook-cryptography.py
      "cryptography==44.0.1",
      "paramiko==3.4.*",
      "jsonschema==4.22.*",
      "referencing==0.35.*",
      "typing_extensions==4.11.*",
      "pathvalidate==3.2.*",
      "useful_types==0.2.*",
      "packaging==24.1.*"
  ]
  requires-python = ">=3.8"
  
  [project.optional-dependencies]
  ansible = ["ansible==11.4.*"]
  mypy = [
      "mypy==1.10.*",
      "types-PyYAML==6.0.*",
      "types-toml==0.10.*",
      "types-python-dateutil==2.9.*",
      "types-paramiko==3.4.*",
      "types-jsonschema==4.22.*",
      "types-pyinstaller==6.6.0.*",
  ]
  pylint = [
      "pylint==3.1.*"
  ]
  
  # Auxiliary executable roughly equivalent to python -m kubemarine
  # Allows to not worry about exact path to python executable on the client machine
  # Should still no be called directly as it does not ensure necessary environment variables.
  # Real executables are installed by setup.py
  [project.scripts]
  _kubemarine = "kubemarine.__main__:main"
  
  [project.urls]
  Homepage = "https://github.com/Netcracker/KubeMarine"
  Documentation = "https://github.com/Netcracker/KubeMarine#documentation"
  Issues = "https://github.com/Netcracker/KubeMarine/issues/"
  
  # To change version with automatic push and triggering of the release workflow use
  # 1. pip install bumpver
  # 2. bumpver update --set-version <new version>
  [tool.bumpver]
  current_version = "v0.41.0"
  version_pattern = "vMAJOR.MINOR.PATCH"
  commit_message = "bump version to {new_version}"
  commit = true
  tag = true
  push = true
  
  [tool.bumpver.file_patterns]
  "pyproject.toml" = [
      'current_version = "{version}"',
  ]
  "kubemarine/version" = [
      '^{version}$'
  ]
  
  [tool.pylint.main]
  py-version = "3.8"
  init-hook = 'import sys; sys.path.append("scripts/thirdparties")'
  
  load-plugins = [
      "pylint.extensions.bad_builtin"
  ]
  
  # Without `fail-under`, pylint fails if at least one message is printed.
  # Still, do not remove `fail-on` section, because it has precedence over `disable`,
  # and thus prevents from accidental disabling.
  # Also, it contains inline recommendations about particular messages.
  fail-on = [
      # Messages with numerical IDs `E\d+` or `F\d+`.
      "E", "F",
      # Use logging framework as much as possible instead of print().
      "bad-builtin",
      # https://github.com/pyinstaller/pyinstaller/issues/1687
      "consider-using-sys-exit",
      # Considered more error prone because we have __main__ startup dependent on the initial procedure.
      "cyclic-import",
      # Since we use ruamel.yaml, using of `type() == ` checks is considered more error prone.
      "unidiomatic-typecheck",
      # Consider using kubemarine.core.utils.open_(external|internal).
      "unspecified-encoding",
      # List of other warnings that are considered more error prone
      "arguments-differ",
      "arguments-renamed",
      "cell-var-from-loop",
      "implicit-str-concat",
      "undefined-loop-variable",
  ]
  
  [tool.pylint.format]
  max-line-length = 130
  
  [tool.pylint."messages control"]
  disable = [
      # Refactor
      "duplicate-code",
      "inconsistent-return-statements",
      "no-else-raise",
      "no-else-return",
      "too-few-public-methods",
      "too-many-arguments",
      "too-many-branches",
      "too-many-instance-attributes",
      "too-many-lines",
      "too-many-locals",
      "too-many-public-methods",
      "too-many-statements",
      # Convention
      "consider-using-f-string",
      "import-outside-toplevel",
      "invalid-name",
      "missing-final-newline",
      "missing-function-docstring",
      "missing-module-docstring",
      "missing-class-docstring",
      "trailing-newlines",
      "trailing-whitespace",
      "typevar-name-incorrect-variance",
      # Warnings
      "broad-exception-caught",
      "broad-exception-raised",
      "f-string-without-interpolation",
      "fixme",
      "redefined-outer-name",
      "unnecessary-pass",
  ]
  
  [tool.pylint.deprecated_builtins]
  bad-functions = ["print"]
  
  [tool.mypy]
  files = ["kubemarine", "scripts"]
  
  # various configuration and code checks
  warn_unused_configs = true
  warn_redundant_casts = true
  warn_unused_ignores = true
  warn_unreachable = true
  
  # strict typing checks
  check_untyped_defs = true
  strict_equality = true
  extra_checks = true
  disallow_subclassing_any = true
  disallow_untyped_decorators = true
  disallow_incomplete_defs = true
  disallow_untyped_defs = true
  disallow_untyped_calls = true
  warn_return_any = true
  
  # permissive configuration
  implicit_optional = true
  
  # https://github.com/python/mypy/issues/12664
  incremental = false
  