[build-system]
requires = ["setuptools>=61.0", "setuptools-scm>=8.0"]
build-backend = "setuptools.build_meta"

[project]
name = "deltaglider"
dynamic = ["version"]
description = "Store 4TB in 5GB: S3-compatible storage with 99.9% compression for versioned files"
authors = [
    {name = "Beshu Tech", email = "info@beshu.tech"},
]
maintainers = [
    {name = "Beshu Tech Team", email = "info@beshu.tech"},
]
readme = "README.md"
license = "MIT"
requires-python = ">=3.11"
keywords = [
    "s3",
    "compression",
    "delta",
    "storage",
    "backup",
    "deduplication",
    "xdelta3",
    "binary-diff",
    "artifact-storage",
    "version-control",
    "minio",
    "aws",
    "cost-optimization",
    "devops",
]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "Intended Audience :: System Administrators",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Topic :: System :: Archiving :: Backup",
    "Topic :: System :: Archiving :: Compression",
    "Topic :: System :: Filesystems",
    "Topic :: Internet",
    "Environment :: Console",
]

dependencies = [
    "boto3>=1.35.0",
    "click>=8.1.0",
    "cryptography>=42.0.0",
    "python-dateutil>=2.9.0",
    "requests>=2.32.0",
]

[project.urls]
Homepage = "https://github.com/beshu-tech/deltaglider"
Documentation = "https://github.com/beshu-tech/deltaglider#readme"
Repository = "https://github.com/beshu-tech/deltaglider"
Issues = "https://github.com/beshu-tech/deltaglider/issues"
Changelog = "https://github.com/beshu-tech/deltaglider/releases"
"Case Study" = "https://github.com/beshu-tech/deltaglider/blob/main/docs/case-study-readonlyrest.md"

[project.optional-dependencies]
dev = [
    "pytest>=8.0.0",
    "pytest-mock>=3.14.0",
    "pytest-asyncio>=0.24.0",
    "moto[s3]>=5.0.0",
    "ruff>=0.8.0",
    "mypy>=1.13.0",
    "boto3-stubs[s3]>=1.35.0",
    "types-python-dateutil>=2.9.0",
]

[project.scripts]
deltaglider = "deltaglider.app.cli.main:main"


[tool.hatch.build.targets.sdist]
include = [
    "/src",
    "/tests",
    "/docs",
    "README.md",
    "LICENSE",
    "CONTRIBUTING.md",
    "pyproject.toml",
]
exclude = [
    "*.pyc",
    "__pycache__",
    ".git",
    ".pytest_cache",
    "*.delta",
    "reference.bin",
    "1.66.1/",
]

[tool.uv]
dev-dependencies = [
    "pytest>=8.0.0",
    "pytest-mock>=3.14.0",
    "pytest-asyncio>=0.24.0",
    "moto[s3]>=5.0.0",
    "ruff>=0.8.0",
    "mypy>=1.13.0",
    "boto3-stubs[s3]>=1.35.0",
    "types-python-dateutil>=2.9.0",
    "types-requests>=2.32.0",
    "setuptools-scm>=8.0.0",
]

[tool.setuptools_scm]
# Automatically determine version from git tags
write_to = "src/deltaglider/_version.py"
local_scheme = "no-local-version"

[tool.ruff]
target-version = "py311"
line-length = 100
extend-exclude = ["src/deltaglider/_version.py"]

[tool.ruff.lint]
select = [
    "E",   # pycodestyle errors
    "W",   # pycodestyle warnings
    "F",   # pyflakes
    "I",   # isort
    "B",   # flake8-bugbear
    "UP",  # pyupgrade
]
ignore = ["E501"]  # line too long

[tool.ruff.format]
quote-style = "double"
indent-style = "space"

[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_any_unimported = false
no_implicit_optional = true
check_untyped_defs = true
namespace_packages = false
mypy_path = "src"
exclude = [
    "^build/",
    "^dist/",
]

[tool.pytest.ini_options]
minversion = "8.0"
testpaths = ["tests"]
markers = [
    "e2e: end-to-end tests requiring LocalStack",
    "integration: integration tests",
    "unit: unit tests",
]