-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpyproject.toml
158 lines (146 loc) · 4.42 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
[build-system]
requires = ["setuptools>=68", "setuptools_scm[toml]>=7.1"]
build-backend = "setuptools.build_meta"
[project]
name = "awattar"
description = "aWATTar Client to analyse the energy market data"
authors = [{ name = "Peter Gransdorfer", email = "[email protected]" }]
license = { text = "GPL-3.0" }
classifiers = [
'Development Status :: 4 - Beta',
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Operating System :: OS Independent",
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
]
keywords = ["awattar", "energy market price api"]
requires-python = ">=3.8"
dependencies = [
"requests>=2.31.0",
"datetime",
"python-dateutil",
"click>=8.1.7",
"aiohttp",
"async_timeout",
"tzlocal"
]
dynamic = ["version"]
[project.optional-dependencies] # Optional
dev = [
"ruff>=0.1.5"
]
test = [
"ruff>=0.1.5",
"types-requests",
"types-python-dateutil",
"pytest>=7.1.3",
"pytest-ruff>=0.2.1",
"pytest-mypy>=0.10.3",
]
[project.scripts]
awattar = "awattar:_cli"
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.urls]
Homepage = "https://github.com/Gransi/awattar"
Download = "https://github.com/Gransi/awattar"
Tracker = "https://github.com/Gransi/awattar/issues"
Source = "https://github.com/Gransi/awattar"
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages]
find = { namespaces = false }
[tool.setuptools_scm]
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.ruff]
line-length = 240
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
# "D", # pydocstyle
# "N", # pep8-naming
"UP", # pyupgrade
"YTT", # flake8-2020
"ANN", # flake8-annotations
"ASYNC", # flake8-async
"S", # flake8-bandit
"BLE", # flake8-blind-except
"B", # flake8-bugbear
"A", # flake8-builtins
"COM", # flake8-commas
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"EM103", # flake8-errmsg - dot-format-in-exception
"EXE", # flake8-executable
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"RSE", # flake8-raise
"RET", # flake8-return
"SLF", # flake8-self
"SLOT", # flake8-slots
# "SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"PTH", # flake8-use-pathlib
"TD", # flake8-todos
"FIX", # flake8-fixme
"ERA", # eradicate
"PL", # Pylint
"PLC", # Convention
"PLE", # Error
"PLR", # Refactor
"PLW", # Warning
"TRY200", # reraise-no-cause
"FLY", # flynt
# "PERF", # Perflint
"RUF013", # implicit-optional
]
unfixable = ['ERA001']
extend-select = ['Q', 'RUF100', 'C90']
flake8-quotes = { inline-quotes = 'single', multiline-quotes = 'single' }
ignore = [
"C901", # too complex
"E501", # line too long
"B008", # do not perform function call in argument defaults
"ANN101", # missing-type-self
"ANN401", # any-type
"ANN002", # missing-type-args
"ANN003", # missing-type-kwargs
"ANN102", # missing-type-cls
"PLR0913", # Too many arguments to function call
"PLR0915", # Too many statements
"PLR2004", # Magic value used in comparison
"PLW0603", # Using the global statement
"PLR0912", # Too many branches
"UP035", # deprecated-import
"PLR0911", # Too many return statements
]
[tool.ruff.per-file-ignores]
"{examples,tests,test}/**/*.py" = [
# at least this three should be fine in tests:
"S101", # asserts allowed in tests...
"ARG", # Unused function args -> fixtures nevertheless are functionally relevant...
"FBT", # Don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
# The below are debateable
"PLR2004", # Magic value used in comparison, ...
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"T201",
]
[tool.ruff.lint.flake8-quotes]
# Don't bother trying to avoid escapes.
avoid-escape = false