Copy the committed lab 1 sources as-is: src/, student-tests/, bench/, Dockerfile, docker-compose.yml, pyproject.toml, uv.lock, .python-version, config_example.toml, AGENTS.md, CLAUDE.md, .claude/, openspec/, .graphifyignore and KNOWN_ISSUES.md. Lab 1 evidence stays in the lab 1 repository. Merge the new skeleton files with own sections: Makefile (lab 2 targets plus own run, docker, bench and common targets), .gitignore, .dockerignore and .env.example. Rename the image to mtusi-messenger:lab2 and point AGENTS.md at lab 2. The application is still the in-memory lab 1 implementation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
80 lines
2.5 KiB
TOML
80 lines
2.5 KiB
TOML
[project]
|
|
name = "mtusi-messenger"
|
|
version = "0.1.0"
|
|
description = "Lab 1: Docker and in-memory messenger"
|
|
requires-python = "==3.12.*"
|
|
|
|
dependencies = [
|
|
"pydantic>=2.6.3,<3.0.0",
|
|
"pydantic-settings>=2.15.0,<3.0.0",
|
|
# 0.137.2+: iter_route_contexts для полного шаблона пути в логах
|
|
"fastapi[all]>=0.137.2,<1.0.0",
|
|
"uvicorn>=0.29.0,<1.0.0",
|
|
"structlog>=24.1.0,<25.0.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"ruff>=0.11.13,<1.0.0",
|
|
]
|
|
|
|
|
|
[tool.ruff]
|
|
line-length = 79
|
|
target-version = "py312"
|
|
# student-tests: хелперы набора импортируются как модули первого уровня
|
|
src = [".", "student-tests"]
|
|
# публичные проверки skeleton не форматируем и не правим
|
|
extend-exclude = ["tests", "scripts"]
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "W505", "COM812", "F401", "B", "C4", "ARG", "UP", "SIM", "Q"]
|
|
ignore = ["E501"]
|
|
|
|
[tool.ruff.format]
|
|
quote-style = "preserve"
|
|
skip-magic-trailing-comma = false
|
|
indent-style = "space"
|
|
|
|
[tool.uv]
|
|
concurrent-downloads = 12 # одновременных HTTP-запросов (по умолчанию 50)
|
|
#concurrent-installs = 6 # распаковка/копирование колёс (по умолчанию зависит от количества ядер процессора)
|
|
#concurrent-builds = 4 # сборка sdist-пакетов из исходников (по умолчанию зависит от количества ядер процессора)
|
|
|
|
[build-system]
|
|
requires = ["hatchling>=1.19.0"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"openapi-spec-validator==0.7.2",
|
|
"black>=25.12.0",
|
|
"pre-commit>=4.5.0",
|
|
# student-tests: black-box тесты по HTTP (make student_test)
|
|
"pytest>=9.1.1,<10",
|
|
"httpx>=0.28.1,<1",
|
|
"jsonschema>=4.26.0,<5",
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["student-tests"]
|
|
# каталог с дефисом не пакет: хелперы импортируются как модули
|
|
pythonpath = ["student-tests"]
|
|
addopts = "-v -rP --strict-markers"
|
|
markers = [
|
|
"spec(capability, scenario): сценарий основного спека, который проверяет тест",
|
|
]
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src"]
|
|
|
|
[tool.hatch.metadata]
|
|
allow-direct-references = true
|
|
|
|
|
|
[tool.black]
|
|
line-length = 79
|
|
target-version = ["py312"]
|
|
skip-string-normalization = false
|
|
skip-magic-trailing-comma = false
|