pyproject.toml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. [build-system]
  2. requires = ["setuptools>=61.0", "wheel"]
  3. build-backend = "setuptools.build_meta"
  4. [project]
  5. name = "boilerplates"
  6. version = "0.2.1"
  7. description = "CLI tool for managing infrastructure boilerplates"
  8. readme = "README.md"
  9. requires-python = ">=3.9"
  10. license = "MIT"
  11. authors = [ {name = "Christian Lempa"} ]
  12. keywords = ["boilerplates", "cli", "infrastructure"]
  13. classifiers = [
  14. "Programming Language :: Python :: 3",
  15. "Operating System :: OS Independent",
  16. ]
  17. dependencies = [
  18. "typer[all]>=0.9.0",
  19. "rich>=13.0.0",
  20. "PyYAML>=6.0",
  21. "python-frontmatter>=1.0.0",
  22. "Jinja2>=3.0",
  23. "email-validator>=2.0.0",
  24. ]
  25. [project.optional-dependencies]
  26. test = [
  27. "pytest>=8.0.0",
  28. ]
  29. [project.scripts]
  30. boilerplates = "cli.__main__:run"
  31. [tool.setuptools.packages.find]
  32. include = ["cli*"]
  33. exclude = ["tests*", "scripts*"]
  34. [tool.ruff]
  35. # Extended line length for better readability
  36. line-length = 120
  37. # Python 3.9+ as minimum version
  38. target-version = "py39"
  39. # Exclude common directories
  40. exclude = [
  41. ".git",
  42. "__pycache__",
  43. ".venv",
  44. "venv",
  45. "build",
  46. "dist",
  47. "*.egg-info",
  48. ]
  49. [tool.ruff.lint]
  50. # Enable rule categories
  51. select = [
  52. "E", # pycodestyle errors
  53. "F", # Pyflakes
  54. "W", # pycodestyle warnings
  55. "I", # isort (import sorting)
  56. "N", # pep8-naming
  57. "UP", # pyupgrade (modern Python syntax)
  58. "B", # flake8-bugbear (likely bugs)
  59. "C4", # flake8-comprehensions
  60. "SIM", # flake8-simplify
  61. "RET", # flake8-return
  62. "ARG", # flake8-unused-arguments
  63. "PTH", # flake8-use-pathlib
  64. "PL", # Pylint
  65. "RUF", # Ruff-specific rules
  66. "T20", # flake8-print
  67. ]
  68. # Allow auto-fixing for these rules
  69. fixable = ["ALL"]
  70. unfixable = []
  71. [tool.ruff.format]
  72. # Use PEP 8 standard: 4 spaces for indentation
  73. indent-style = "space"
  74. # Use double quotes (consistent with Python conventions)
  75. quote-style = "double"
  76. # Unix line endings
  77. line-ending = "lf"
  78. [tool.ruff.lint.per-file-ignores]
  79. # CLI command functions need many parameters for command-line arguments
  80. "cli/core/module/base_module.py" = ["PLR0913"] # generate() needs all CLI options
  81. "cli/core/repo.py" = ["PLR0913"] # add() needs all library config options
  82. "tests/test_repo.py" = ["PLR0913", "ARG001"] # monkeypatched repo helpers mirror production call signatures
  83. [tool.pytest.ini_options]
  84. testpaths = ["tests"]
  85. python_files = ["test_*.py"]
  86. python_classes = ["Test*"]
  87. python_functions = ["test_*"]
  88. addopts = [
  89. "-v",
  90. "--strict-markers",
  91. "--strict-config",
  92. "--tb=short",
  93. ]
  94. markers = [
  95. "slow: marks tests as slow (deselect with '-m \"not slow\"')",
  96. "integration: marks tests as integration tests",
  97. ]