Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
63 lines (57 loc) · 1.88 KB
/
Copy pathpyproject.toml
File metadata and controls
63 lines (57 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
[project]
name = "retail-inventory-api"
version = "0.0.0"
description = "REST API for retail inventory management"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"django>=5.2.0",
"psycopg2-binary>=2.9.11",
"pydantic>=2.12.5",
"pydantic-settings>=2.12.0",
"python-dotenv>=1.2.1",
"python-multipart>=0.0.22",
"python-json-logger>=4.0.0",
"sqlmodel>=0.0.34",
"uvicorn[standard]>=0.41.0",
"alembic>=1.18.4",
]
# Without this, setuptools' flat-layout auto-discovery sees `app`, `migrations`
# and the runtime `logs` directory as rival top-level packages and refuses to
# build, so the project cannot be installed from its own manifest.
[tool.setuptools]
packages = ["app"]
# Every test is a plain function taking fixtures, so Django's own unittest
# runner collects none of the 67. `tests/conftest.py` already points Django at
# these settings, but from inside the suite, where a tool deciding HOW to run
# the suite cannot see it; the pytest configuration is where that belongs.
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "app.settings"
[dependency-groups]
dev = [
"pytest>=9.0.2",
# Reads DJANGO_SETTINGS_MODULE above; without it that key is inert.
"pytest-django>=4.9.0",
"pytest-cov>=7.0.0",
"ruff>=0.15.1",
"taskipy>=1.14.1",
]
[tool.ruff]
line-length = 88
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I"]
ignore = ["E501"] # Ignore line-too-long
[tool.taskipy.tasks]
build = "docker compose up --build -d"
start = "docker compose up -d"
stop = "docker compose down"
restart = "docker compose down && docker compose up -d"
logs = "docker compose logs -f"
dev = "uv run uvicorn main:app --reload --no-server-header"
test = "uv run pytest -v"
dev_test = "uv run ruff check . && uv run pytest -v"
format = "uv run ruff format ."
lint = "uv run ruff check ."
fix = "uv run ruff check --fix ."
lock = "uv lock"