dev: add dev tools, pre-commit, Makefile, contributing, changelog, CI, and fix python version

This commit is contained in:
2025-06-18 06:01:01 +02:00
parent 2557aacd5d
commit b0b663b7d8
7 changed files with 423 additions and 1 deletions

View File

@ -3,7 +3,7 @@ name = "compose"
version = "0.1.0"
description = "A simple Python package for managing Docker Compose files"
readme = "README.md"
requires-python = ">=3.13"
requires-python = ">=3.9"
dependencies = [
"pydantic>=2.11.7",
"pytest>=8.4.0",
@ -11,6 +11,16 @@ dependencies = [
"ruff>=0.12.0",
]
[project.optional-dependencies]
dev = [
"mypy>=1.8.0",
"pre-commit>=3.6.0",
"pytest-cov>=4.1.0",
"pytest-mock>=3.12.0",
"hypothesis>=6.98.0",
"types-PyYAML>=6.0.12",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
@ -66,3 +76,53 @@ lint.ignore = [
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "D103", "PLR2004"]
[tool.mypy]
python_version = "3.9"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--strict-markers",
"--strict-config",
"--cov=src",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-report=xml",
]
[tool.coverage.run]
source = ["src"]
omit = [
"*/tests/*",
"*/test_*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]