Skip to content

Commit 0c7f5b8

Browse files
committed
uv 💜
1 parent 5c09119 commit 0c7f5b8

File tree

8 files changed

+764
-100
lines changed

8 files changed

+764
-100
lines changed

.github/workflows/deploy.yml

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build & Upload Python Package to PYPI production
1+
name: Build & Upload Python Package to PyPI
22

33
on:
44
release:
@@ -10,28 +10,35 @@ jobs:
1010
deploy:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
14-
- name: Set up Python
15-
uses: actions/setup-python@v2
13+
- name: Checkout 🛒
14+
uses: actions/checkout@v4
15+
16+
- name: Install uv 💜
17+
uses: astral-sh/setup-uv@v6
18+
19+
- name: Install ruff 🐶
20+
uses: astral-sh/ruff-action@v3
21+
22+
- name: Set up Python 🐍
23+
uses: actions/setup-python@v4
1624
with:
17-
python-version: '3.12'
18-
- name: Install dependencies
25+
python-version: "3.13"
26+
27+
- name: Install dependencies 📦
1928
run: |
20-
python -m pip install --upgrade pip
21-
pip install setuptools wheel twine
22-
pip install flake8 pytest
23-
pip install -r requirements.txt
24-
- name: Lint with flake8
29+
uv sync --all-groups --frozen
30+
31+
- name: Lint with flake8 ❄️
2532
run: |
26-
# stop the build if there are Python syntax errors or undefined names
27-
flake8 src/ --config=flake8.cfg
28-
- name: Test with pytest
33+
flake8 --config flake8.cfg src/
34+
35+
- name: Test with pytest
2936
run: |
3037
pytest tests
31-
- name: Build and publish
38+
39+
- name: Build and publish 🚀
3240
env:
33-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
34-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
41+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_PASSWORD }}
3542
run: |
36-
python setup.py sdist bdist_wheel
37-
twine upload dist/*
43+
uv build
44+
uv publish
Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,44 @@
1-
name: Build & Deploy Python Package To Test PYPI
1+
name: Build & Upload Python Package To Test PyPI
22

33
on:
44
create:
55
tags:
66
- 0.*a
77
- 1.*a
88

9-
109
jobs:
1110
deploy:
1211
runs-on: ubuntu-latest
1312
steps:
14-
- uses: actions/checkout@v2
15-
- name: Set up Python
16-
uses: actions/setup-python@v2
13+
- name: Checkout 🛒
14+
uses: actions/checkout@v4
15+
16+
- name: Install uv 💜
17+
uses: astral-sh/setup-uv@v6
18+
19+
- name: Install ruff 🐶
20+
uses: astral-sh/ruff-action@v3
21+
22+
- name: Set up Python 🐍
23+
uses: actions/setup-python@v4
1724
with:
18-
python-version: '3.12'
19-
- name: Install dependencies
25+
python-version: "3.13"
26+
27+
- name: Install dependencies 📦
2028
run: |
21-
python -m pip install --upgrade pip
22-
pip install setuptools wheel twine
23-
pip install flake8 pytest
24-
pip install -r requirements.txt
25-
- name: Lint with flake8
29+
uv sync --all-groups --frozen
30+
31+
- name: Lint with flake8 ❄️
2632
run: |
27-
# stop the build if there are Python syntax errors or undefined names
28-
flake8 src/ --config=flake8.cfg
29-
- name: Test with pytest
33+
flake8 --config flake8.cfg src/
34+
35+
- name: Test with pytest
3036
run: |
3137
pytest tests
32-
- name: Build and publish
38+
39+
- name: Build and publish 🚀
3340
env:
34-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME_TEST }}
35-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD_TEST }}
41+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_PASSWORD_TEST }}
3642
run: |
37-
python setup.py sdist bdist_wheel
38-
twine upload --repository testpypi dist/*
43+
uv build
44+
uv publish --index testpypi

.github/workflows/push_dev.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,31 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: [ 3.12 ]
11+
python-version: [ 3.8, 3.13 ]
1212

1313
steps:
14-
- uses: actions/checkout@v2
15-
- name: Set up Python ${{ matrix.python-version }}
16-
uses: actions/setup-python@v2
14+
- name: Checkout 🛒
15+
uses: actions/checkout@v4
16+
17+
- name: Install uv 💜
18+
uses: astral-sh/setup-uv@v6
19+
20+
- name: Install ruff 🐶
21+
uses: astral-sh/ruff-action@v3
22+
23+
- name: Set up Python ${{ matrix.python-version }} 🐍
24+
uses: actions/setup-python@v4
1725
with:
1826
python-version: ${{ matrix.python-version }}
19-
- name: Install dependencies
27+
28+
- name: Install dependencies 📦
2029
run: |
21-
python -m pip install --upgrade pip
22-
pip install flake8 pytest
23-
pip install -r requirements.txt
24-
- name: Lint with flake8
30+
uv sync --all-groups --frozen
31+
32+
- name: Lint with flake8 ❄️
2533
run: |
26-
# stop the build if there are Python syntax errors or undefined names
27-
flake8 src/ --config=flake8.cfg
28-
- name: Test with pytest
34+
flake8 --config flake8.cfg src/
35+
36+
- name: Test with pytest
2937
run: |
30-
pytest tests
38+
pytest tests

LICENSE

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) 2021 Keboola
3+
Copyright (c) 2025 Keboola
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: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
[project]
2+
name = "keboola.http-client"
3+
version = "1.1.4"
4+
dependencies = [
5+
"aiolimiter>=1.2.1",
6+
"httpx>=0.28.1",
7+
"requests>=2.32.4",
8+
]
9+
requires-python = ">=3.8"
10+
11+
authors = [
12+
{ name = "Keboola KDS Team", email = "support@keboola.com" }
13+
]
14+
description = "General HTTP requests library for Python applications running in Keboola Connection environment"
15+
readme = "README.md"
16+
license = "MIT"
17+
license-files = [ "LICENSE" ]
18+
classifiers = [
19+
"Programming Language :: Python :: 3",
20+
"Programming Language :: Python :: 3.8",
21+
"Programming Language :: Python :: 3.9",
22+
"Programming Language :: Python :: 3.10",
23+
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3.12",
25+
"Programming Language :: Python :: 3.13",
26+
"Operating System :: OS Independent",
27+
"Intended Audience :: Developers",
28+
"Intended Audience :: Information Technology",
29+
"Intended Audience :: Education",
30+
"Topic :: Software Development :: Libraries",
31+
"Topic :: Software Development :: Libraries :: Python Modules",
32+
"Development Status :: 4 - Beta",
33+
]
34+
35+
[project.urls]
36+
Documentation = "https://htmlpreview.github.io/?https://raw.githubusercontent.com/keboola/python-http-client/main/docs/api-html/http_client/http.html"
37+
Repository = "https://github.com/keboola/python-http-client"
38+
39+
[dependency-groups]
40+
dev = [
41+
"flake8>=5.0.4",
42+
"pytest>=8.3.5",
43+
"ruff>=0.13.2",
44+
]
45+
46+
[[tool.uv.index]]
47+
name = "testpypi"
48+
url = "https://test.pypi.org/simple/"
49+
publish-url = "https://test.pypi.org/legacy/"
50+
explicit = true

requirements.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)