-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
234 lines (215 loc) · 6.12 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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/coinapi"]
[tool.hatch.build.targets.sdist]
include = ["src", "pyproject.toml", "README.md"]
[project]
name = "coinapi-rest"
version = "0.0.5"
description = "CoinAPI Python REST Client"
authors = [{ name = "ljnsn", email = "[email protected]" }]
readme = "README.md"
license = "MIT"
urls = { repository = "https://github.com/ljnsn/coinapi-rest" }
keywords = ["cryptocurrency", "crypto", "prices", "coinapi"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
requires-python = ">=3.10"
dependencies = [
"httpx>=0.27.0",
"msgspec>=0.18.6",
"python-dotenv>=1.0.1",
"typing-inspect>=0.9.0",
]
[tool.uv]
dev-dependencies = [
"commitizen>=3.29.0",
"coverage>=7.6.1",
"cz-conventional-gitmoji>=0.3.3",
"ipdb>=0.13.13",
"ipython>=7.16.1,!=8.18.0",
"mypy>=0.1.8",
"pre-commit>=1.4.3",
"pytest-cov>=5.0.0",
"pytest-recording>=0.13.1",
"pytest>=8.3.2",
"ruff>=0.2.2",
"syrupy>=0.0.15",
]
[tool.commitizen]
name = "cz_gitmoji"
version_provider = "pep621"
tag_format = "v$version"
bump_message = "🔖 bump(release): v$current_version → v$new_version"
update_changelog_on_bump = true
annotated_tag = true
allowed_prefixes = ["Squash", "Merge", "Revert"]
pre_bump_hooks = ["uv lock --upgrade-package coinapi-rest"]
[tool.ruff]
fix = true
target-version = "py310"
src = ["src", "tests"]
line-length = 88
[tool.ruff.format]
line-ending = "lf"
indent-style = "space"
[tool.ruff.lint]
logger-objects = ["loguru"]
select = ["ALL"]
ignore = [
# Missing docstring in public module
"D100",
# Missing docstring in `__init__`
"D107",
# Multi-line docstring summary should start at the first line
"D212",
# Class attribute `id` is shadowing a python builtin
"A003",
# Missing type annotation for `self` in method
"ANN101",
# Missing type annotation for `cls` in classmethod
"ANN102",
# Dynamically typed expressions (typing.Any) are disallowed in `*args`
"ANN401",
# Exception must not use a string literal, assign to variable first
"EM101",
# Missing authot in TODO
"TD002",
# Missing issue link on the line following this TODO
"TD003",
# Line contains TODO
"FIX002",
# Avoid specifying long messages outside the exception class
"TRY003",
# Move application import into a type-checking block
"TCH001",
# Move third-party import into a type-checking block
"TCH002",
# Move standard library import into a type-checking block
"TCH003",
# Invalid TODO tag
"TD001",
# Line contains FIXME, consider resolving the issue
"FIX001",
# from * used; unable to detect undefined names
"F403",
# may be undefined, or defined from star imports
"F405",
# Docstring contains ambiguous `’`
"RUF002",
#############################################################################
# Rules conflicting with `ruff format`
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
#############################################################################
# Checks for indentation that uses tabs.
"W191",
# Checks for indentation with a non-multiple of 4 spaces.
"E111",
# Checks for indentation of comments with a non-multiple of 4 spaces.
"E114",
# Checks for over-indented code.
"E117",
# Line length violation
"E501",
# Checks for docstrings that are indented with tabs.
"D206",
# Checks for docstrings that use '''triple single quotes''' instead of """triple double quotes"""
"D300",
# Make sure that inline strings are quoted consistently.
"Q000",
# Make sure that multiline strings are quoted consistently.
"Q001",
# Make sure that docstrings are quoted consistently.
"Q002",
# Checks for strings that include escaped quotes
"Q003",
# Missing trailing comma
# "COM812",
# Prohibited trailing comma
"COM819",
# Single line implicit string concatenation
"ISC001",
# Multiline implicit string concatenation
"ISC002",
]
unfixable = ["ERA001", "F401", "F841"]
[tool.ruff.lint.per-file-ignores]
"test_*.py" = [
# The use of `datetime.datetime()` without `tzinfo` argument is not allowed
"DTZ001",
# positional boolean args
"FBT001",
# part of an implicit namespace package
"INP001",
# usage of `assert` in tests
"S101",
# magic value used in comarison
"PLR2004",
# private member accessed
"SLF001",
]
"scripts/**/*.py" = [
# part of implicit namespace package
"INP001",
]
[tool.ruff.lint.isort]
known-first-party = ["coinapi", "tests"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.flake8-tidy-imports]
# Disallow all relative imports.
ban-relative-imports = "all"
[tool.ruff.lint.pep8-naming]
classmethod-decorators = ["classmethod"]
[tool.mypy]
mypy_path = ["src", "tests"]
namespace_packages = true
explicit_package_bases = true
junit_xml = "reports/mypy.xml"
strict = true
disallow_subclassing_any = false
disallow_untyped_decorators = false
ignore_missing_imports = true
pretty = false
show_column_numbers = true
show_error_codes = true
show_error_context = true
warn_unreachable = true
[tool.pytest.ini_options]
addopts = """--color=yes --doctest-modules --exitfirst --failed-first \
--strict-markers --strict-config --verbosity=2 \
--junitxml=reports/pytest.xml"""
filterwarnings = ["error"]
testpaths = ["tests"]
markers = ["network: mark a test as needing a network connection"]
[tool.coverage.run]
branch = true
command_line = "--module pytest"
data_file = "reports/.coverage"
include = ["src/*"]
omit = ["tests/*"]
[tool.coverage.report]
fail_under = 50
precision = 1
show_missing = true
skip_covered = true
include = ["src/*"]
omit = ["tests/*"]
[tool.coverage.paths]
source = ["src/"]
[tool.coverage.xml]
output = "reports/coverage.xml"