[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "mlenvdoctor"
version = "0.1.3"
description = "Diagnose & fix ML environments for LLM fine-tuning"
readme = "README.md"
requires-python = ">=3.8"
license = {text = "MIT"}
authors = [
    {name = "ML Environment Doctor Contributors"}
]
keywords = ["machine-learning", "pytorch", "cuda", "llm", "fine-tuning", "diagnostics"]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
    "typer>=0.9.0",
    "rich>=13.0.0",
    "psutil>=5.9.0",
    "packaging>=23.0",
    "tomli>=2.0.0; python_version < '3.11'",
]

[project.optional-dependencies]
dev = [
    "pytest>=7.0.0",
    "pytest-cov>=4.0.0",
    "black>=23.0.0",
    "ruff>=0.1.0",
    "mypy>=1.0.0",
    "pre-commit>=3.0.0",
]

[project.scripts]
mlenvdoctor = "mlenvdoctor.cli:app"

[project.urls]
Homepage = "https://github.com/Dheena731/Ml-env-doctor"
Repository = "https://github.com/Dheena731/Ml-env-doctor.git"
Issues = "https://github.com/Dheena731/Ml-env-doctor/issues"

[tool.hatch.build.targets.wheel]
packages = ["src/mlenvdoctor"]

[tool.black]
line-length = 100
target-version = ['py38']

[tool.ruff]
line-length = 100
target-version = "py38"
select = [
    "E",  # pycodestyle errors
    "W",  # pycodestyle warnings
    "F",  # pyflakes
    "I",  # isort
    "B",  # flake8-bugbear
    "C4", # flake8-comprehensions
    "UP", # pyupgrade
    "ARG", # flake8-unused-arguments
    "SIM", # flake8-simplify
]
ignore = [
    "E501",  # line too long (handled by black)
    "B008",  # do not perform function calls in argument defaults
]

[tool.mypy]
python_version = "3.8"
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
strict_equality = true
show_error_codes = true

[[tool.mypy.overrides]]
module = [
    "tomli.*",
    "tomllib.*",
]
ignore_missing_imports = true

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = "-v --cov=mlenvdoctor --cov-report=term-missing"

