forked from ChristianLempa/boilerplates
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
109 lines (94 loc) · 2.55 KB
/
pyproject.toml
File metadata and controls
109 lines (94 loc) · 2.55 KB
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
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "boilerplates"
version = "0.1.3"
description = "CLI tool for managing infrastructure boilerplates"
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
authors = [ {name = "Christian Lempa"} ]
keywords = ["boilerplates", "cli", "infrastructure"]
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
dependencies = [
"typer[all]>=0.9.0",
"rich>=13.0.0",
"PyYAML>=6.0",
"python-frontmatter>=1.0.0",
"Jinja2>=3.0",
"email-validator>=2.0.0",
]
[project.scripts]
boilerplates = "cli.__main__:run"
[tool.setuptools.packages.find]
include = ["cli*"]
exclude = ["tests*", "scripts*"]
[tool.setuptools.package-data]
cli = ["core/schema/**/*.json"]
[tool.ruff]
# Extended line length for better readability
line-length = 120
# Python 3.9+ as minimum version
target-version = "py39"
# Exclude common directories
exclude = [
".git",
"__pycache__",
".venv",
"venv",
"build",
"dist",
"*.egg-info",
]
[tool.ruff.lint]
# Enable rule categories
select = [
"E", # pycodestyle errors
"F", # Pyflakes
"W", # pycodestyle warnings
"I", # isort (import sorting)
"N", # pep8-naming
"UP", # pyupgrade (modern Python syntax)
"B", # flake8-bugbear (likely bugs)
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
"RET", # flake8-return
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"PL", # Pylint
"RUF", # Ruff-specific rules
"T20", # flake8-print
]
# Allow auto-fixing for these rules
fixable = ["ALL"]
unfixable = []
[tool.ruff.format]
# Use PEP 8 standard: 4 spaces for indentation
indent-style = "space"
# Use double quotes (consistent with Python conventions)
quote-style = "double"
# Unix line endings
line-ending = "lf"
[tool.ruff.lint.per-file-ignores]
# CLI command functions need many parameters for command-line arguments
"cli/core/module/base_module.py" = ["PLR0913"] # generate() needs all CLI options
"cli/core/repo.py" = ["PLR0913"] # add() needs all library config options
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"--strict-markers",
"--strict-config",
"--tb=short",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
]