-
-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathpyproject.toml
More file actions
192 lines (179 loc) Β· 6.37 KB
/
Copy pathpyproject.toml
File metadata and controls
192 lines (179 loc) Β· 6.37 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
[project]
name = "atproto"
dynamic = ["version"]
description = "The AT Protocol SDK"
authors = [
{name = "Ilya (Marshal)", email = "ilya@marshal.dev"}
]
license = "MIT"
requires-python = ">=3.9,<3.15"
readme = "README.md"
keywords = ["library", "sdk", "codegen", "xrpc", "xrpc-client", "atprotocol", "atproto", "lexicon", "parser", "schema", "bluesky", "bluesky-api", "at", "uri", "atp", "nsid", "did", "cid"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Pre-processors",
]
dependencies = [
"httpx>=0.25.0,<0.29.0",
"typing-extensions>=4.8.0,<5",
"click>=8.1.3,<9",
"websockets>=15,<18",
"pydantic>=2.7,<3",
"libipld>=3.0.1,<4",
"dnspython>=2.4.0,<3",
"cryptography>=41.0.7,<51",
"zstandard (>=0.24.0,<0.26.0)",
]
[project.scripts]
atp = "atproto_cli:atproto_cli"
atproto = "atproto_cli:atproto_cli"
[project.urls]
homepage = "https://atproto.blue"
repository = "https://github.com/MarshalX/atproto"
documentation = "https://atproto.blue"
changes = "https://github.com/MarshalX/atproto/blob/main/CHANGES.md"
issues = "https://github.com/MarshalX/atproto/issues"
sponsoring = "https://github.com/sponsors/MarshalX"
[dependency-groups]
dev = [
"ruff==0.16.3",
# mypy itself requires Python 3.10+ to run; it still type checks our 3.9 target.
"mypy==2.3.1; python_version >= '3.10'",
"pyright==1.1.411",
]
# the docs are built on 3.12+ only; sphinx 9 does not support anything older.
docs = [
"sphinx==9.1.0; python_version >= '3.12'",
"myst-parser==5.1.0; python_version >= '3.12'",
"sphinxawesome-theme==6.0.2; python_version >= '3.12'",
"sphinx-design==0.7.0; python_version >= '3.12'",
"sphinx-sitemap==2.9.0; python_version >= '3.12'",
"sphinx-docsearch==0.3.0; python_version >= '3.12'",
"sphinx-reredirects==1.1.0; python_version >= '3.12'",
# fork of autodoc-pydantic 2.2.0 that renders correctly on sphinx 7.4+ and 9.0+
"autodoc-pydantic @ git+https://github.com/MarshalX/autodoc_pydantic.git@1bb5ffeb44d98034532964a6c21cd435b6b2318f ; python_version >= '3.12'",
"sphinx-favicon==1.1.0; python_version >= '3.12'",
"sphinxext-opengraph==0.13.0; python_version >= '3.12'",
"sphinxcontrib-googleanalytics==0.5; python_version >= '3.12'",
]
test = [
"pytest>=8.4.2,<9",
"pytest-asyncio>=1.2.0",
"coverage==7.6.1",
]
[tool.poetry]
requires-poetry = ">=2.3"
packages = [
{ include = "atproto", from = "packages" },
{ include = "atproto_cli", from = "packages" },
{ include = "atproto_client", from = "packages" },
{ include = "atproto_codegen", from = "packages" },
{ include = "atproto_core", from = "packages" },
{ include = "atproto_crypto", from = "packages" },
{ include = "atproto_firehose", from = "packages" },
{ include = "atproto_identity", from = "packages" },
{ include = "atproto_jetstream", from = "packages" },
{ include = "atproto_lexicon", from = "packages" },
{ include = "atproto_server", from = "packages" },
{ include = "atproto_subscription", from = "packages" },
]
version = "0.0.0" # This is a placeholder. Dynamic version from Git Tag will be used.
[tool.poetry-dynamic-versioning]
# poetry self add "poetry-dynamic-versioning[plugin]"
enable = true
strict = true
bump = true
metadata = false
fix-shallow-repository = true
vcs = "git"
style = "pep440"
[build-system]
requires = ["poetry-core>=2.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"
[tool.mypy]
python_version = "3.9"
disallow_untyped_defs = false # TODO(MarshalX) enable
[tool.pyright]
reportMissingTypeStubs = false
[tool.ruff]
line-length = 120
target-version = "py39"
[tool.ruff.format]
quote-style = "single"
[tool.ruff.lint]
extend-select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"D", # pydocstyle
"C90", # flake8-comprehensions
"B", # flake8-bugbear
"Q", # flake8-quotes
"S", # flake8-bandit
"ASYNC", # flake8-async
"ANN", # flake8-annotations
"C",
"BLE",
"ERA",
"ICN",
"INP",
"ISC",
"NPY",
"PGH",
"PIE",
"RET",
"RSE",
"RUF",
"SIM",
"T20",
"TC",
"TID",
"YTT",
]
ignore = [
"PGH004", # use specific rule code with noqa; works bad with JetBrains IDE Warnings
"ANN401", # t.Any in **kwargs
"ANN002", # Missing type annotation for `*args`
"D203", "D413", # we are not using too many blank lines
"D213", # we are using the first line for summary
"D406", "D407", # we are using google style docstring
"S101", # allow asserting; we are using it for type checks
# Pydantic resolves annotations at runtime; PEP 563 lazy annotations break model building
# on forward refs that are not importable at runtime. Not worth it for a Pydantic-heavy SDK.
"FA100", "FA102",
# TODO(MarshalX) enable together with UP007/UP045 once Python 3.9 support is dropped.
# Doing it now gives a half-migrated style (t.Optional[list[str]]) across the whole codegen output.
"UP006",
]
[tool.ruff.lint.per-file-ignores]
"packages/*.py" = [
"D105", "D104", "D100", "D107", "D103", "D415", # missing docstring
"D101", "D102", # missing docstring in public class and method
]
"tests/*.py" = ["D"]
"docs/*.py" = ["T201", "INP001", "ERA001", "E501", "D"]
"examples/*.py" = ["T201", "INP001", "ERA001", "D"]
"packages/atproto/exceptions.py" = ["F403"]
"packages/atproto_client/models/__init__.py" = ["E501", "F401", "F811"]
"packages/atproto_client/models/*/*.py" = ["E501", "D401"]
"packages/atproto_client/namespaces/async_ns.py" = ["E501", "D401"]
"packages/atproto_client/namespaces/sync_ns.py" = ["E501", "D401"]
"test.py" = ["ERA001", "T201", "E501", "F401", "D"]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
multiline-quotes = "double"
inline-quotes = "single"