This repository has been archived by the owner on Oct 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpyproject.toml
171 lines (153 loc) · 3.93 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 = "pycwatch"
version = "2.1.2"
description = "A client library for the Cryptowatch Rest API."
authors = ["ljnsn <82611987+ljnsn@users.noreply.github.com>"]
readme = "README.md"
license = "MIT"
repository = "https://github.com/ljnsn/pycwatch"
homepage = "https://github.com/ljnsn/pycwatch"
keywords = ["cryptocurrency", "crypto", "prices", "cryptowatch"]
packages = []
[build-system]
requires = ["poetry-core", "poetry>=1.2.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.group.main.dependencies]
python = "^3.7"
[tool.poetry.group.lib.dependencies]
pycwatch-lib = { path = "workspaces/lib", develop = true }
[tool.poetry.group.lib-test.dependencies]
pycwatch-lib = { path = "workspaces/lib", develop = true, extras = ["test"] }
[tool.poetry.group.cli.dependencies]
pycwatch-cli = { path = "workspaces/cli", develop = true, python = ">=3.10" }
[tool.poetry.group.cli-test.dependencies]
[tool.poetry.group.cli-test.dependencies.pycwatch-cli]
path = "workspaces/cli"
develop = true
extras = ["test"]
python = ">=3.10"
[tool.commitizen]
name = "cz_gitmoji"
version = "2.1.2"
version_files = ["pyproject.toml:^version"]
tag_format = "v$version"
bump_message = "🔖 bump(release): v$current_version → v$new_version"
update_changelog_on_bump = true
[tool.ruff]
select = [
"A",
"ANN",
"ARG",
"B",
"BLE",
"C",
"C4",
"D",
"DTZ",
"E",
"EM",
"ERA",
"F",
"FBT",
"I",
"ICN",
"ISC",
"N",
"PGH",
"PIE",
"PLC",
"PLE",
"PLR",
"PLW",
"PT",
"Q",
"RET",
"RUF",
"S",
"SIM",
"T10",
"T20",
"TID",
"UP",
"W",
"YTT",
]
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",
]
fix = true
unfixable = ["ERA001", "F401", "F841"]
target-version = "py37"
src = ["workspaces"]
[tool.ruff.pydocstyle]
convention = "google"
[tool.ruff.flake8-tidy-imports]
# Disallow all relative imports.
ban-relative-imports = "all"
[tool.ruff.pep8-naming]
# Allow Pydantic's `@validator` decorator to trigger class method treatment.
classmethod-decorators = ["classmethod", "pydantic.validator"]
[tool.black]
target-version = ["py37", "py38", "py39", "py310", "py311"]
[tool.coverage.run]
branch = true
parallel = true
command_line = "--module pytest"
data_file = "reports/.coverage"
source = ["workspaces"]
omit = ["*/vcr_cassettes/*", "scratchpads/*"]
[tool.coverage.report]
fail_under = 70
show_missing = true
skip_covered = true
exclude_lines = [
"pragma: no cover",
"@overload",
'if __name__ == "__main__":',
"if TYPE_CHECKING:",
]
[tool.coverage.xml] # https://coverage.readthedocs.io/en/latest/config.html#xml
output = "reports/coverage.xml"
[tool.pytest.ini_options] # https://docs.pytest.org/en/latest/reference/reference.html#ini-options-ref
addopts = """--color=yes --doctest-modules --exitfirst --failed-first \
--strict-config --strict-markers --verbosity=2 \
--junitxml=reports/pytest.xml --ignore=scratchpads"""
[tool.mypy]
junit_xml = "reports/mypy.xml"
# --strict
disallow_any_generics = true
disallow_subclassing_any = false
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = false
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
implicit_reexport = false
strict_equality = true
pretty = true
show_column_numbers = true
show_error_codes = true
warn_unreachable = true
# TODO: remove once we drop support for 3.7
exclude = "workspaces/lib/src/pycwatch/lib/__init__.py"
# --strict end
[[tool.mypy.overrides]]
module = "apiclient.*"
ignore_missing_imports = true