pyproject.toml 2.6 KB

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