-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathpyproject.toml
149 lines (132 loc) · 3.26 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
[tool.black]
line-length = 120
skip-string-normalization = false
[tool.isort]
line_length = 120
[tool.poetry]
name = "pyconnectwise"
version = "0.6.1"
authors = ["Health IT <dev@healthit.com.au>"]
description = "A full-featured Python client for the ConnectWise APIs"
homepage = "https://github.com/HealthITAU/pyconnectwise"
license = "GPL-3.0-only"
readme = "README.md"
repository = "https://github.com/HealthITAU/pyconnectwise"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.10",
]
keywords = [
"ConnectWise",
"Manage",
"Automate",
"API",
"Python",
"Client",
"Annotated",
"Typed",
"MSP",
]
packages = [{ include = "pyconnectwise", from = "src" }]
include = ["LICENSE", "README.md"]
[tool.poetry.dependencies]
python = "^3.10"
jinja2 = "^3.1"
pydantic = "^2.3"
requests = "^2.31"
typing-extensions = "^4.8.0"
[tool.poetry.group.dev.dependencies]
astunparse = "^1.6"
black = "^23.7"
datamodel-code-generator = "^0.23.0"
isort = "^5.12"
pytest = "^7.1"
pytest-timeout = "^2.1"
requests-mock = "^1.11"
typer = "^0.9.0"
[tool.datamodel-codegen]
# These options are ordered/grouped to match documentation:
output-model-type = "pydantic_v2.BaseModel"
# Typing customization
base-class = "pyconnectwise.models.base.connectwise_model.ConnectWiseModel"
enum-field-as-literal = "all"
field-constraints = true
set-default-enum-member = true
use-annotated = true
use-standard-collections = true
use-union-operator = true
#Field customization
capitalise-enum-members = true
remove-special-field-name-prefix = true
snake-case-field = true
use-default = true
use-field-description = true
# Model customization
disable-timestamp = true
collapse-rool-models = true
reuse-model = true
target-python-version = "3.10"
use-title-as-name = true
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "--strict-markers --strict-config"
norecursedirs = [".git", ".tox", ".env", ".venv"]
testpaths = ["tests"]
timeout = 60
pythonpath = ["src"]
[tool.ruff]
target-version = "py310"
# See: https://docs.astral.sh/ruff/rules/
select = [
"A",
"ANN",
"ASYNC",
"B",
"C",
"C90",
"DTZ",
"E",
"F",
"FBT",
"FIX",
"FLY",
"FURB",
"I",
"INP",
"N8",
"PERF",
"PT",
"PTH",
"RET",
"RUF",
"S",
"SIM",
"T10",
"TCH",
"TID",
"TRY",
"UP",
]
# ANN101,ANN102 annotating self,cls is silly
# E501 is replaced by flake8-bugbear B950
# E722 is replaced by flake8-bugbear B001
ignore = ["ANN101", "ANN102", "E402", "E501", "E722"]
src = ["src", "tests"]
line-length = 120
[tool.ruff.isort]
combine-as-imports = true
[tool.ruff.per-file-ignores]
# Auto-generated endpoints/models have a lot of id fields and such that need to
# match the CW API
"src/pyconnectwise/endpoints/**" = ["A003"]
"src/pyconnectwise/models/**" = ["A003"]
# Documenting return types on pytest tests is pointless
# S101 - Using assert in tests is fine
"tests/**" = ["ANN201", "S101"]