Files

114 lines
2.7 KiB
TOML

[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "boilerplates"
version = "0.2.1"
description = "CLI tool for managing infrastructure boilerplates"
readme = "README.md"
requires-python = ">=3.9"
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",
"click==8.1.4",
]
[project.optional-dependencies]
test = [
"pytest>=8.0.0",
]
[project.scripts]
boilerplates = "cli.__main__:run"
[tool.setuptools.packages.find]
include = ["cli*"]
exclude = ["tests*", "scripts*"]
[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
"tests/test_repo.py" = ["PLR0913", "ARG001"] # monkeypatched repo helpers mirror production call signatures
[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",
]