-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
186 lines (155 loc) · 4.1 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
[project]
name = "waybar-check-gmail"
version = "0.0.1"
description = "Script to check Gmail messages & populate waybar widget with data."
readme = "README.md"
requires-python = ">=3.0"
license = { file = "LICENSE" }
keywords = ["gmail", "inbox", "sway", "waybar", "wayland"]
authors = [{ name = "James Cuzella", email = "[email protected]" }]
maintainers = [{ name = "James Cuzella", email = "[email protected]" }]
classifiers = [
"Development Status :: 1 - Planning",
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python",
"Topic :: Communications :: Email",
"Topic :: Desktop Environment :: Window Managers :: Sway",
"Topic :: Utilities",
]
dependencies = ["filelock ~= 3.12", "httplib2 ~= 0.22", "oauth2client ~= 4.1"]
[project.urls]
Homepage = "https://github.com/LyraPhase/waybar-check-gmail"
Documentation = "https://github.com/LyraPhase/waybar-check-gmail"
Repository = "https://github.com/LyraPhase/waybar-check-gmail.git"
Changelog = "https://github.com/LyraPhase/waybar-check-gmail/blob/master/CHANGELOG.md"
#[project.scripts]
#waybar-check-gmail-cli = "waybar_check_gmail:main_cli"
#[project.gui-scripts]
#waybar-check-gmail-gui = "waybar_check_gmail:main_gui"
[tool.isort]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
line_length = 90
profile = "black"
# TODO: tox4 config?
# Ref: https://github.com/tox-dev/tox/issues/999
[tool.tox]
legacy_tox_ini = """
[tox]
requires =
tox>=4
#env_list = linters, type, py{38,39,310,311}
env_list = linters, py{38,39,310,311}
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
[testenv]
description = run tests
deps =
pytest>=7
pytest-sugar~=0.9
pytest-mock~=3.10
pytest-xdist~=3.3
GitPython~=3.1
commands =
pytest --basetemp={envtmpdir} {posargs:tests}
[testenv:unit]
description = run unit tests
commands =
pytest -m 'unit and not skip' --basetemp={envtmpdir} {posargs:tests}
[testenv:integration]
description = run integration tests
commands =
pytest -m 'integration and not skip' --basetemp={envtmpdir} {posargs:tests}
[testenv:linters]
description = run linters
basepython = python3.11
skip_install = true
deps =
{[testenv:black]deps}
{[testenv:flake8]deps}
{[testenv:bandit]deps}
commands =
{[testenv:black]commands}
{[testenv:flake8]commands}
{[testenv:bandit]commands}
[testenv:black]
description = run black code formatter
skip_install = true
basepython = python3.11
deps =
black
commands =
black {toxinidir}/src {toxinidir}/tests
[testenv:flake8]
description = run flake8 PEP8 code linter
skip_install = true
basepython = python3.11
deps =
flake8
flake8-black
commands =
flake8
[testenv:bandit]
description = run bandit static code analysis security tool
skip_install = true
basepython = python3.11
deps =
bandit
commands =
bandit -c "pyproject.toml" -v -r {toxinidir}/src
"""
[tool.black]
line-length = 90
exclude = '''
/(
\.git
| \.direnv
| \.mypy_cache
| \.tox
| \.venv
| \.vscode
| _build
| __pycache__
| build
| dist
# specific to waybar-check-gmail
| ^/assets
)/
'''
# Targeting future versions as well so we don't have black reformatting code
# en masse later.
target_version = ["py310", "py311", "py37", "py38", "py39"]
[tool.bandit]
exclude_dirs = [
"*.egg-info",
"*.pyc",
".pytest_cache",
".tox",
".vscode",
"__pycache__",
"coverage-*",
"test-results*",
"tests",
]
[tool.pytest.ini_options]
addopts = ["--import-mode=importlib"]
pythonpath = [".", "src"]
markers = [
"great: It's not good, not bad, but somewhat better than good? ¯\\_(ツ)_/¯",
"serial",
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
]
# TODO: test coverage setup
# [tool.coverage.run]
# branch = true
# source = [""]