pyproject.toml (116 lines of code) (raw):
[project]
name = "terranova"
version = "0.6.6-dev"
description = "Terranova is a thin wrapper for Terraform that provides extra tools and logic to handle Terraform configurations at scale."
authors = [
{ name = "Adrien Mannocci", email = "adrien.mannocci@elastic.co" }
]
license = { text = "Apache-2.0" }
readme = "README.md"
classifiers = [
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.12",
]
requires-python = ">=3.12,<3.14"
dependencies = [
"click>=8.1.8", # BSD
"dataclasses-json>=0.6.7", # MIT
"envyaml>=1.10.211231", # MIT
"jinja2>=3.1.6", # BSD
"jsonschema>=4.23.0", # MIT
"mdformat>=0.7.22", # MIT
"overrides>=7.7.0", # Apache-2.0
"rich>=14.0.0", # MIT
"sh>=2.2.2", # MIT
]
[project.urls]
Repository = "https://github.com/elastic/terranova"
Documentation = "https://github.com/elastic/terranova"
Tracker = "https://github.com/elastic/terranova/issues"
[project.scripts]
terranova = "terranova.cli:main"
[dependency-groups]
build = [
"pyinstaller>=6.13.0", # GPL-2.0: https://pyinstaller.org/en/stable/license.html
]
dev = [
"licenseheaders>=0.8.8", # MIT
"poethepoet>=0.33.1", # MIT
"pytest-timeout>=2.3.1", # MIT
"pytest-xdist>=3.6.1", # MIT
"pytest>=8.3.5", # MIT
"ruff>=0.11.5", # MIT
]
[tool.uv]
default-groups = ["dev", "build"]
[tool.pyright] # Ref: https://zed.dev/docs/languages/python#virtual-environments
include = ["terranova", "scripts"]
pythonVersion = "3.12"
pythonPlatform = "All"
typeCheckingMode = "standard"
venvPath = "."
venv = ".venv"
[tool.poe.tasks."env:configure"]
help = "Setup project environment."
script = "scripts.env:configure"
[tool.poe.tasks."project:upgrade"]
help = "Upgrade project dependencies."
sequence = [
{ cmd = "uv sync -U" },
{ cmd = "pre-commit autoupdate" },
]
[tool.poe.tasks."project:license"]
help = "Add license header in codebase."
sequence = [
{ cmd = "licenseheaders -t .copyright.tmpl -d scripts" },
{ cmd = "licenseheaders -t .copyright.tmpl -d terranova --exclude terranova/templates/resources.md" },
]
[tool.poe.tasks."env:wipe"]
help = "Wipe project environment."
shell = """
import shutil
for path in ["build", "dist"]:
try:
shutil.rmtree(path)
except FileNotFoundError as err:
print(f"Skipping {path} deletion...")
"""
interpreter = "python"
[tool.poe.tasks.generate]
help = "Generate pyinstaller config."
script = "scripts.generate:run"
[tool.poe.tasks.lint]
help = "Lint code project."
script = "scripts.lint:run"
[tool.poe.tasks.fmt]
help = "Format code project."
sequence = [
{ cmd = "ruff check --select I --fix" },
{ cmd = "ruff format" }
]
[tool.poe.tasks.build]
deps = ["env:wipe"]
help = "Build standalone binary."
script = "scripts.build:run"
[tool.poe.tasks."test"]
help = "Run all tests."
cmd = "pytest --junitxml=reports/junit-report.xml -n=auto --timeout=900 --dist=loadgroup tests"
[tool.poe.tasks."test:e2e"]
help = "Run e2e tests."
cmd = "pytest --junitxml=reports/junit-report.xml -n=auto --timeout=900 --dist=loadgroup tests/e2e"
[tool.poe.tasks."release:pre"]
help = "Create a PR with changes for release."
script = "scripts.release:pre"
[tool.poe.tasks."release"]
help = "Create a new terranova release."
script = "scripts.release:run"
[tool.poe.tasks."release:post"]
help = "Prepare next iteration."
script = "scripts.release:post"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["terranova"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"