authcaptureproxy 1.3.6__tar.gz → 1.3.100__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of authcaptureproxy might be problematic. Click here for more details.

@@ -1,6 +1,51 @@
1
1
  # CHANGELOG
2
2
 
3
3
 
4
+ ## v1.3.7 (2026-02-17)
5
+
6
+ ### Bug Fixes
7
+
8
+ * fix: `home-page` key error in metadata (#45)
9
+
10
+ * Update __init__.py
11
+
12
+ Replace:
13
+ ```
14
+ __uri__ = metadata["home-page"]
15
+ ```
16
+ with:
17
+ ```__uri__ = metadata.get("home-page") or metadata.get("Home-Page", "")
18
+ ```
19
+
20
+ * Address nitpick comment
21
+
22
+ * fix: typing fails: PackageMetadata has no attribute "get" [attr-defined]
23
+
24
+ Use Message semantics (.get() is typed)
25
+
26
+ * Address netpick comments
27
+
28
+ * fix: ERROR collecting tests/test_cli.py in build 3.11
29
+
30
+ * fix: build 3.10 error: Incompatible types in assignment (expression has type "PackageMetadata", variable has type "Optional[Message]") [assignment]
31
+
32
+ * Fix typing: stop calling .get() on PackageMetadata (for mypy)
33
+
34
+ * chore: bump pre-commit to >=3.2 for hook stage compatibility ([`6da3ced`](https://github.com/alandtse/auth_capture_proxy/commit/6da3cedac5f75d0ca635472c5e2ea85958d3f306))
35
+
36
+ ### Build System
37
+
38
+ * build: fix tox ([`e6410bb`](https://github.com/alandtse/auth_capture_proxy/commit/e6410bb11cb4d7ee400b59feb995a741c8990a6e))
39
+
40
+ ### Chores
41
+
42
+ * chore: fix config version ([`e6d48c6`](https://github.com/alandtse/auth_capture_proxy/commit/e6d48c6887d070c7f170d3494af2d13fdbb3a58f))
43
+
44
+ ### Refactoring
45
+
46
+ * refactor: migrate to pep621 ([`bd2f8a8`](https://github.com/alandtse/auth_capture_proxy/commit/bd2f8a88b74e113a748bf173a30c45bcd5d02ff9))
47
+
48
+
4
49
  ## v1.3.6 (2026-02-08)
5
50
 
6
51
  ### Bug Fixes
@@ -1,40 +1,33 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: authcaptureproxy
3
- Version: 1.3.6
3
+ Version: 1.3.100
4
4
  Summary: 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.
5
- License: Apache-2.0
5
+ License-Expression: Apache-2.0
6
6
  License-File: LICENSE.txt
7
7
  Author: Alan D. Tse
8
+ Author-email: alandtse@gmail.com
8
9
  Maintainer: Alan D. Tse
9
- Requires-Python: >=3.10,<4.0
10
+ Maintainer-email: alandtse@gmail.com
11
+ Requires-Python: >=3.10
10
12
  Classifier: Development Status :: 3 - Alpha
11
- Classifier: Environment :: Console
12
- Classifier: Intended Audience :: Developers
13
- Classifier: License :: OSI Approved :: Apache Software License
14
13
  Classifier: Natural Language :: English
15
- Classifier: Operating System :: OS Independent
16
- Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.10
18
- Classifier: Programming Language :: Python :: 3.11
19
- Classifier: Programming Language :: Python :: 3.12
20
- Classifier: Programming Language :: Python :: 3.13
21
- Classifier: Programming Language :: Python :: 3.14
22
14
  Classifier: Programming Language :: Python :: 3 :: Only
23
15
  Classifier: Programming Language :: Python :: 3.8
24
16
  Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Intended Audience :: Developers
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Environment :: Console
25
20
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
- Provides-Extra: all
27
- Requires-Dist: aiohttp (>=3,<4)
28
- Requires-Dist: beautifulsoup4 (>=4,<5)
21
+ Requires-Dist: aiohttp (>=3.0.0,<4.0.0)
22
+ Requires-Dist: beautifulsoup4 (>=4.0.0,<5.0.0)
29
23
  Requires-Dist: httpx
30
- Requires-Dist: multidict (>=6,<7)
24
+ Requires-Dist: multidict (>=6.0.0,<7.0.0)
31
25
  Requires-Dist: typer (>=0.3,<1.0)
32
- Requires-Dist: yarl (>=1,<2)
33
- Project-URL: CI, https://github.com/alandtse/auth_capture_proxy/actions
26
+ Requires-Dist: yarl (>=1.0.0,<2.0.0)
27
+ Project-URL: Bug Tracker, https://github.com/alandtse/auth_capture_proxy/issues
34
28
  Project-URL: Documentation, https://auth_capture_proxy.readthedocs.io
35
29
  Project-URL: Download, https://pypi.org/project/authcaptureproxy/
36
30
  Project-URL: Homepage, https://github.com/alandtse/auth_capture_proxy
37
- Project-URL: Issues, https://github.com/alandtse/auth_capture_proxy/issues
38
31
  Project-URL: Repository, https://github.com/alandtse/auth_capture_proxy
39
32
  Description-Content-Type: text/markdown
40
33
 
@@ -0,0 +1,74 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ """Metadata for this auth_capture_proxy."""
3
+
4
+ from __future__ import annotations
5
+
6
+ import logging
7
+ from pathlib import Path
8
+ from email.message import Message
9
+ from importlib.metadata import PackageNotFoundError, metadata as __load
10
+ from typing import cast
11
+
12
+ from authcaptureproxy import const
13
+ from authcaptureproxy.auth_capture_proxy import AuthCaptureProxy
14
+ from authcaptureproxy.examples.modifiers import find_regex_urls
15
+ from authcaptureproxy.helper import prepend_url, swap_url
16
+ from authcaptureproxy.interceptor import BaseInterceptor, InterceptContext
17
+ from authcaptureproxy.stackoverflow import return_timer_countdown_refresh_html
18
+
19
+ pkg = Path(__file__).absolute().parent.name
20
+ logger = logging.getLogger(pkg)
21
+
22
+ __status__ = "Development"
23
+ __copyright__ = "Copyright 2021"
24
+ __date__ = "2021-02-03"
25
+
26
+ __uri__ = ""
27
+ __title__ = ""
28
+ __summary__ = ""
29
+ __license__ = ""
30
+ __version__ = ""
31
+ __author__ = ""
32
+ __maintainer__ = ""
33
+ __contact__ = ""
34
+
35
+ metadata: Message | None = None
36
+
37
+ try:
38
+ md = cast(Message, __load(pkg)) # typed as Message so .get() is valid
39
+ metadata = md # keep public handle for cli.py
40
+
41
+ __uri__ = md.get("Home-page") or md.get("Home-Page") or ""
42
+ __title__ = md.get("Name") or ""
43
+ __summary__ = md.get("Summary") or ""
44
+ __license__ = md.get("License") or ""
45
+ __version__ = md.get("Version") or ""
46
+ __author__ = md.get("Author") or ""
47
+ __maintainer__ = md.get("Maintainer") or ""
48
+ __contact__ = (
49
+ md.get("Author-email")
50
+ or md.get("Maintainer-email")
51
+ or md.get("Maintainer")
52
+ or ""
53
+ )
54
+
55
+ except PackageNotFoundError: # pragma: no cover
56
+ logger.error("Could not load package metadata for %s. Is it installed?", pkg)
57
+
58
+ if __name__ == "__main__": # pragma: no cover
59
+ if metadata is not None:
60
+ print(f"{pkg} (v{__version__})")
61
+ else:
62
+ print(f"Unknown project info for {pkg}")
63
+
64
+ __all__ = [
65
+ "AuthCaptureProxy",
66
+ "BaseInterceptor",
67
+ "InterceptContext",
68
+ "const",
69
+ "return_timer_countdown_refresh_html",
70
+ "find_regex_urls",
71
+ "prepend_url",
72
+ "swap_url",
73
+ "metadata",
74
+ ]
@@ -4,6 +4,7 @@ Python Package for auth capture proxy.
4
4
 
5
5
  Helper files.
6
6
  """
7
+
7
8
  import ast
8
9
  import json
9
10
  import logging
@@ -150,7 +151,7 @@ def swap_url(
150
151
  url = URL(url)
151
152
  old_url_string: Text = str(old_url.with_query({}))
152
153
  new_url_string: Text = str(new_url.with_query({}))
153
- old_query: MultiDict = url.query
154
+ old_query: MultiDictProxy = url.query
154
155
  url_string = str(url.with_query({}))
155
156
  # ensure both paths end with "/" if one of them does
156
157
  if (
@@ -220,7 +221,7 @@ def replace_empty_url(new_url: URL, url: URL) -> URL:
220
221
 
221
222
 
222
223
  def get_nested_dict_keys(
223
- nested_dict: Mapping[Text, Union[Callable, Dict[Text, Callable]]]
224
+ nested_dict: Mapping[Text, Union[Callable, Dict[Text, Callable]]],
224
225
  ) -> List[Text]:
225
226
  """Get list of nested dict keys.
226
227
 
@@ -0,0 +1,180 @@
1
+ [build-system]
2
+ requires = ["poetry-core>=1.0.0"]
3
+ build-backend = "poetry.core.masonry.api"
4
+
5
+ [project]
6
+ name = "authcaptureproxy"
7
+ version = "1.3.100"
8
+ 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."
9
+ readme = "README.md"
10
+ authors = [
11
+ { name = "Alan D. Tse", email = "alandtse@gmail.com" }
12
+ ]
13
+ maintainers = [
14
+ { name = "Alan D. Tse", email = "alandtse@gmail.com" }
15
+ ]
16
+ license = "Apache-2.0"
17
+ classifiers = [
18
+ "Development Status :: 3 - Alpha",
19
+ "Natural Language :: English",
20
+ "Programming Language :: Python :: 3 :: Only",
21
+ "Programming Language :: Python :: 3.8",
22
+ "Programming Language :: Python :: 3.9",
23
+ "Intended Audience :: Developers",
24
+ "Operating System :: OS Independent",
25
+ "Environment :: Console",
26
+ "Topic :: Software Development :: Libraries :: Python Modules",
27
+ ]
28
+ keywords = [""]
29
+ requires-python = ">=3.10"
30
+ dependencies = [
31
+ "typer>=0.3, <1.0",
32
+ "aiohttp>=3.0.0, <4.0.0",
33
+ "multidict>=6.0.0, <7.0.0",
34
+ "yarl>=1.0.0, <2.0.0",
35
+ "beautifulsoup4>=4.0.0, <5.0.0",
36
+ "httpx",
37
+ ]
38
+
39
+ [project.urls]
40
+ Homepage = "https://github.com/alandtse/auth_capture_proxy"
41
+ Repository = "https://github.com/alandtse/auth_capture_proxy"
42
+ Documentation = "https://auth_capture_proxy.readthedocs.io"
43
+ "Bug Tracker" = "https://github.com/alandtse/auth_capture_proxy/issues"
44
+ Download = "https://pypi.org/project/authcaptureproxy/"
45
+
46
+ [project.scripts]
47
+ auth_capture_proxy = "authcaptureproxy.cli:cli"
48
+
49
+ [tool.poetry]
50
+ # Legacy poetry config kept for compatibility where needed, but most should be in [project] now
51
+ # Poetry will implicitly use [project] for most things.
52
+ include = ["README.md", "LICENSE.txt", "CHANGELOG.md"]
53
+
54
+ [tool.poetry.group.dev.dependencies]
55
+ bandit = ">=1.7, <2.0"
56
+ black = ">=20.8b1"
57
+ coverage = { extras = ["toml"], version = "^5" }
58
+ flake8 = ">=3.9, <8.0"
59
+ flake8-bugbear = ">=20.11, <25.0"
60
+ flake8-docstrings = "^1"
61
+ pre-commit = ">=3.2, <4.0"
62
+ pre-commit-hooks = ">=3.4, <4.0"
63
+ pytest = "^7"
64
+ pytest-cov = "^2"
65
+ sphinx = ">=4"
66
+ sphinx-autoapi = ">=1"
67
+ sphinx-copybutton = ">=0.3.1"
68
+ sphinx-rtd-theme = ">=0.5"
69
+ tomlkit = ">=0.7"
70
+ mypy = ">=0.790, <1.0"
71
+ hypothesis = "^6"
72
+ xdoctest = ">=0.15, <1.0"
73
+ python-semantic-release = "^9"
74
+ coveralls = "^3"
75
+ pytest-asyncio = ">=0.14.0, <1"
76
+ tox-gh-actions = ">=2.4.0, <3"
77
+ tox-poetry = ">=0.3.0, <1"
78
+ isort = "^5"
79
+
80
+ [tool.poetry.extras]
81
+ all = []
82
+
83
+ # Tyrannosaurus settings updated to point to new project table locations where possible
84
+ [tool.tyrannosaurus.options]
85
+ sort = false
86
+ align = true
87
+
88
+ [tool.tyrannosaurus.sources]
89
+ pycompatversions = "project.dependencies"
90
+ pytoxversions = "project.dependencies"
91
+ pymetaversion = "'3.9'"
92
+ metavm = "'ubuntu-latest'"
93
+ devdeps = "tool.poetry.group.dev.dependencies"
94
+ status = "'Development'"
95
+ date = "'2021-02-03'"
96
+ copyright = "'Copyright 2021'"
97
+ version = "project.version"
98
+ release = "project.version"
99
+ long_description = "project.description"
100
+ authors = ["Alan D. Tse <github:alandtse>"]
101
+ contributors = [
102
+ "Alan D. Tse <github:alandtse>",
103
+ "Parker Wahle <github:regulad>",
104
+ ]
105
+ maintainers = "tool.tyrannosaurus.sources.authors"
106
+ linelength = "tool.black.line-length"
107
+ importorderstyle = "'google'"
108
+ docstringstyle = "'google'"
109
+
110
+ [tool.tyrannosaurus.sources.flake8skip]
111
+ all = "'W503,E203,E225,E301,E302,E501,D107,D200,D205,D400,D403,D409,D410,D411,D212,W391,W293'"
112
+ test = "'D100,D101,D102,D103,D104,S101,W503,E203,E225,E301,E302,E501,D107,D200,D205,D400,D403,D409,D410,D411,D212,W391,W293'"
113
+
114
+ [tool.tyrannosaurus.targets]
115
+ pyproject = true
116
+ init = true
117
+ tox = true
118
+ precommit = true
119
+ docs = true
120
+ recipes = true
121
+ license = true
122
+ authors = true
123
+ github = true
124
+ travis = true
125
+ dockerfile = true
126
+ readme = true
127
+ changelog = true
128
+ citation = true
129
+ codemeta = true
130
+ environment = false
131
+
132
+ [tool.pytest.ini_options]
133
+ log_cli = true
134
+ log_cli_level = "INFO"
135
+ log_cli_format = "%(asctime)s [%(levelname)8s] %(name)s: %(message)s (%(filename)s:%(lineno)s)"
136
+ log_cli_date_format = "%Y-%m-%d %H:%M:%S"
137
+ asyncio_mode = "strict"
138
+
139
+ [tool.commitizen]
140
+ name = "cz_conventional_commits"
141
+
142
+ [tool.towncrier]
143
+ filename = "NEWS.md"
144
+
145
+ [tool.semantic_release]
146
+ version_toml = ["pyproject.toml:project.version"]
147
+ major_on_zero = true
148
+ branch = "main"
149
+ upload_to_pypi = true
150
+ upload_to_release = true
151
+ build_command = "pip install poetry && poetry lock && poetry build"
152
+
153
+ [tool.coverage.paths]
154
+ source = ["authcaptureproxy"]
155
+
156
+ [tool.coverage.run]
157
+ source = ["authcaptureproxy"]
158
+ relative_files = true
159
+
160
+ [tool.coverage.report]
161
+ show_missing = true
162
+
163
+ [tool.black]
164
+ line-length = 100
165
+ target-version = ["py38"]
166
+
167
+ [tool.isort]
168
+ line_length = 100
169
+
170
+ [tool.bandit]
171
+
172
+ [tool.pycodestyle]
173
+ max-line-length = 100
174
+ statistics = true
175
+
176
+ [tool.pydocstyle]
177
+
178
+ [mypy]
179
+ check_untyped_defs = true
180
+ strict_optional = true
@@ -1,58 +0,0 @@
1
- # SPDX-License-Identifier: Apache-2.0
2
- """Metadata for this auth_capture_proxy."""
3
- import logging
4
-
5
- try:
6
- from importlib_metadata import PackageNotFoundError
7
- from importlib_metadata import metadata as __load
8
- except ModuleNotFoundError:
9
- from importlib.metadata import PackageNotFoundError # type: ignore
10
- from importlib.metadata import metadata as __load # type: ignore
11
-
12
- # If you need to support Python 3.7, change to importlib_metadata (underscore, not dot)
13
- # and then list importlib_metadata to [tool.poetry.dependencies] and docs/requirements.txt
14
- from pathlib import Path
15
-
16
- from authcaptureproxy import const
17
- from authcaptureproxy.auth_capture_proxy import AuthCaptureProxy
18
- from authcaptureproxy.examples.modifiers import find_regex_urls
19
- from authcaptureproxy.helper import prepend_url, swap_url
20
- from authcaptureproxy.interceptor import BaseInterceptor, InterceptContext
21
- from authcaptureproxy.stackoverflow import return_timer_countdown_refresh_html
22
-
23
- pkg = Path(__file__).absolute().parent.name
24
- logger = logging.getLogger(pkg)
25
- metadata = None
26
- try:
27
- metadata = __load(pkg)
28
- __status__ = "Development"
29
- __copyright__ = "Copyright 2021"
30
- __date__ = "2021-02-03"
31
- __uri__ = metadata["home-page"]
32
- __title__ = metadata["name"]
33
- __summary__ = metadata["summary"]
34
- __license__ = metadata["license"]
35
- __version__ = metadata["version"]
36
- __author__ = metadata["author"]
37
- __maintainer__ = metadata["maintainer"]
38
- __contact__ = metadata["maintainer"]
39
- except PackageNotFoundError: # pragma: no cover
40
- logger.error(f"Could not load package metadata for {pkg}. Is it installed?")
41
-
42
- if __name__ == "__main__": # pragma: no cover
43
- if metadata is not None:
44
- print(f"{pkg} (v{metadata['version']})")
45
- else:
46
- print(f"Unknown project info for {pkg}")
47
-
48
-
49
- __all__ = [
50
- "AuthCaptureProxy",
51
- "BaseInterceptor",
52
- "InterceptContext",
53
- "const",
54
- "return_timer_countdown_refresh_html",
55
- "find_regex_urls",
56
- "prepend_url",
57
- "swap_url",
58
- ]
@@ -1,380 +0,0 @@
1
- [metadata]
2
- description-file = "README.md"
3
-
4
- [build-system]
5
- # https://github.com/python-poetry/poetry-core#usage
6
- requires = ["poetry-core"]
7
- build-backend = "poetry.core.masonry.api"
8
-
9
-
10
- #########################################################################################
11
- # Poetry metadata
12
- #########################################################################################
13
-
14
- # This is all metadata that Poetry uses directly.
15
- # TODO: You will want to modify this section.
16
- # Hopefully the defaults are good, so you only need to change the individual TODOs.
17
- # Note that some of these can be filled in with arguments to `tyrannosaurus new` (e.g. --keywords).
18
-
19
- [tool.poetry]
20
-
21
- name = "authcaptureproxy"
22
- # This is the version of your project. Keep it up-to-date and follow semantic versioning.
23
- # It's used in the PyPi, wheels, Docker, and Github packages.
24
- # Also make sure to use exactly this version when creating a Github release,
25
- # but prefix a "v" to the Github release.
26
- # E.g. This might be "1.2.13", and the Github release will be "v1.2.13".
27
- # Although semantic versioning allows for build tags (metadata),
28
- # not all tools are compatible with it, so avoid it if you can.
29
- version = "1.3.6"
30
-
31
- 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."
32
- keywords = [""]
33
- authors = ["Alan D. Tse"]
34
- maintainers = ["Alan D. Tse"]
35
- license = "Apache-2.0"
36
- readme = "README.md"
37
- homepage = "https://github.com/alandtse/auth_capture_proxy"
38
- repository = "https://github.com/alandtse/auth_capture_proxy"
39
- documentation = "https://auth_capture_proxy.readthedocs.io"
40
- # Note: Poetry adds the license to the classifiers automatically
41
- # Development Status, license, and Python versions are kept consistent
42
- # by `tyrannosaurus sync`, if you choose to use that.
43
- # The language, intended audience, OS, environment, and topics are not.
44
- classifiers = [
45
- "Development Status :: 3 - Alpha",
46
- "Natural Language :: English",
47
- "Programming Language :: Python :: 3 :: Only",
48
- "Programming Language :: Python :: 3.8",
49
- "Programming Language :: Python :: 3.9",
50
- "Intended Audience :: Developers",
51
- "Operating System :: OS Independent",
52
- "Environment :: Console",
53
- "Topic :: Software Development :: Libraries :: Python Modules",
54
- ]
55
- # These get packaged into the wheels
56
- # There are uncommon needs to read the readme, license, and/or changelog
57
- # in your code. For example, to read and display a "what's new" section
58
- # if you detect that the user is running a newer version than they were using before.
59
- # If you don't need this, you can remove these entries.
60
- # (You might also be able to package this pyproject.toml file and read metadata from it.)
61
- include = ["README.md", "LICENSE.txt", "CHANGELOG.md"]
62
-
63
- [tool.poetry.urls]
64
- # 'CI', 'Issues', and 'Download' seem to have special meanings
65
- # These all get icons on PyPi
66
- CI = "https://github.com/alandtse/auth_capture_proxy/actions"
67
- Issues = "https://github.com/alandtse/auth_capture_proxy/issues"
68
- Download = "https://pypi.org/project/authcaptureproxy/"
69
-
70
-
71
- #########################################################################################
72
- # Poetry build & dependencies
73
- #########################################################################################
74
-
75
- # TODO: You will want to modify this section.
76
-
77
- [tool.poetry.scripts]
78
- # TODO Is your code a script?
79
- # Set the name of the Python module followed by a colon, followed by the name of the function
80
- auth_capture_proxy = "authcaptureproxy.cli:cli"
81
-
82
- [tool.poetry.dependencies]
83
- # TODO Add and remove dependencies here
84
- # These are dependencies that are included in the main package
85
- python = "^3.10"
86
- typer = ">=0.3, <1.0"
87
- aiohttp = "^3"
88
- multidict = "^6"
89
- yarl = "^1"
90
- beautifulsoup4 = "^4"
91
- httpx = "*"
92
- #homeassistant = { git = "https://github.com/home-assistant/core.git", branch = "dev" }
93
-
94
-
95
- [tool.poetry.dev-dependencies]
96
- # TODO Remove build dependencies you don't want (like xdoctest, perhaps)
97
- # These are dependencies that Poetry uses only when testing
98
- # They all are included as dependencies in tox.ini
99
- # Where `dev` is from `[tool.poetry.extras]` below
100
-
101
- # All of the dependencies in this "paragraph" are needed by the default `tox.ini`
102
- # and Github workflows (under `.github/workflows`) that Tyrannosaurus generated.
103
- # If you remove them, builds will always fail unless you also modify the build pipeline.
104
- # Note: We don't use flake8-bandit because it appears to be unmaintained
105
- bandit = ">=1.7, <2.0"
106
- black = ">=20.8b1"
107
- coverage = { extras = ["toml"], version = "^5" }
108
- flake8 = ">=3.9, <8.0"
109
- flake8-bugbear = ">=20.11, <25.0"
110
- flake8-docstrings = "^1"
111
- pre-commit = ">=2.9, <3.0"
112
- pre-commit-hooks = ">=3.4, <4.0"
113
- pytest = "^7"
114
- pytest-cov = "^2"
115
- sphinx = ">=4"
116
- sphinx-autoapi = ">=1"
117
- sphinx-copybutton = ">=0.3.1"
118
- sphinx-rtd-theme = ">=0.5"
119
- tomlkit = ">=0.7"
120
-
121
- # These are used directly in the default build pipeline
122
- # ... but they're generally optional, and the build won't fail if you remove them
123
- # For example, `mypy` is called in `tox.ini`, but if it's removed then the line
124
- # will fail without causing the build to fail.
125
- mypy = ">=0.790, <1.0"
126
-
127
- # These are useful but are not used directly in the default build pipeline
128
- # that Tyrannosaurus set up for your project
129
- hypothesis = "^6"
130
- xdoctest = ">=0.15, <1.0"
131
- python-semantic-release = "^9"
132
- coveralls = "^3"
133
- pytest-asyncio = ">=0.14.0, <1"
134
- tox-gh-actions = ">=2.4.0, <3"
135
- tox-poetry = ">=0.3.0, <1"
136
- isort = "^5"
137
-
138
- [tool.poetry.extras]
139
- # These are referenced in the tox.ini with `extras = dev`
140
- # These are auto-filled from dev-deps when you run tyrannosaurus sync
141
- # List additional extras sets like this:
142
- # optimization = ["numpy", "scikit-learn"]
143
- # You MUST also list any extras that you want for testing here
144
- # These will be installed by tox to be used for testing
145
- # (The dev dependencies will be installed already however)
146
- # Of course, you can remove the ` --extras "all"` line from tox.ini
147
- # to avoid this
148
- all = []
149
-
150
-
151
- #########################################################################################
152
- # Tyrannosaurus
153
- #########################################################################################
154
-
155
- # == NOTE ==
156
- # These ONLY configure the behavior of `tyrannosaurus sync` (and tyrannosaurus build).
157
- # These commands are not run inside the build pipeline; they're only run if you run them
158
- # specifically. You would only modify them to change this behavior.
159
- # You can safely remove this whole section if you don't want to use these commands at all.
160
-
161
-
162
- [tool.tyrannosaurus.options]
163
- # This tells Tyrannosaurus to sort lines for things like dependencies
164
- # For example, it will sort dependencies in `[tool.poetry.dependencies]` alphabetically
165
- sort = false
166
- # This tells Tyrannosaurus to align the columns in TOML files surrounding = signs
167
- # For example, see how `[tool.tyrannosaurus.targets]` is sorted in this file
168
- align = true
169
-
170
- [tool.tyrannosaurus.sources]
171
- # These tell Tyrannosaurus where to get information to copy
172
- # If a value is not listed here, it won't be copied
173
- # Everything is either:
174
- # 1. A literal value, surrounded with single quotes (e.g. 'py38')
175
- # 2. A literal list, comma-separated (e.g. '[py38,py39]')
176
- # 3. A reference to a pyproject setting (e.g. tool.poetry.version)
177
- # 4. A value or list containing a special variable (e.g. 'Project J, copyright 2021')
178
-
179
- # --- VERSIONS ---
180
- # These control different aspects of Python versions
181
- # pycompatversions says what Python versions are compatible
182
- # tool.poetry.dependencies is almost definitely the best source for this
183
- # pytoxversions dictates what's actually used to test
184
- # tool.poetry.dependencies will choose all of the compatible major versions
185
- # You can alternatively specify exact versions, like '[3.8]' or '[3.8.5,3.9.1]'
186
- # (Don't forget the single quote marks in that example.)
187
- # pymetaversion is only used when building; e.g. in readthedocs, Docker, and Github workflows
188
- # (Note that this last one is not a list -- use single quotes but not brackets.)
189
- pycompatversions = "tool.poetry.dependencies"
190
- pytoxversions = "tool.poetry.dependencies"
191
- pymetaversion = "'3.9'"
192
-
193
- # --- DEVELOPMENT PARAMS ---
194
- # virtual machine info used in Dockerfile and Github workflows
195
- metavm = "'ubuntu-latest'"
196
- # Development dependencies
197
- devdeps = "tool.poetry.dev-dependencies"
198
- # Pick the latest versions compatible with the version ranges:
199
- #precommitvr = "tool.poetry.dev-dependencies"
200
- #precommitconfigvr = "tool.poetry.dev-dependencies"
201
-
202
- # --- PROJECT INFO ---
203
- # These are used in dunders like __copyright__, docs/conf.py, and PyPi classifiers (like Development Status)
204
- # 2021-02-03 is the date you run it at, and 2021-02-03 16-44-50 -08:00 is the datetime
205
- status = "'Development'"
206
- date = "'2021-02-03'"
207
- copyright = "'Copyright 2021'"
208
- version = "tool.poetry.version"
209
- release = "tool.poetry.version"
210
- long_description = "tool.poetry.description"
211
- # These describe the license for your documentation text
212
- # By default no license is mentioned;
213
- # uncomment these to display the license in the docs
214
- #doc_license = "'CC BY 4.0'"
215
- #doc_license_url = "'https://creativecommons.org/licenses/by/4.0'"
216
- # or you can add this (and skip the license URL):
217
- #doc_license = "'all rights reserved'"
218
-
219
- # --- AUTHOR INFO ---
220
- # TODO Fill in authors, contributors, and maintainers
221
- # Use this syntax: "Person Name <id:value,[id:value, [...]]>"
222
- # Specifying github usernames is recommended
223
- # ORCID IDs can also be referenced
224
- #authors = [
225
- # "<<Author Name>> <github:<<username>>,orcid:<<id>>>"
226
- #]
227
- authors = ["Alan D. Tse <github:alandtse>"]
228
- contributors = [
229
- "Alan D. Tse <github:alandtse>",
230
- "Parker Wahle <github:regulad>",
231
- ]
232
- # Turn this into a literal list if it is different than the authors
233
- maintainers = "tool.tyrannosaurus.sources.authors"
234
-
235
- # --- CODING STYLE ---
236
- linelength = "tool.black.line-length"
237
- importorderstyle = "'google'"
238
- docstringstyle = "'google'"
239
-
240
-
241
- # --- CODING STYLE IN PEP8 ---
242
- [tool.tyrannosaurus.sources.flake8skip]
243
- # These affect flake8 commands as directed in tox.ini
244
- # 'all' is copied to tox.ini [flake8.ignore]; these are always ignored
245
- # Any other keys refer to the directory that flake8 is called on
246
- # Ex, `authcaptureproxy = "'D100'"` adds D100 in `poetry run flake8 authcaptureproxy --ignore=D100`
247
- # (Note 1: flake8's --ignore overrides the [flake8.ignore], so Tyrannosaurus appends the "all" values.)
248
- # (Note 2: Keys referring to directory names that tox.ini doesn't call flake8 on are ignored.)
249
- # (Note 3: [tool.pycodestyle] and [tool.pydocstyle] don't need these values because flake8 handles it.)
250
- # You probably want some choices in 'all'
251
- # Then add some more to 'test' if you're less concerned with your test file conventions
252
- # 212 and 213 contradict; 203 and 204 contradict; D302 is not relevant in Py3;
253
- # D107 isn't needed sometimes; and the rest just seem too picky
254
- all = "'W503,E203,E225,E301,E302,E501,D107,D200,D205,D400,D403,D409,D410,D411,D212,W391,W293'"
255
- #authcaptureproxy = ""
256
- #doc = ""
257
- test = "'D100,D101,D102,D103,D104,S101,W503,E203,E225,E301,E302,E501,D107,D200,D205,D400,D403,D409,D410,D411,D212,W391,W293'"
258
-
259
-
260
- [tool.tyrannosaurus.targets]
261
- # This section tells Tyrannosaurus what to sync to.
262
- # These are file and directory names, without filename extensions.
263
- # Removing a line is the same as setting it to false
264
- # They will only be synced if they exist; never created
265
- # To get a recipe and anaconda env, run 'tyrannosaurus recipe' and 'tyrannosaurus env'
266
- # Choices are only true or false
267
- pyproject = true
268
- init = true
269
- tox = true
270
- precommit = true
271
- docs = true
272
- recipes = true
273
- license = true
274
- authors = true
275
- github = true
276
- travis = true
277
- dockerfile = true
278
- readme = true
279
- changelog = true
280
- citation = true
281
- codemeta = true
282
- environment = false
283
-
284
-
285
- #########################################################################################
286
- # Testing
287
- #########################################################################################
288
-
289
- # This will be used in a future version of pytest:
290
- #[tool.pytest]
291
-
292
- [tool.tyrannosuarus.paths]
293
- # These specify where to put certain files
294
- # If they're left blank, the defaults will be used
295
- # The syntax is the same as for tool.tyrannosaurus.sources
296
- #recipe = "'recipes/auth_capture_proxy/meta.yaml'"
297
- #environment = "'environment.yml'"
298
-
299
- [tool.pytest.ini_options]
300
- # Really useful -- output logg statements
301
- log_cli = true
302
- log_cli_level = "INFO"
303
- log_cli_format = "%(asctime)s [%(levelname)8s] %(name)s: %(message)s (%(filename)s:%(lineno)s)"
304
- log_cli_date_format = "%Y-%m-%d %H:%M:%S"
305
- asyncio_mode = "strict"
306
-
307
- #########################################################################################
308
- # Commits & changelog generation
309
- #########################################################################################
310
-
311
- # Commitizen (https://github.com/commitizen-tools/commitizen/)
312
- # is a great tool to generate changelogs from commit messages
313
- # It doesn't directly map to keep-a-changelog change types (e.g. Added)
314
- [tool.commitizen]
315
- name = "cz_conventional_commits"
316
- # I recommend NOT including version and tag_format
317
- # See the docs ("guide" section) how to integrate `cz bump`
318
-
319
- # not used by default, but you could run it
320
- # in tox.ini or .github/workflows/publish.yml (with a commit)
321
- [tool.towncrier]
322
- # Alternatively, you could replace CHANGELOG.md
323
- # In my experience, commit logs make mediocre changelogs
324
- filename = "NEWS.md"
325
-
326
- [tool.semantic_release]
327
- version_toml = ["pyproject.toml:tool.poetry.version"]
328
- major_on_zero = true
329
- branch = "main"
330
- upload_to_pypi = true
331
- upload_to_release = true
332
- build_command = "pip install poetry && poetry build"
333
-
334
- #########################################################################################
335
- # Style checking
336
- #########################################################################################
337
-
338
- # You probably don't need to modify any of this.
339
- # A few you might want to change are:
340
- # [tool.black.line-length] and [tool.isort.line_length]
341
- # (Note that isort is not used by default, and that tyrannosaurus sync will handle them.)
342
- # [mypy.check_untyped_defs] (this is fairly aggressive)
343
- # [tool.towncrier] (if you want to set up towncrier)
344
-
345
- [tool.coverage.paths]
346
- source = ["authcaptureproxy"]
347
-
348
- [tool.coverage.run]
349
- source = ["authcaptureproxy"]
350
- relative_files = true
351
-
352
- [tool.coverage.report]
353
- show_missing = true
354
-
355
- [tool.black]
356
- line-length = 100
357
- # As of December 2020, black doesn't accept py39
358
- target-version = ["py38"]
359
-
360
- [tool.isort]
361
- line_length = 100
362
-
363
- [tool.bandit]
364
-
365
- [tool.pycodestyle]
366
- max-line-length = 100
367
- statistics = true
368
-
369
- [tool.pydocstyle]
370
- [mypy]
371
- check_untyped_defs = true
372
- strict_optional = true
373
-
374
-
375
- # ------- THE FOLLOWING ARE NOT USED BY THEIR RESPECTIVE TOOLS --------
376
- # --- There are open discussions about supporting pyproject for each ---
377
- # https://github.com/python/mypy/issues/5205
378
- # https://github.com/PyCQA/bandit/issues/606
379
- # https://github.com/PyCQA/pycodestyle/issues/813
380
- # https://github.com/PyCQA/pydocstyle/issues/447