Skip to content

Commit 75fa586

Browse files
committed
Convert to UV
1 parent 5b39914 commit 75fa586

File tree

4 files changed

+1156
-41
lines changed

4 files changed

+1156
-41
lines changed

.github/workflows/python.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,11 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@v4
20-
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v4
20+
- name: Set up UV ${{ matrix.python-version }}
21+
uses: astral-sh/setup-uv@v5
2222
with:
23+
enable-cache: true
2324
python-version: ${{ matrix.python-version }}
24-
- name: Install dependencies
25-
run: |
26-
python -m pip install --upgrade pip
27-
pip install -r requirements.txt
28-
pip install -r test-requirements.txt
2925
- name: Test with pytest
3026
run: |
31-
pytest --cov=codegen_api_client
27+
uv run pytest --cov=codegen_api_client

.github/workflows/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: codegen_api_client Build and Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-release:
10+
environment: release
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Set up UV
17+
uses: astral-sh/setup-uv@v5
18+
with:
19+
enable-cache: true
20+
- name: Build
21+
run: |
22+
uv build
23+
- name: Publish
24+
run: |
25+
uv publish

pyproject.toml

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,43 @@
1-
[tool.poetry]
1+
[project]
22
name = "codegen_api_client"
33
version = "1.0.0"
44
description = "Developer API"
5-
authors = ["OpenAPI Generator Community <team@openapitools.org>"]
6-
license = "NoLicense"
5+
authors = [{ name = "OpenAPI Generator Community", email = "team@openapitools.org" }]
6+
requires-python = "~=3.8"
77
readme = "README.md"
8-
repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID"
9-
keywords = ["OpenAPI", "OpenAPI-Generator", "Developer API"]
10-
include = ["codegen_api_client/py.typed"]
11-
12-
[tool.poetry.dependencies]
13-
python = "^3.8"
8+
license = "Apache-2.0"
9+
keywords = [
10+
"OpenAPI",
11+
"OpenAPI-Generator",
12+
"Developer API",
13+
]
14+
dependencies = [
15+
"urllib3>= 1.25.3, < 3.0.0",
16+
"python-dateutil>= 2.8.2",
17+
"pydantic>= 2",
18+
"typing-extensions>= 4.7.1",
19+
]
1420

15-
urllib3 = ">= 1.25.3, < 3.0.0"
16-
python-dateutil = ">= 2.8.2"
17-
pydantic = ">= 2"
18-
typing-extensions = ">= 4.7.1"
21+
[project.urls]
22+
Repository = "https://github.com/codegen-sh/codegen-api-client"
1923

20-
[tool.poetry.dev-dependencies]
21-
pytest = ">= 7.2.1"
22-
pytest-cov = ">= 2.8.1"
23-
tox = ">= 3.9.0"
24-
flake8 = ">= 4.0.0"
25-
types-python-dateutil = ">= 2.8.19.14"
26-
mypy = ">= 1.5"
24+
[dependency-groups]
25+
dev = [
26+
"pytest>= 7.2.1",
27+
"pytest-cov>= 2.8.1",
28+
"tox>= 3.9.0",
29+
"flake8>= 4.0.0",
30+
"types-python-dateutil>= 2.8.19.14",
31+
"mypy>= 1.5",
32+
]
2733

34+
[tool.uv.build-backend]
35+
module-root=""
36+
data = ["codegen_api_client/py.typed"]
2837

2938
[build-system]
30-
requires = ["setuptools"]
31-
build-backend = "setuptools.build_meta"
39+
requires = ["uv_build>=0.6,<0.7"]
40+
build-backend = "uv_build"
3241

3342
[tool.pylint.'MESSAGES CONTROL']
3443
extension-pkg-whitelist = "pydantic"
@@ -60,17 +69,6 @@ disallow_subclassing_any = true
6069
disallow_untyped_decorators = true
6170
disallow_any_generics = true
6271

63-
### These next few are various gradations of forcing use of type annotations
64-
#disallow_untyped_calls = true
65-
#disallow_incomplete_defs = true
66-
#disallow_untyped_defs = true
67-
#
68-
### This one isn't too hard to get passing, but return on investment is lower
69-
#no_implicit_reexport = true
70-
#
71-
### This one can be tricky to get passing if you use a lot of untyped libraries
72-
#warn_return_any = true
73-
7472
[[tool.mypy.overrides]]
7573
module = [
7674
"codegen_api_client.configuration",

0 commit comments

Comments
 (0)