-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
137 lines (115 loc) · 3.41 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
[project]
name = "terranova"
version = "0.6.5-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 = "[email protected]" }
]
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.7", # BSD
"dataclasses-json>=0.6.7", # MIT
"envyaml>=1.10.211231", # MIT
"jinja2>=3.1.4", # BSD
"jsonschema>=4.23.0", # MIT
"mdformat>=0.7.18", # MIT
"overrides>=7.7.0", # Apache-2.0
"rich>=13.9.4", # MIT
"sh>=2.1.0", # 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.11.1", # GPL-2.0: https://pyinstaller.org/en/stable/license.html
]
dev = [
"licenseheaders>=0.8.8", # MIT
"poethepoet>=0.30.0", # MIT
"pytest-timeout>=2.3.1", # MIT
"pytest-xdist>=3.6.1", # MIT
"pytest>=8.3.3", # MIT
"ruff>=0.8.0", # 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 lock" },
{ 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.wipe]
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 = ["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"