-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
187 lines (170 loc) · 4.96 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
[build-system]
requires = [
"setuptools>=63.0.0",
]
build-backend = "setuptools.build_meta"
[project]
name = "gather-vision"
description = "Obtain, extract, organise, and store information. "
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Environment :: Console",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Utilities",
]
dynamic = [
"version",
"dependencies",
"optional-dependencies",
]
[project.urls]
"Homepage" = "https://github.com/anotherbyte-net/gather-vision"
"Changelog" = "https://github.com/anotherbyte-net/gather-vision/blob/main/CHANGELOG.md"
"Source" = "https://github.com/anotherbyte-net/gather-vision"
"Tracker" = "https://github.com/anotherbyte-net/gather-vision/issues"
[project.scripts]
gather-vision = 'gather_vision.cli:main'
[tool.setuptools.packages.find]
where = [
"src",
]
# include and exclude accept strings representing glob patterns.
include = [
"gather_vision*",
]
[tool.setuptools.dynamic]
version = { file = [
"VERSION",
] }
dependencies = { file = [
"requirements.txt",
] }
[tool.setuptools.dynamic.optional-dependencies]
dev = { file = [
"requirements-dev.txt",
] }
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-ra --quiet"
pythonpath = [
"src",
]
testpaths = [
"tests",
]
DJANGO_SETTINGS_MODULE = "gather_vision.proj.settings"
#SCRAPY_SETTINGS_MODULE = "gather_vision.proj.settings_scrapy"
[tool.coverage.run]
# "Specifying the source option enables coverage.py to report on unexecuted files,
# since it can search the source tree for files that haven’t been measured at all."
source = [
'src',
]
omit = [
'*/site-packages/*',
'tests/*',
]
[tool.coverage.report]
skip_empty = true
[tool.coverage.html]
directory = "coverage-html"
[tool.isort]
profile = "black"
src_paths = [
"src",
]
[tool.tox]
legacy_tox_ini = """
[tox]
isolated_build = True
envlist = py310,py311,py312
[testenv]
recreate = true
deps =
-r requirements.txt
-r requirements-dev.txt
allowlist_externals =
echo
commands =
echo "::group::Show app help"
echo "::endgroup::"
echo "::group::Outdated deps"
-pip list --outdated
echo "::endgroup::"
echo "::group::Test coverage"
python -X dev -m coverage run -m pytest --doctest-modules
echo "::endgroup::"
echo "::group::Coverage report"
-python -X dev -m coverage report
echo "::endgroup::"
echo "::group::Type checker - mypy"
-python -X dev -m mypy src --any-exprs-report .local/mypy-rpt/{env_name}/any-exprs-report --cobertura-xml-report .local/mypy-rpt/{env_name}/cobertura-xml-report --html-report .local/mypy-rpt/{env_name}/html-report --linecount-report .local/mypy-rpt/{env_name}/linecount-report --linecoverage-report .local/mypy-rpt/{env_name}/linecoverage-report --lineprecision-report .local/mypy-rpt/{env_name}/lineprecision-report --txt-report .local/mypy-rpt/{env_name}/txt-report --xml-report .local/mypy-rpt/{env_name}/xml-report
echo "::endgroup::"
echo "::group::Type checker - pytype"
-python -X dev -m pytype src
echo "::endgroup::"
echo "::group::Type checker - pyright"
-python -X dev -m pyright src
echo "::endgroup::"
echo "::group::Type checker - pyre"
-python -X dev -m pyre src
echo "::endgroup::"
echo "::group::Linter - black"
-python -X dev -m black --check src
echo "::endgroup::"
echo "::group::Linter - pylint"
-python -X dev -m pylint src
echo "::endgroup::"
echo "::group::Linter - pydocstyle"
-python -X dev -m ruff src
echo "::endgroup::"
echo "::group::Linter - bandit"
-python -X dev -m bandit -r src
echo "::endgroup::"
echo "::group::Linter - pyupgrade"
-python -X dev -m pyupgrade src
echo "::endgroup::"
echo "::group::Build"
python -m build --sdist --wheel --outdir build/dist-test/{env_name}/ .
echo "::endgroup::"
"""
[tool.pydocstyle]
convention = 'google'
[tool.mypy]
ignore_missing_imports = true
[tool.ruff]
target-version = "py311"
line-length = 88
show-fixes = true
src = [
".",
]
extend-exclude = [
".venv",
"tests",
"**/migrations",
]
select = [
"ALL",
]
ignore = [
"ANN101", # Missing type annotation for `self` in method
"ANN102", # Missing type annotation for `cls` in classmethod
"ERA001", # commented-out-code
"RET504", # Unnecessary variable assignment before `return` statement
"TD002", # Missing author in TODO; try: `# TODO(<author_name>): ...`
"TD003", # Missing issue link on the line following this TODO
]
[tool.ruff.pydocstyle]
convention = "google"