This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.cfg
160 lines (144 loc) · 6.19 KB
/
setup.cfg
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
# see https://setuptools.pypa.io/en/latest/index.html
[metadata]
name = clearway
version = attr: clearway.__version__
author = attr: clearway.__author__
description = The main purpose of the project is to avoid incidents and crashes between cyclists and motorists
long_description = file: README.md
long_description_content_type = text/markdown
license = attr: clearway.__licence__
license_file = LICENSE.md
platform = any
keywords = ["openCV", "python", "python38"]
classifiers =
Development Status :: Work in Progress
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python :: 3.8
############################################# Options #############################################
[options]
python_requires = >=3.6
packages =
clearway
clearway.cli
clearway.gpio
clearway.ai
clearway.config
test_suite = tests
install_requires =
transitions >= 0.8.10
RPi.GPIO >= 0.7.0
imutils >= 0.5.4
numpy >= 1.21.4
opencv-python >= 4.5.3.56
toml>=0.10.2
Mock.GPIO>=0.1.8
[options.entry_points]
console_scripts =
clearway = clearway.cli:main
############################################## Linter #############################################
# Flake8 is a wrapper around these tools: PyFlakes, pycodestyle and Ned Batchelder's McCabe script, see https://github.com/PyCQA/flake8
[flake8]
doctests = true
count = true
statistics = true
exclude =
documents/*,
explo/*,
.git/*,
.githooks/*,
__pycache__/*,
reports/*
venv/*
max-complexity = 10
max-line-length = 120
docstring-convention = numpy
import-order-style = pep8
extend-select = B,B9,I,N,S,R
# Extend the list of error codes reported by Flake8
# B like bugbear, the flake8-bugbear plugin helps you find various bugs and design problems, see https://github.com/PyCQA/flake8-bugbear
# B9 for more bugbear opinionated warnings, which are disabled by default.
# I like import : flake8-import-order plugin checks that import statements are grouped and ordered, see https://github.com/PyCQA/flake8-import-order
# N like naming : pep8-naming plugin check your code against PEP 8 naming conventions., see https://github.com/PyCQA/pep8-naming and https://www.python.org/dev/peps/pep-0008
# R like return : checks return values, see https://github.com/afonasev/flake8-return
# S like security : flake8-bandit plugin is a automated security testing built, see https://github.com/tylerwince/flake8-bandit
per-file-ignores =
tests/*:S101
clearway/config/__init__.py:C901
# List of errors to ignore in some files / folders
# S101 Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
# C901 The function is to complex
# Mypy is a static type checker for Python 3 and Python 2.7, see https://github.com/python/mypy
[mypy]
# Suppresses error messages about imports that cannot be resolved.
ignore_missing_imports = true
# Directs what to do with imports when the imported module is found, see https://mypy.readthedocs.io/en/latest/command_line.html#cmdoption-mypy-follow-imports
follow_imports = skip
# Disallows defining functions without type annotations or with incomplete type annotations.
disallow_untyped_defs = true
# Disallows defining functions with incomplete type annotations.
disallow_incomplete_defs = true
# Reports an error whenever a function with type annotations is decorated with a decorator without annotations.
disallow_untyped_decorators = true
# Warns about casting an expression to its inferred type.
warn_redundant_casts = true
# Causes mypy to suppress errors caused by not being able to fully infer the types of global and class variables.
allow_untyped_globals = true
# Prefixes each error with the relevant context.
show_error_context = true
# Shows column numbers in error messages.
show_column_numbers = true
# Shows error codes in error messages
show_error_codes = true
############################################# Formater ############################################
# Use of black, but this tool don't use setup.cfg, it uses pyproject.toml, see https://github.com/psf/black/issues/65
############################################## Test ###############################################
# The pytest framework makes it easy to write small tests, yet scales to support complex functional testing for applications and libraries, see https://github.com/pytest-dev/pytest
# pytest-cov is a plugin producing coverage reports, see https://github.com/pytest-dev/pytest-cov
[tool:pytest]
minversion = 6.0
addopts = -rfE -q --cov=clearway --cov-report=term --cov-report=html --cov-report=xml --cov-config=setup.cfg
# -r show extra test summary info as specified by chars, see pytest -h
# -q decrease verbosity
# cov path or package name to measure during execution
# cov-report type of report to generate
# --cov-config config file for coverage
testpaths =
tests
log_cli = true
# pytest will output logging records as they are emitted directly into the console
log_cli_level = ERROR
# the logging level for which log records with equal or higher level are printed to the console
log_file = ClearWayTest.log
# record the whole test suite logging calls to a file
log_file_level = DEBUG
# The logging level for the log file
############################################ Coverage #############################################
# pytest-cov use Coverage.py
# Coverage.py is a tool for measuring code coverage of Python programs, see https://github.com/nedbat/coveragepy
[coverage:run]
source = clearway
[coverage:report]
precision = 2
omit =
clearway/__main__.py
clearway/__init__.py
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
# Don't complain about missing debug-only code:
def __repr__
if self\.debug
# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError
# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
# Don't complain about abstract methods, they aren't run:
@(abc\.)?abstractmethod
[coverage:html]
directory = reports/coverage/html
[coverage:xml]
output = reports/coverage/coverage.xml