pyproject.toml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. "click==8.1.4",
  25. ]
  26. [project.optional-dependencies]
  27. test = [
  28. "pytest>=8.0.0",
  29. ]
  30. [project.scripts]
  31. boilerplates = "cli.__main__:run"
  32. [tool.setuptools.packages.find]
  33. include = ["cli*"]
  34. exclude = ["tests*", "scripts*"]
  35. [tool.ruff]
  36. # Extended line length for better readability
  37. line-length = 120
  38. # Python 3.9+ as minimum version
  39. target-version = "py39"
  40. # Exclude common directories
  41. exclude = [
  42. ".git",
  43. "__pycache__",
  44. ".venv",
  45. "venv",
  46. "build",
  47. "dist",
  48. "*.egg-info",
  49. ]
  50. [tool.ruff.lint]
  51. # Enable rule categories
  52. select = [
  53. "E", # pycodestyle errors
  54. "F", # Pyflakes
  55. "W", # pycodestyle warnings
  56. "I", # isort (import sorting)
  57. "N", # pep8-naming
  58. "UP", # pyupgrade (modern Python syntax)
  59. "B", # flake8-bugbear (likely bugs)
  60. "C4", # flake8-comprehensions
  61. "SIM", # flake8-simplify
  62. "RET", # flake8-return
  63. "ARG", # flake8-unused-arguments
  64. "PTH", # flake8-use-pathlib
  65. "PL", # Pylint
  66. "RUF", # Ruff-specific rules
  67. "T20", # flake8-print
  68. ]
  69. # Allow auto-fixing for these rules
  70. fixable = ["ALL"]
  71. unfixable = []
  72. [tool.ruff.format]
  73. # Use PEP 8 standard: 4 spaces for indentation
  74. indent-style = "space"
  75. # Use double quotes (consistent with Python conventions)
  76. quote-style = "double"
  77. # Unix line endings
  78. line-ending = "lf"
  79. [tool.ruff.lint.per-file-ignores]
  80. # CLI command functions need many parameters for command-line arguments
  81. "cli/core/module/base_module.py" = ["PLR0913"] # generate() needs all CLI options
  82. "cli/core/repo.py" = ["PLR0913"] # add() needs all library config options
  83. "tests/test_repo.py" = ["PLR0913", "ARG001"] # monkeypatched repo helpers mirror production call signatures
  84. [tool.pytest.ini_options]
  85. testpaths = ["tests"]
  86. python_files = ["test_*.py"]
  87. python_classes = ["Test*"]
  88. python_functions = ["test_*"]
  89. addopts = [
  90. "-v",
  91. "--strict-markers",
  92. "--strict-config",
  93. "--tb=short",
  94. ]
  95. markers = [
  96. "slow: marks tests as slow (deselect with '-m \"not slow\"')",
  97. "integration: marks tests as integration tests",
  98. ]