Skip to content

Commit 285475c

Browse files
authored
chore!: large project update (#103)
1 parent e06bf48 commit 285475c

63 files changed

Lines changed: 3146 additions & 1583 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,41 @@
22
name: CI
33
on:
44
pull_request:
5-
branches: [master]
5+
branches: [main]
66
jobs:
7-
build:
7+
lint:
88
runs-on: ubuntu-latest
99
steps:
10-
- name: Checkout Git
10+
- name: checkout
1111
uses: actions/checkout@v6
12-
- name: Install UV
12+
- name: install uv
1313
uses: astral-sh/setup-uv@v6
1414
with:
15-
python-version: 3.9
15+
python-version: "3.10"
1616
enable-cache: true
17-
- name: Install dependencies
17+
- name: dependencies
1818
run: uv sync --locked --dev
19-
- name: Run linters
20-
run: uv run mypy ./src
21-
- name: Run tests
19+
- name: ruff
20+
run: uv run ruff check .
21+
- name: mypy
22+
run: uv run mypy .
23+
- name: ty
24+
run: uv run ty check .
25+
test:
26+
name: test python ${{ matrix.python-version }}
27+
strategy:
28+
matrix:
29+
python-version: ["3.10", "3.11", "3.12", "3.13"]
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: checkout
33+
uses: actions/checkout@v6
34+
- name: install uv
35+
uses: astral-sh/setup-uv@v6
36+
with:
37+
python-version: ${{ matrix.python-version }}
38+
enable-cache: true
39+
- name: dependencies
40+
run: uv sync --locked --dev
41+
- name: tests
2242
run: uv run pytest
23-

.github/workflows/upload.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Install UV
1414
uses: astral-sh/setup-uv@v6
1515
with:
16-
python-version: 3.9
16+
python-version: "3.10"
1717
enable-cache: true
1818
- name: Install dependencies
1919
run: |

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ venv.bak/
116116

117117
# mypy
118118
.mypy_cache/
119+
120+
# ruff
121+
.ruff_cache/
119122
.dmypy.json
120123
dmypy.json
121124

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.9
1+
3.10

justfile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env just --justfile
22

3-
set quiet := true
3+
set quiet
44

55
# show help
66
help:
@@ -12,7 +12,7 @@ build:
1212

1313
# remove temp build files
1414
clean:
15-
rm -Rf dist/ .pytest_cache/ .mypy_cache/
15+
rm -Rf dist/ .pytest_cache/ .mypy_cache/ .ruff_cache/
1616

1717
# upload package to test repository
1818
publish-test:
@@ -28,8 +28,14 @@ sync:
2828

2929
# run unit tests
3030
test:
31-
uv run pytest -qv
31+
uv run pytest -qv --cov=openapi_parser --cov-report=term:skip-covered
32+
33+
# run package formatters
34+
fmt:
35+
uv run ruff format .
3236

3337
# run package linters
3438
lint:
35-
uv run mypy ./src
39+
uv run ruff check --fix .
40+
uv run mypy .
41+
uv run ty check .

license.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Artyom Manchenkov
3+
Copyright (c) 2020 Artem Manchenkov
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

pyproject.toml

Lines changed: 38 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ description = "OpenAPI v3 parser"
55
readme = "readme.md"
66
license = { file = "license.txt" }
77
authors = [{ name = "Artem Manchenkov", email = "artem@manchenkoff.me" }]
8+
requires-python = ">=3.10"
89
keywords = [
910
"swagger",
1011
"python",
@@ -15,29 +16,30 @@ keywords = [
1516
"swagger-api",
1617
]
1718
classifiers = [
18-
"Development Status :: 4 - Beta",
1919
"License :: OSI Approved :: MIT License",
2020
"Operating System :: OS Independent",
2121
"Intended Audience :: Developers",
22-
"Programming Language :: Python :: 3.9",
22+
"Programming Language :: Python :: 3.10",
2323
"Topic :: Software Development :: Libraries",
2424
]
25-
requires-python = ">=3.9"
26-
dependencies = ["openapi-spec-validator>=0.7.2", "prance>=23.6.21.0"]
25+
dependencies = [
26+
"openapi-spec-validator>=0.8.5",
27+
"prance>=25.4.8.0",
28+
]
2729

2830
[project.urls]
2931
homepage = "https://github.com/manchenkoff/openapi3-parser"
3032
source = "https://github.com/manchenkoff/openapi3-parser"
3133

3234
[dependency-groups]
33-
dev = ["mypy>=1.18.2", "pytest>=8.4.2"]
35+
dev = ["mypy>=2.1.0", "pytest>=9.0.3", "pytest-cov>=6.1.0", "ruff>=0.15.13", "ty>=0.0.37"]
3436

3537
[build-system]
36-
requires = ["setuptools>=61.0"]
37-
build-backend = "setuptools.build_meta"
38+
requires = ["uv_build>=0.11.12,<0.12"]
39+
build-backend = "uv_build"
3840

39-
[tool.setuptools.packages.find]
40-
where = ["src"]
41+
[tool.uv.build-backend]
42+
module-name = "openapi_parser"
4143

4244
[[tool.uv.index]]
4345
name = "testpypi"
@@ -46,26 +48,35 @@ publish-url = "https://test.pypi.org/legacy/"
4648
explicit = true
4749

4850
[tool.mypy]
49-
python_version = 3.9
50-
51-
check_untyped_defs = true
52-
follow_imports = "silent"
53-
no_implicit_reexport = true
54-
no_implicit_optional = true
51+
python_version = "3.10"
52+
strict = true
53+
mypy_path = ["src"]
5554

56-
strict_optional = true
57-
strict_equality = true
55+
[[tool.mypy.overrides]]
56+
module = "tests.*"
5857

58+
[[tool.mypy.overrides]]
59+
module = "prance"
5960
ignore_missing_imports = true
60-
ignore_errors = false
6161

62-
disallow_any_generics = false
63-
disallow_untyped_defs = true
64-
disallow_untyped_calls = true
65-
disallow_untyped_decorators = true
62+
[tool.ruff.lint]
63+
extend-select = [
64+
"D", # pydocstyle
65+
"UP", # pyupgrade
66+
"B", # flake8-bugbear
67+
"SIM", # flake8-simplify
68+
"I", # isort
69+
"ARG", # unused arguments
70+
"RUF100", # unused noqa
71+
"TID252", # ban relative imports
72+
]
73+
74+
[tool.ruff.lint.pydocstyle]
75+
convention = "google"
76+
77+
[tool.ruff.lint.per-file-ignores]
78+
"tests/**" = ["D", "ARG"]
6679

67-
warn_redundant_casts = true
68-
warn_unused_ignores = true
69-
warn_unused_configs = true
70-
warn_unreachable = true
71-
warn_no_return = true
80+
[tool.coverage.run]
81+
source = ["openapi_parser"]
82+
omit = ["tests/*"]

0 commit comments

Comments
 (0)