文件内容
references/pyproject.toml
# Example pyproject.toml for MLOps projects
# Copy and customize for your project
[project]
name = "my-mlops-project"
version = "0.1.0"
description = "A robust MLOps project"
readme = "README.md"
requires-python = ">=3.11"
license = { file = "LICENSE" }
authors = [
{ name = "Your Name", email = "your.email@example.com" }
]
dependencies = [
"pandas>=2.2.0",
"loguru>=0.7.0",
"pydantic>=2.0.0",
# Add runtime dependencies here
]
[project.urls]
Repository = "https://github.com/username/my-mlops-project"
Documentation = "https://username.github.io/my-mlops-project"
[project.optional-dependencies]
dev = [
"pytest>=8.0.0",
"pytest-cov>=4.0.0",
"ruff>=0.3.0",
"mypy>=1.9.0",
"pre-commit>=3.0.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
# Ruff configuration
[tool.ruff]
line-length = 88
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "N", "UP", "B", "C4", "SIM"]
ignore = ["E501"]
# MyPy configuration
[tool.mypy]
python_version = "3.11"
strict = true
warn_return_any = true
warn_unused_configs = true
# Pytest configuration
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
addopts = "-v --cov=src --cov-report=term-missing"
# UV configuration
[tool.uv]
dev-dependencies = [
"pytest>=8.0.0",
"pytest-cov>=4.0.0",
"ruff>=0.3.0",
"mypy>=1.9.0",
"pre-commit>=3.0.0",
]