-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
executable file
·160 lines (142 loc) · 4.35 KB
/
pyproject.toml
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
[build-system]
requires = ['hatchling']
build-backend = 'hatchling.build'
[tool.hatch.build.targets.sdist]
# limit which files are included in the sdist (.tar.gz) asset,
# see https://github.com/pydantic/pydantic/pull/4542
include = ['/README.md', '/watz', '/tests', '/requirements.txt']
[tool.pdm]
[tool.pdm.dev-dependencies]
nox = ["nox>=2023.4.22"]
test = [
"pytest>=7.4.2",
"pytest-httpx>=0.26.0",
"polyfactory>=2.9.0",
"numpy>=1.26.0",
]
coverage = ["coverage[toml]>=7.3.2"]
qa = [
"bandit>=1.7.5",
"codespell>=2.2.6",
"ruff>=0.0.292",
"black>=23.9.1",
"pre-commit>=3.4.0",
"pre-commit-hooks>=4.4.0",
"pyright>=1.1.329",
]
docs = [
"mkdocs-material>=9.4.4",
"mkdocstrings[python]>=0.23.0",
"mike>=1.1.2",
"mkdocs-git-revision-date-localized-plugin>=1.2.0",
"mkdocs-git-committers-plugin-2>=1.2.0",
"pymdown-extensions>=10.3",
"mkdocs-gen-files>=0.5.0",
"mkdocs-literate-nav>=0.6.1",
"mkdocs-section-index>=0.3.8",
"setuptools>=61.0",
]
dev = ["ipykernel>=6.25.2"]
[project]
name = "watz"
version = "0.1.0"
description = "Python SDK for Watz APIs"
readme = "README.md"
license = { text = "Apache-2.0" }
authors = [{ name = "Watz Inc", email = "[email protected]" }]
requires-python = ">=3.9,<3.13"
classifiers = [
'Development Status :: 3 - Alpha',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'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',
'License :: OSI Approved',
]
dependencies = [
"httpx>=0.23.1",
"pydantic>=2.2.0,!=2.4.0,!=2.4.1,<3.0.0",
"anyio>=3.5.0,<4.0.0",
"orjson>=3.8.0",
]
[project.urls]
"Sourcecode" = "https://github.com/watz-inc/watz-py"
"Documentation" = "https://watz-inc.github.io/watz-py"
[tool.black]
line-length = 100
[tool.ruff]
line-length = 100
ignore-init-module-imports = true # Makes unused imports in __init__.py give message to add to __all__ rather than redundant import
unfixable = [
# Don't remove unused imports or variables on save, can be quite annoying when writing code:
"F401",
"F841",
]
select = [
"E", # pycodestyle
"D", # pydocstyle for docstrings
"F", # pyflakes
"A", # prevent using keywords that clobber python builtins
"B", # bugbear: security warnings
"UP", # alert you when better syntax is available in your python version
"RUF", # the ruff developer's own rules
"PD", # Pandas rules
"ISC", # implicit string concatenation
"I", # Isort import sorting
]
ignore = [
"E712", # Allow using if x == False, as it's not always equivalent to if x.
"E501", # Supress line-too-long warnings: trust black's judgement on this one.
"E402", # Allow imports not at top of file
"UP032", # Ignore convert "{}".format(...) to f"{...}"
"UP015", # Stops trying to remove "r" from open("..", "r") as it's the default, good to be clear
"RUF010", # Ignore converting f"{str(x)}" to f"{x!s}" simply because it's less obvious and less people know about it
]
[tool.ruff.per-file-ignores]
"**/{tests}/**/*" = [
# Don't need docstrings linting for tests
"D100",
"D103",
"D104",
]
[tool.ruff.pydocstyle]
convention = "google"
[tool.pyright]
venv = ".venv"
pythonVersion = "3.9" # Run using the minimum supported version
typeCheckingMode = "basic" # Additional strict rules are enabled manually
reportUnknownParameterType = true
reportMissingImports = true
deprecateTypingAliases = true
reportImportCycles = true
reportMissingTypeStubs = false
[tool.coverage.paths]
tests = ["tests"]
source = [
'watz/',
# This handles the fact that mac/windows/ubuntu github action runners all have different paths
# This tells coverage to treat the paths as identical and not error:
'/Users/runner/work/watz-py/watz-py/watz/',
'/home/runner/work/watz-py/watz-py/watz/',
'D:\a\watz-py\watz-py\watz',
]
[tool.coverage.run]
source = ["watz"]
branch = true
[tool.coverage.report]
show_missing = true
fail_under = 100
exclude_lines = [
'pragma: no cover',
'raise NotImplementedError',
'if TYPE_CHECKING:',
'if tp.TYPE_CHECKING:',
'@overload',
'@tp.overload',
'\(Protocol\):$',
'tp.assert_never',
'assert_never',
]