Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
149 lines (133 loc) · 4.17 KB
/
Copy pathpyproject.toml
File metadata and controls
149 lines (133 loc) · 4.17 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
[project]
name = "python_anvil"
version = "6.0.1"
description = "Anvil API Client"
readme = "README.md"
license = "MIT"
license-files = ["LICENSE.md"]
authors = [{ name = "Anvil Foundry Inc.", email = "developers@useanvil.com" }]
keywords = ["anvil", "api", "pdf", "signing"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"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",
"Programming Language :: Python :: 3.15",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.10,<3.16"
dependencies = [
"requests>=2.28.2,<3",
"pydantic>=2.8,<3",
# The generated types use TypeAliasType on Python 3.10 and 3.11
"typing-extensions>=4.12",
]
[project.optional-dependencies]
# The `anvil` command line tool: pip install python-anvil[cli]
cli = [
"click>=8.0,<9",
"tabulate>=0.9,<0.11",
]
[project.scripts]
anvil = "python_anvil.cli:cli"
[project.urls]
Homepage = "https://www.useanvil.com/"
Documentation = "https://github.com/anvilco/python-anvil#readme"
Repository = "https://github.com/anvilco/python-anvil"
Changelog = "https://github.com/anvilco/python-anvil/blob/master/CHANGELOG.md"
[tool.poetry]
requires-poetry = ">=2.0"
packages = [{ include = "python_anvil" }]
[tool.poetry.group.dev.dependencies]
ruff = ">=0.17"
mypy = ">=1.18"
pytest = ">=8"
pytest-cov = ">=6"
pytest-describe = ">=2.2"
pytest-timeout = ">=2.3"
types-requests = ">=2.28"
types-tabulate = ">=0.9"
# To check the client's queries and mutations against the API schema, and to
# generate python_anvil/types from it and the OpenAPI spec (dev/generate_types.py)
graphql-core = ">=3.2"
# Pinned to a minor: `make check-generated` byte-compares its output
datamodel-code-generator = "~0.86"
# So the CLI and its tests run from a dev install without --all-extras
click = ">=8.0,<9"
tabulate = ">=0.9,<0.11"
[build-system]
requires = ["poetry-core>=2.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
line-length = 88
target-version = "py310"
[tool.ruff.format]
# The README's code blocks are examples; some have `...` placeholders
exclude = ["*.md"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # bugbear
"C4", # comprehensions
"SIM", # simplify
"D", # pydocstyle
"RUF", # ruff's own rules
]
ignore = [
# Docstrings are not required everywhere
"D100", "D101", "D102", "D103", "D104", "D105", "D107",
# No blank lines allowed after function docstring
"D202",
# Docstrings may be noun phrases, like "The URL for a path"
"D401",
# Line length is the formatter's job
"E501",
]
[tool.ruff.lint.per-file-ignores]
# pytest-describe tests nest functions and shadow fixtures by design
"tests/**" = ["D", "B018", "RUF012"]
"examples/**" = ["D"]
# Generated from the API specs; their docstrings are the API's descriptions
"python_anvil/types/rest.py" = ["D", "UP", "RUF"]
"python_anvil/types/graphql.py" = ["D", "UP", "RUF"]
"python_anvil/types/operations.py" = ["D", "UP", "RUF"]
[tool.ruff.lint.pydocstyle]
convention = "pep257"
[tool.ruff.lint.isort]
lines-after-imports = 2
combine-as-imports = true
known-first-party = ["python_anvil"]
[tool.mypy]
python_version = "3.10"
plugins = ["pydantic.mypy"]
files = ["python_anvil", "tests", "examples", "dev", "test-client.py"]
ignore_missing_imports = true
no_implicit_optional = true
check_untyped_defs = true
cache_dir = ".cache/mypy"
[tool.pytest.ini_options]
addopts = "--strict-markers -r sxX"
# A rate limiter regression would hang a test rather than fail it
timeout = 60
testpaths = ["tests"]
cache_dir = ".cache/pytest"
[tool.coverage.run]
branch = true
data_file = ".cache/coverage"
source = ["python_anvil"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if TYPE_CHECKING:",
]