-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
241 lines (217 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
235
236
237
238
239
240
241
[build-system]
requires = ["setuptools>=62.4.0", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
authors = [
{name = "Savannah Informatics Global Health Institute"}
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: System Administrators",
"License :: Freeware",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Utilities",
"Typing :: Typed"
]
description = "A tool to extract data from data sources, transform it and load it to data sink(s)."
keywords = ["etl", "etl-framework", "idr"]
license = {file = "LICENSE"}
maintainers = [
{name = "Kennedy Kori", email = "[email protected]"},
{name = "Salad Guyo", email = "[email protected]"}
]
name = "idr-client"
readme = "README.md"
requires-python = ">=3.10" # Support Python 3.10+.
version = "0.3.0"
[project.urls]
changelog = "https://github.com/savannahghi/idr-client/blob/develop/docs/CHANGELOG.md"
documentation = "https://github.com/savannahghi/idr-client/blob/develop/README.md"
homepage = "https://github.com/savannahghi/idr-client"
repository = "https://github.com/savannahghi/idr-client.git"
[tool.black]
line-length = 79
target-version = ["py310"]
[tool.coverage.html]
directory = "coverage"
[tool.coverage.report]
exclude_lines = [
# Have to re-enable the standard pragma"
"pragma: no branch",
"pragma: nocover",
"pragma: no cover",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain about abstract methods, they aren't run:
'@(abc\.)?abstractmethod'
]
show_missing = true
[tool.coverage.run]
branch = true
omit = [".tox/*", "app/core/serializer.py", "docs/*", "tests/*"]
source = ["app"]
[tool.isort]
extend_skip = "docs"
extend_skip_glob = ["*/migrations/*", "*/static/CACHE/*"]
known_first_party = ["app", "tests"]
line_length = 79
multi_line_output = 3
profile = "black"
[tool.pyright]
enableTypeIgnoreComments = true
reportConstantRedefinition = "error"
reportDuplicateImport = "error"
reportPrivateUsage = "error"
reportUnusedClass = "warning"
reportUnusedFunction = "warning"
reportUnusedImport = "error"
reportUnusedVariable = "warning"
reportWildcardImportFromLibrary = "warning"
strictDictionaryInference = true
strictListInference = true
strictParameterNoneValue = true
strictSetInference = true
typeCheckingMode = "basic"
[tool.pytest.ini_options]
addopts = "--cov=app --cov-fail-under=100 --cov-report=html --cov-report=term-missing -n auto --junitxml='junitxml_report/report.xml' -v --durations=10 --cache-clear"
console_output_style = "progress"
log_cli = 1
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"
log_cli_level = "ERROR"
python_files = ["*test.py", "test_*.py"]
norecursedirs = "node_modules venv build env bin .cache .tox"
[tool.ruff]
exclude = [
".eggs",
".git",
".mypy_cache",
".nox",
".pytype",
".ruff_cache",
".tox",
".venv",
"__pycache__",
"__pypackages__",
"_build",
"build",
"dist",
"docs",
"node_modules",
"venv",
]
ignore = [
"ANN002",
"ANN003",
"ANN101",
"ANN102",
"ANN204",
"S101"
]
line-length = 79
select = [
"A", # flake8-builtins
"ANN", # flake8-annotations
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"C90", # mccabe
"COM", # flake8-commas
# "D", # pydocstyle
"E", # pycodestyle Error
"EM", # flake8-errmsg
"ERA", # eradicate
"F", # pyflakes
"G", # flake8-logging-format
"I", # isort
"ISC", # flake8-implicit-str-concat
"N", # pep8 Naming
"PD", # pandas-vet
"PT", # flake8-pytest-style
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"T10", # flake8-debugger
"T20", # flake8-print
"TCH", # flake8-type-checking
"UP", # pyupgrade
"W", # pycodestyle Warning
"YTT", # flake8-2020
]
src = ["app", "tests"]
target-version = "py310"
[tool.ruff.flake8-quotes]
inline-quotes = "double"
docstring-quotes = "double"
[tool.ruff.isort]
known-first-party = ["app", "tests"]
[tool.ruff.mccabe]
max-complexity = 10
[tool.tox]
legacy_tox_ini = """
[tox]
env_list = {py310, py311}, coveralls, package
isolated_build = true
no_package = true
requires =
tox>4
skip_missing_interpreters = true
[gh-actions]
python =
3.10: py310
3.11: py311, coveralls
[testenv]
commands =
python -m app --version
pyright .
ruff .
coverage erase
pytest --cov=app -n auto --durations=100 {posargs}
coverage html
deps =
-r{toxinidir}{/}requirements{/}test.txt
description = test and lint the project
download = true
pass_env =
MYSQL_TEST_DB_HOST
MYSQL_TEST_DB_NAME
MYSQL_TEST_DB_PASSWORD
MYSQL_TEST_DB_PORT
MYSQL_TEST_DB_USERNAME
set_env =
PYTHONPATH = {toxinidir}
;If running outside Github, ensure that the the `COVERALLS_REPO_TOKEN`
;environment variable is set.
[testenv:coveralls]
commands =
coveralls --service=github
description = submit coverage results to coverall.io
pass_env =
COVERALLS_REPO_TOKEN
GITHUB_*
MYSQL_TEST_DB_HOST
MYSQL_TEST_DB_NAME
MYSQL_TEST_DB_PASSWORD
MYSQL_TEST_DB_PORT
MYSQL_TEST_DB_USERNAME
[testenv:package]
allowlist_externals = {envdir}{/}idr_client
commands =
pyinstaller idr_client.spec
staticx dist/idr_client_temp {envdir}{/}idr_client
{envdir}{/}idr_client --version
deps =
-r{toxinidir}{/}requirements{/}build.txt
description = build an executable binary of the project
"""