-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
116 lines (105 loc) · 4.31 KB
/
Copy pathpyproject.toml
File metadata and controls
116 lines (105 loc) · 4.31 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
[project]
name = "archiver"
version = "4.24.0"
description = "Cannabis Observer Archiver service — central registry for Information Items, Information Sources, Source Revisions, and Replication Specifications."
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"fastapi>=0.115.0,<1",
"python-json-logger>=4.0.0,<5",
"uvicorn>=0.34.0,<1",
"sqlalchemy[asyncio]>=2.0,<3",
"asyncpg>=0.30.0,<1",
"alembic>=1.15.0,<2",
"python-ulid>=3.0.0,<4",
"beautifulsoup4>=4.12.0,<5",
"lxml>=5.0,<7",
"jsonschema>=4.21.0,<5",
"httpx>=0.28.0,<1",
"redis[hiredis]>=5",
"jinja2>=3.1.0,<4",
"aiofiles>=24.1.0,<25",
"python-multipart>=0.0.9,<1",
"co-core[extract]>=0.19.6,<0.20",
"co-core-aio[bus]>=0.19.6,<0.20",
"archiver-client",
]
[dependency-groups]
dev = [
"openapi-python-client>=0.21,<1",
"pre-commit>=4.5.1,<5",
"pytest>=9.1.1,<10",
"pytest-asyncio>=1.3.0,<2",
"pytest-cov>=6.0,<7",
"pyyaml>=6,<7", # tests/scripts parse .github/workflows/ci.yml (archiver#248)
"respx>=0.22",
"ruff>=0.16.8,<0.17",
"fakeredis>=2.20",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-v --tb=short"
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "session"
asyncio_default_test_loop_scope = "session"
filterwarnings = [
"error::DeprecationWarning",
]
markers = [
"integration: cross-component flow requiring TEST_DATABASE_URL + fakeredis; excluded from pre-ship via `-m \"not integration\"`, exercised separately in CI",
]
[tool.ruff]
line-length = 100
target-version = "py312"
# ruff 0.16 added `*.md` to the default `include`, so `format` now reaches the
# `python` fences inside documentation (#242). Markdown stays in scope — the
# live docs' samples are worth formatting — with two trees held out:
#
# docs/plans/ dated snapshots of what was proposed at the time, not
# maintained source; reformatting their samples rewrites a
# record. CHANGELOG.md is dated too and stays IN scope: its
# samples are migration guidance a reader runs today, where a
# plan's are a closed record of what was once intended.
# skills/ overrides quoting vendor skill text, and the tree where a
# file-level symlink into skills-vendor/ lives. The main CI
# workflow checks out no submodules, so ruff reading that link is
# `io: No such file or directory` — a red build with no formatting
# opinion in it. Holding the tree out rather than the one path
# also keeps override text byte-comparable with its vendor, which
# is what the re-sync merges in #243 diff against.
#
# clients/python/src/archiver_client/generated/ is NOT listed here: that tree
# carries its own [tool.ruff] table (clients/python/pyproject.toml), and a
# nested config is the one that governs the files beneath it — this entry never
# reached them. The exclusion lives there now; tests/scripts/test_ruff_config.py
# pins all of it.
exclude = ["skills/", "skills-vendor/", "docs/plans/"]
[tool.ruff.lint]
select = ["E", "F", "I", "W", "UP"]
# PLC0415 enforces the AGENTS.md "no inline module imports" convention (#97).
# `if TYPE_CHECKING:` guards are module-level and not flagged. The vendored
# clients under clients/ resolve their own [tool.ruff] config and are unaffected;
# their generated code imports lazily to dodge circular imports.
extend-select = ["B904", "PLC0415"]
[tool.ruff.lint.isort]
known-first-party = ["src"]
known-third-party = ["alembic"]
[tool.coverage.run]
source = ["src"]
[tool.coverage.report]
show_missing = true
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src"]
[tool.uv]
# cannobserv workspace packages (co-core, co-core-aio) resolve from the local
# wheelhouse, mirrored from the private GCS index gs://co-gcs-pypi by
# scripts/sync_wheelhouse.py before `uv sync`/`uv run` (archiver#72/#75). No
# git sources for cannobserv — reproducibility is uv.lock's pinned version + the
# named wheelhouse artifact (find-links locks by filename, not hash; content
# integrity rests on the GCS bucket's immutability + access control).
find-links = ["./.wheelhouse"]
[tool.uv.sources]
archiver-client = { path = "clients/python", editable = true }