Initial project setup and dependencies
Set up Python 3.12.11 FastAPI project with security-focused dependency management. Dependencies: - FastAPI 0.123.9: Modern web framework - Uvicorn 0.38.0: ASGI server with standard extras - Pydantic 2.12.5: Data validation (updated for pydantic-ai) - PydanticAI 1.27.0: LLM agent framework with Ollama support - HTTPX 0.28.1: Async HTTP client - SSE-Starlette 3.0.2: Server-Sent Events for streaming - python-dotenv 1.2.1: Environment configuration Security: - All packages checked for CVEs (as of 2025-12-06) - Minor version locking (>=X.Y,<X.(Y+1)) for supply chain protection - CVE status documented in requirements.txt Development tools: - pytest 8.3.5 + pytest-asyncio for async testing - pytest-cov 6.0.0 for coverage reporting - ruff 0.8.6 for linting and formatting - mypy 1.14.1 for type checking Configuration: - pyproject.toml: Build system, coverage, ruff, and mypy config - .env.example: Environment variable template - .gitignore: Comprehensive Python/FastAPI patterns Target model: mistral-nemo:latest on external Ollama instance 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=68.0"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "tatlock"
|
||||
version = "0.1.0"
|
||||
description = "OpenAI-compatible API with Ollama backend"
|
||||
requires-python = ">=3.12"
|
||||
dependencies = []
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
asyncio_mode = "auto"
|
||||
|
||||
[tool.coverage.run]
|
||||
source = ["src"]
|
||||
branch = true
|
||||
omit = [
|
||||
"*/tests/*",
|
||||
"*/__pycache__/*",
|
||||
"*/site-packages/*",
|
||||
"*/.venv/*",
|
||||
]
|
||||
|
||||
[tool.coverage.report]
|
||||
precision = 2
|
||||
show_missing = true
|
||||
skip_covered = false
|
||||
exclude_lines = [
|
||||
"pragma: no cover",
|
||||
"def __repr__",
|
||||
"raise AssertionError",
|
||||
"raise NotImplementedError",
|
||||
"if __name__ == .__main__.:",
|
||||
"if TYPE_CHECKING:",
|
||||
"@abstractmethod",
|
||||
]
|
||||
|
||||
[tool.coverage.html]
|
||||
directory = "htmlcov"
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 100
|
||||
target-version = "py312"
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = [
|
||||
"E", # pycodestyle errors
|
||||
"W", # pycodestyle warnings
|
||||
"F", # pyflakes
|
||||
"I", # isort
|
||||
"B", # flake8-bugbear
|
||||
"C4", # flake8-comprehensions
|
||||
"UP", # pyupgrade
|
||||
]
|
||||
ignore = [
|
||||
"E501", # line too long (handled by formatter)
|
||||
"B008", # do not perform function calls in argument defaults
|
||||
"C901", # too complex
|
||||
]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"__init__.py" = ["F401"]
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.12"
|
||||
warn_return_any = true
|
||||
warn_unused_configs = true
|
||||
disallow_untyped_defs = true
|
||||
disallow_incomplete_defs = true
|
||||
check_untyped_defs = true
|
||||
no_implicit_optional = true
|
||||
warn_redundant_casts = true
|
||||
warn_unused_ignores = true
|
||||
warn_no_return = true
|
||||
strict_equality = true
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = ["sse_starlette.*", "pydantic_ai.*"]
|
||||
ignore_missing_imports = true
|
||||
Reference in New Issue
Block a user