-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
386 lines (331 loc) · 14.8 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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
[metadata]
description-file = "README.md"
[build-system]
# https://github.com/python-poetry/poetry-core#usage
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
#########################################################################################
# Poetry metadata
#########################################################################################
# This is all metadata that Poetry uses directly.
# TODO: You will want to modify this section.
# Hopefully the defaults are good, so you only need to change the individual TODOs.
# Note that some of these can be filled in with arguments to `tyrannosaurus new` (e.g. --keywords).
[tool.poetry]
name = "authcaptureproxy"
# This is the version of your project. Keep it up-to-date and follow semantic versioning.
# It's used in the PyPi, wheels, Docker, and Github packages.
# Also make sure to use exactly this version when creating a Github release,
# but prefix a "v" to the Github release.
# E.g. This might be "1.2.13", and the Github release will be "v1.2.13".
# Although semantic versioning allows for build tags (metadata),
# not all tools are compatible with it, so avoid it if you can.
version = "1.3.2"
description = "A Python project to create a proxy to capture authentication information from a webpage. This is useful to capture oauth login details without access to a third-party oauth."
keywords = [""]
authors = ["Alan D. Tse"]
maintainers = ["Alan D. Tse"]
license = "Apache-2.0"
readme = "README.md"
homepage = "https://github.com/alandtse/auth_capture_proxy"
repository = "https://github.com/alandtse/auth_capture_proxy"
documentation = "https://auth_capture_proxy.readthedocs.io"
# Note: Poetry adds the license to the classifiers automatically
# Development Status, license, and Python versions are kept consistent
# by `tyrannosaurus sync`, if you choose to use that.
# The language, intended audience, OS, environment, and topics are not.
classifiers = [
"Development Status :: 3 - Alpha",
"Natural Language :: English",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Environment :: Console",
"Topic :: Software Development :: Libraries :: Python Modules",
]
# These get packaged into the wheels
# There are uncommon needs to read the readme, license, and/or changelog
# in your code. For example, to read and display a "what's new" section
# if you detect that the user is running a newer version than they were using before.
# If you don't need this, you can remove these entries.
# (You might also be able to package this pyproject.toml file and read metadata from it.)
include = ["README.md", "LICENSE.txt", "CHANGELOG.md"]
[tool.poetry.urls]
# 'CI', 'Issues', and 'Download' seem to have special meanings
# These all get icons on PyPi
CI = "https://github.com/alandtse/auth_capture_proxy/actions"
Issues = "https://github.com/alandtse/auth_capture_proxy/issues"
Download = "https://pypi.org/project/authcaptureproxy/"
#########################################################################################
# Poetry build & dependencies
#########################################################################################
# TODO: You will want to modify this section.
[tool.poetry.scripts]
# TODO Is your code a script?
# Set the name of the Python module followed by a colon, followed by the name of the function
auth_capture_proxy = "authcaptureproxy.cli:cli"
[tool.poetry.dependencies]
# TODO Add and remove dependencies here
# These are dependencies that are included in the main package
python = "^3.10"
typer = ">=0.3, <1.0"
aiohttp = "^3"
multidict = "^6"
yarl = "^1"
beautifulsoup4 = "^4"
httpx = "*"
#homeassistant = { git = "https://github.com/home-assistant/core.git", branch = "dev" }
[tool.poetry.dev-dependencies]
# TODO Remove build dependencies you don't want (like xdoctest, perhaps)
# These are dependencies that Poetry uses only when testing
# They all are included as dependencies in tox.ini
# Where `dev` is from `[tool.poetry.extras]` below
# All of the dependencies in this "paragraph" are needed by the default `tox.ini`
# and Github workflows (under `.github/workflows`) that Tyrannosaurus generated.
# If you remove them, builds will always fail unless you also modify the build pipeline.
# Note: We don't use flake8-bandit because it appears to be unmaintained
bandit = ">=1.7, <2.0"
black = ">=20.8b1"
coverage = { extras = ["toml"], version = "^5" }
flake8 = "^3"
flake8-bugbear = "^20"
flake8-docstrings = "^1"
pre-commit = ">=2.9, <3.0"
pre-commit-hooks = ">=3.4, <4.0"
pytest = "^7"
pytest-cov = "^2"
sphinx = ">=4"
sphinx-autoapi = ">=1"
sphinx-copybutton = ">=0.3.1"
sphinx-rtd-theme = ">=0.5"
tomlkit = ">=0.7"
# These are used directly in the default build pipeline
# ... but they're generally optional, and the build won't fail if you remove them
# For example, `mypy` is called in `tox.ini`, but if it's removed then the line
# will fail without causing the build to fail.
mypy = ">=0.790, <1.0"
# These are useful but are not used directly in the default build pipeline
# that Tyrannosaurus set up for your project
hypothesis = "^6"
xdoctest = ">=0.15, <1.0"
python-semantic-release = "^7"
coveralls = "^3"
pytest-asyncio = ">=0.14.0, <1"
tox-gh-actions = ">=2.4.0, <3"
tox-poetry = ">=0.3.0, <1"
isort = "^5"
[tool.poetry.extras]
# These are referenced in the tox.ini with `extras = dev`
# These are auto-filled from dev-deps when you run tyrannosaurus sync
# List additional extras sets like this:
# optimization = ["numpy", "scikit-learn"]
# You MUST also list any extras that you want for testing here
# These will be installed by tox to be used for testing
# (The dev dependencies will be installed already however)
# Of course, you can remove the ` --extras "all"` line from tox.ini
# to avoid this
all = []
#########################################################################################
# Tyrannosaurus
#########################################################################################
# == NOTE ==
# These ONLY configure the behavior of `tyrannosaurus sync` (and tyrannosaurus build).
# These commands are not run inside the build pipeline; they're only run if you run them
# specifically. You would only modify them to change this behavior.
# You can safely remove this whole section if you don't want to use these commands at all.
[tool.tyrannosaurus.options]
# This tells Tyrannosaurus to sort lines for things like dependencies
# For example, it will sort dependencies in `[tool.poetry.dependencies]` alphabetically
sort = false
# This tells Tyrannosaurus to align the columns in TOML files surrounding = signs
# For example, see how `[tool.tyrannosaurus.targets]` is sorted in this file
align = true
[tool.tyrannosaurus.sources]
# These tell Tyrannosaurus where to get information to copy
# If a value is not listed here, it won't be copied
# Everything is either:
# 1. A literal value, surrounded with single quotes (e.g. 'py38')
# 2. A literal list, comma-separated (e.g. '[py38,py39]')
# 3. A reference to a pyproject setting (e.g. tool.poetry.version)
# 4. A value or list containing a special variable (e.g. 'Project J, copyright 2021')
# --- VERSIONS ---
# These control different aspects of Python versions
# pycompatversions says what Python versions are compatible
# tool.poetry.dependencies is almost definitely the best source for this
# pytoxversions dictates what's actually used to test
# tool.poetry.dependencies will choose all of the compatible major versions
# You can alternatively specify exact versions, like '[3.8]' or '[3.8.5,3.9.1]'
# (Don't forget the single quote marks in that example.)
# pymetaversion is only used when building; e.g. in readthedocs, Docker, and Github workflows
# (Note that this last one is not a list -- use single quotes but not brackets.)
pycompatversions = "tool.poetry.dependencies"
pytoxversions = "tool.poetry.dependencies"
pymetaversion = "'3.9'"
# --- DEVELOPMENT PARAMS ---
# virtual machine info used in Dockerfile and Github workflows
metavm = "'ubuntu-latest'"
# Development dependencies
devdeps = "tool.poetry.dev-dependencies"
# Pick the latest versions compatible with the version ranges:
#precommitvr = "tool.poetry.dev-dependencies"
#precommitconfigvr = "tool.poetry.dev-dependencies"
# --- PROJECT INFO ---
# These are used in dunders like __copyright__, docs/conf.py, and PyPi classifiers (like Development Status)
# 2021-02-03 is the date you run it at, and 2021-02-03 16-44-50 -08:00 is the datetime
status = "'Development'"
date = "'2021-02-03'"
copyright = "'Copyright 2021'"
version = "tool.poetry.version"
release = "tool.poetry.version"
long_description = "tool.poetry.description"
# These describe the license for your documentation text
# By default no license is mentioned;
# uncomment these to display the license in the docs
#doc_license = "'CC BY 4.0'"
#doc_license_url = "'https://creativecommons.org/licenses/by/4.0'"
# or you can add this (and skip the license URL):
#doc_license = "'all rights reserved'"
# --- AUTHOR INFO ---
# TODO Fill in authors, contributors, and maintainers
# Use this syntax: "Person Name <id:value,[id:value, [...]]>"
# Specifying github usernames is recommended
# ORCID IDs can also be referenced
#authors = [
# "<<Author Name>> <github:<<username>>,orcid:<<id>>>"
#]
authors = ["Alan D. Tse <github:alandtse>"]
contributors = [
"Alan D. Tse <github:alandtse>",
"Parker Wahle <github:regulad>",
]
# Turn this into a literal list if it is different than the authors
maintainers = "tool.tyrannosaurus.sources.authors"
# --- CODING STYLE ---
linelength = "tool.black.line-length"
importorderstyle = "'google'"
docstringstyle = "'google'"
# --- CODING STYLE IN PEP8 ---
[tool.tyrannosaurus.sources.flake8skip]
# These affect flake8 commands as directed in tox.ini
# 'all' is copied to tox.ini [flake8.ignore]; these are always ignored
# Any other keys refer to the directory that flake8 is called on
# Ex, `authcaptureproxy = "'D100'"` adds D100 in `poetry run flake8 authcaptureproxy --ignore=D100`
# (Note 1: flake8's --ignore overrides the [flake8.ignore], so Tyrannosaurus appends the "all" values.)
# (Note 2: Keys referring to directory names that tox.ini doesn't call flake8 on are ignored.)
# (Note 3: [tool.pycodestyle] and [tool.pydocstyle] don't need these values because flake8 handles it.)
# You probably want some choices in 'all'
# Then add some more to 'test' if you're less concerned with your test file conventions
# 212 and 213 contradict; 203 and 204 contradict; D302 is not relevant in Py3;
# D107 isn't needed sometimes; and the rest just seem too picky
all = "'W503,E203,E225,E301,E302,E501,D107,D200,D205,D400,D403,D409,D410,D411,D212,W391,W293'"
#authcaptureproxy = ""
#doc = ""
test = "'D100,D101,D102,D103,D104,S101,W503,E203,E225,E301,E302,E501,D107,D200,D205,D400,D403,D409,D410,D411,D212,W391,W293'"
[tool.tyrannosaurus.targets]
# This section tells Tyrannosaurus what to sync to.
# These are file and directory names, without filename extensions.
# Removing a line is the same as setting it to false
# They will only be synced if they exist; never created
# To get a recipe and anaconda env, run 'tyrannosaurus recipe' and 'tyrannosaurus env'
# Choices are only true or false
pyproject = true
init = true
tox = true
precommit = true
docs = true
recipes = true
license = true
authors = true
github = true
travis = true
dockerfile = true
readme = true
changelog = true
citation = true
codemeta = true
environment = false
#########################################################################################
# Testing
#########################################################################################
# This will be used in a future version of pytest:
#[tool.pytest]
[tool.tyrannosuarus.paths]
# These specify where to put certain files
# If they're left blank, the defaults will be used
# The syntax is the same as for tool.tyrannosaurus.sources
#recipe = "'recipes/auth_capture_proxy/meta.yaml'"
#environment = "'environment.yml'"
[tool.pytest.ini_options]
# Really useful -- output logg statements
log_cli = true
log_cli_level = "INFO"
log_cli_format = "%(asctime)s [%(levelname)8s] %(name)s: %(message)s (%(filename)s:%(lineno)s)"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
asyncio_mode = "strict"
#########################################################################################
# Commits & changelog generation
#########################################################################################
# Commitizen (https://github.com/commitizen-tools/commitizen/)
# is a great tool to generate changelogs from commit messages
# It doesn't directly map to keep-a-changelog change types (e.g. Added)
[tool.commitizen]
name = "cz_conventional_commits"
# I recommend NOT including version and tag_format
# See the docs ("guide" section) how to integrate `cz bump`
# not used by default, but you could run it
# in tox.ini or .github/workflows/publish.yml (with a commit)
[tool.towncrier]
# Alternatively, you could replace CHANGELOG.md
# In my experience, commit logs make mediocre changelogs
filename = "NEWS.md"
[tool.semantic_release]
version_pattern = [
'codemeta.json:"version": "{version}"',
'CITATION.cff:^version: {version}',
'Dockerfile:LABEL version="{version}"',
'Dockerfile:LABEL org.opencontainers.image.version="{version}"',
]
version_variable = "pyproject.toml:version"
upload_to_pypi = true
upload_to_release = true
changelog_sections = "feature,fix,breaking,documentation,performance,refactor"
build_command = "pip install poetry && poetry build"
branch = "main"
#########################################################################################
# Style checking
#########################################################################################
# You probably don't need to modify any of this.
# A few you might want to change are:
# [tool.black.line-length] and [tool.isort.line_length]
# (Note that isort is not used by default, and that tyrannosaurus sync will handle them.)
# [mypy.check_untyped_defs] (this is fairly aggressive)
# [tool.towncrier] (if you want to set up towncrier)
[tool.coverage.paths]
source = ["authcaptureproxy"]
[tool.coverage.run]
source = ["authcaptureproxy"]
relative_files = true
[tool.coverage.report]
show_missing = true
[tool.black]
line-length = 100
# As of December 2020, black doesn't accept py39
target-version = ["py38"]
[tool.isort]
line_length = 100
[tool.bandit]
[tool.pycodestyle]
max-line-length = 100
statistics = true
[tool.pydocstyle]
[mypy]
check_untyped_defs = true
strict_optional = true
# ------- THE FOLLOWING ARE NOT USED BY THEIR RESPECTIVE TOOLS --------
# --- There are open discussions about supporting pyproject for each ---
# https://github.com/python/mypy/issues/5205
# https://github.com/PyCQA/bandit/issues/606
# https://github.com/PyCQA/pycodestyle/issues/813
# https://github.com/PyCQA/pydocstyle/issues/447