Skip to content

0.10.0 v2 #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ jobs:
os:
- ubuntu-22.04
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
steps:
- name: 'Set up Python ${{ matrix.python-version }}'
uses: actions/setup-python@v4
Expand All @@ -30,12 +31,11 @@ jobs:
- uses: actions/checkout@v3
- run: pip install -U pip setuptools
- run: pip install -r requirements.txt -r requirements-ci.txt
- run: flake8 aiohttp_swagger3 tests examples
- run: isort -q --check --diff aiohttp_swagger3 tests examples
- run: black -q -l 120 --check --diff aiohttp_swagger3 tests examples
- run: ruff format --check
- run: ruff check
- run: mypy aiohttp_swagger3
- run: pytest --cov=aiohttp_swagger3 --cov-report=term-missing tests/
- uses: codecov/codecov-action@v3.1.1
- uses: codecov/codecov-action@v5.3.1

deploy:
name: Deploy
Expand All @@ -48,11 +48,11 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
pip install setuptools build
- name: Build package
run: python -m build
- name: Publish package
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Disable validation
Requirements
============

- python >= 3.8
- python >= 3.9
- aiohttp >= 3.8.0
- pyyaml >= 5.4
- attrs >= 19.3.0
Expand Down
2 changes: 1 addition & 1 deletion aiohttp_swagger3/rapidoc_ui/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.3.4
9.3.8
1,390 changes: 705 additions & 685 deletions aiohttp_swagger3/rapidoc_ui/rapidoc-min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion aiohttp_swagger3/redoc_ui/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.0.0
v2.4.0
608 changes: 317 additions & 291 deletions aiohttp_swagger3/redoc_ui/redoc.standalone.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion aiohttp_swagger3/swagger_ui/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.15.5
5.18.3
3 changes: 1 addition & 2 deletions aiohttp_swagger3/swagger_ui/swagger-ui-bundle.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions aiohttp_swagger3/swagger_ui/swagger-ui-standalone-preset.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion aiohttp_swagger3/swagger_ui/swagger-ui.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion aiohttp_swagger3/ui_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def _expand_responses_validator(self, _: "attr.Attribute[str]", value: str) -> N
int(raw_code)
except ValueError:
raise ValueError(
"expandResponses must be either 'all' or " f"comma-separated list of http codes, got '{raw_code}'"
f"expandResponses must be either 'all' or comma-separated list of http codes, got '{raw_code}'"
)

# noinspection PyUnresolvedReferences
Expand Down
36 changes: 20 additions & 16 deletions setup.cfg → pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
[metadata]
description_file = README.rst
[project]
requires-python = ">=3.9"

[aliases]
test = pytest
[tool.ruff]
line-length = 120
indent-width = 4
extend-exclude = ["docs"]

[flake8]
ignore = E203, E266, E501, W503
max-line-length = 120
select = B, C, E, F, W, T4, B9
target-version = "py312"

[isort]
line_length = 120
multi_line_output = 3
include_trailing_comma = true
known_first_party = aiohttp_swagger3
known_third_party = pytest
[tool.ruff.lint]
select = ["I"]
ignore = ["F"]

[mypy]
fixable = ["I"]

[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"

[tool.mypy]
incremental = true
warn_redundant_casts = true
disallow_subclassing_any = true
Expand All @@ -33,4 +37,4 @@ disallow_any_decorated = true
disallow_untyped_decorators = true
strict_optional = true
disallow_any_unimported = true
;disallow_any_generics = true
# disallow_any_generics = true
4 changes: 1 addition & 3 deletions requirements-ci.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
mypy==1.7.1
black==23.11.0
flake8==6.1.0
isort==5.12.0
ruff==0.9.6
types-pyyaml==6.0.12.12
pytest==7.4.3
pytest-xdist==3.5.0
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pathlib
import re

from setuptools import setup

BASE = pathlib.Path(__file__).parent
Expand Down Expand Up @@ -39,7 +40,6 @@
"License :: OSI Approved :: Apache Software License",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -51,6 +51,6 @@
"Framework :: AsyncIO",
"Topic :: Internet :: WWW/HTTP",
],
python_requires=">=3.8",
python_requires=">=3.9",
install_requires=install_requires,
)
16 changes: 8 additions & 8 deletions tests/test_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ async def handler(request):
return web.json_response()

swagger = swagger_docs()
swagger.add_get("/r", handler, allow_head=False),
swagger.add_head("/r", handler),
swagger.add_put("/r", handler),
swagger.add_patch("/r", handler),
swagger.add_post("/r", handler),
swagger.add_delete("/r", handler),
swagger.add_options("/r", handler),
swagger.add_view("/r2", View),
swagger.add_get("/r", handler, allow_head=False)
swagger.add_head("/r", handler)
swagger.add_put("/r", handler)
swagger.add_patch("/r", handler)
swagger.add_post("/r", handler)
swagger.add_delete("/r", handler)
swagger.add_options("/r", handler)
swagger.add_view("/r2", View)

client = await aiohttp_client(swagger._app)

Expand Down
7 changes: 3 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
[tox]
envlist = py3{8,9,10,11}
envlist = py3{9,10,11,12,13}

[testenv]
deps =
-r requirements.txt
-r requirements-ci.txt
commands =
flake8 aiohttp_swagger3 tests examples
isort -q --check --diff aiohttp_swagger3 tests examples
black -q -l 120 --check --diff aiohttp_swagger3 tests examples
ruff format --check
ruff check
mypy aiohttp_swagger3
pytest --cov=aiohttp_swagger3 --cov-report=term-missing tests/
skip_install = true