-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
171 lines (155 loc) · 4.29 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
161
162
163
164
165
166
167
168
169
170
171
[tool.poetry]
name = "gridworks-protocol"
version = "1.2.3"
description = "Gridworks Protocol"
authors = ["Jessica Millar <jmillar@gridworks-consulting.com>"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/thegridelectric/gridworks-protocol"
repository = "https://github.com/thegridelectric/gridworks-protocol"
documentation = "https://gridworks-protocol.readthedocs.io"
packages = [
{ include = "gwproto", from = "src" },
]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
]
[tool.poetry.urls]
Changelog = "https://github.com/thegridelectric/gridworks-protocol/releases"
[tool.poetry.dependencies]
python = "^3.11"
pydantic = "^2.8.2"
yarl = "^1.9.2"
pytz = "^2024.1"
pydantic-extra-types = "^2.9.0"
gridworks = "^1.2.0"
[tool.poetry.group.dev.dependencies]
Pygments = ">=2.10.0"
coverage = {extras = ["toml"], version = ">=6.2"}
furo = ">=2021.11.12"
mypy = {extras = ["reports"], version = "^1.11.2"}
pep8-naming = ">=0.12.1"
pre-commit = ">=2.16.0"
pre-commit-hooks = ">=4.1.0"
pytest = ">=6.2.5"
pyupgrade = ">=2.29.1"
sphinx = ">=4.3.2"
sphinx-autobuild = ">=2021.3.14"
sphinx-click = ">=3.0.2"
typeguard = ">=2.13.3"
xdoctest = {extras = ["colors"], version = ">=0.15.10"}
myst-parser = {version = ">=0.16.1"}
types-pytz = ">=2022.4.0.0"
rich = ">=12.6.0"
ruff = "^0.6.6"
[tool.coverage.paths]
source = ["src", "*/site-packages"]
tests = ["tests", "*/tests"]
[tool.coverage.run]
branch = true
source = ["gwproto", "tests"]
[tool.coverage.report]
show_missing = false
fail_under = 70
[tool.black]
extend_exclude = "src/gwproto/gt/|src/gwproto/gs/|src/gwproto/enums/"
[tool.isort]
profile = "black"
force_single_line = true
lines_after_imports = 2
[tool.mypy]
strict = true
warn_unreachable = true
pretty = false
show_column_numbers = true
show_error_codes = true
show_error_context = false
[[tool.mypy.overrides]]
module = [
"gwproto.gt.*",
"gwproto.gs.*",
"gwproto.enums.*",
]
ignore_errors = true
[[tool.mypy.overrides]]
module = "pendulum"
implicit_reexport = true
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
exclude = [
".ci",
".github",
"CodeGenerationTools",
"for_docker",
"rabbit",
".git",
".mypy_cache",
".nox",
"htmlcov",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".venv",
".vscode",
"pythonProject",
".idea",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
]
output-format = "concise"
fix = true
show-fixes = true
[tool.ruff.lint]
# default select used by ruff: ["E4", "E7", "E9", "F"]
# select = ["B","C90","E4", "E7", "E9","F","I","N","PL", "TRY", "W",]
select = ["ALL"]
ignore = [
"B027",
"B904", # Suppress for now; lots of them generated by code generation.
"COM812",
"CPY",
"D",
"DOC",
"E272", # Formatter
"E241", # Formatter
"E302",
"E303", # Formatter
"E305", # Formatter
"E501",
"EM",
"FA", # We only support Python >= 3.10, so we shouldn't need this
"G004", # Suppress for now; lots of them generated by code generation.
"ISC001",
"N801",
"N803", # Protocol sometimes calls for CamelCase arguments.
"N818", # We disagree with Pep8 about naming exceptions.
"PGH004", # ruff and IDE can disagree, in which case a simple # noqa might be need.
"PLR0904",
"PLR2004", # Suppress for now; lots of them generated by code generation.
"PLW1514",
"TRY003", # Many of our ValueErrors contain messages that are not plausibly resuable.
"RUF100", # ruff and IDE often disagree about whether a 'noqa' is in use.
"W191",
"W291", # Formatter
"W293", # Formatter
"W391", # Formatter
]
[tool.ruff.lint.extend-per-file-ignores]
"tests/**/*.py" = [
"ARG001", # Unused function args -> fixtures nevertheless are functionally relevant...
"C901", # Complexity
"ERA001", # We need to be able comment out code in tests, at least during refactoring.
"FBT", # Don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
"G004", # Ok to use f-strings in logging in test code
"PLR0912", # Complexity
"PLR0913", # Complexity
"PLR0915", # Complexity
"PT011", # It's not practical to match strings in exceptions caught by pytest.raises()
"S101", # asserts allowed in tests...
]