Skip to content

Commit 4f4b1f4

Browse files
authored
Merge pull request #48 from tago-io/support_python12
Added support to Python 3.12
2 parents 122890e + 0771d00 commit 4f4b1f4

47 files changed

Lines changed: 1280 additions & 1597 deletions

Some content is hidden

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

.flake8

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,14 @@
11
[flake8]
2-
min_python_version = 3.7.0
2+
min_python_version = 3.11.0
33
max-line-length = 140
44
ban-relative-imports = true
5-
format-greedy = 1
6-
inline-quotes = double
7-
enable-extensions = TC, TC1
8-
suppress-none-returning = true
9-
type-checking-exempt-modules = typing, typing-extensions
10-
eradicate-whitelist-extend = ^-.*;
115
extend-ignore =
126
# E203: Whitespace before ':' (pycqa/pycodestyle#373)
137
E203,
14-
# SIM106: Handle error-cases first
15-
SIM106,
16-
# ANN101: Missing type annotation for self in method
17-
ANN101,
18-
# ANN102: Missing type annotation for cls in classmethod
19-
ANN102,
208
E722,
21-
BLK100,
22-
# BLK100: Missing type annotation for public function
239
per-file-ignores =
2410
# F401: Module imported by unused (non-implicit modules)
25-
# TC002: Move third-party import '...' into a type-checking block
26-
__init__.py:F401,TC002,
27-
# ANN201: Missing return type annotation for public function
28-
tests/test_*:ANN201
29-
tests/**/test_*:ANN201
11+
__init__.py:F401,
3012
extend-exclude =
3113
# Frozen and not subject to change in this repo:
3214
get-poetry.py,

.github/workflows/publish.yml

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,22 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v3
1717

18-
- name: Use Python ${{ env.pythonVersion }}
19-
uses: actions/setup-python@v3
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v4
2020
with:
21-
python-version: ${{ env.pythonVersion }}
22-
architecture: x64
21+
version: "latest"
2322

24-
- name: Install Poetry
25-
run: pip install --user poetry
23+
- name: Set up Python ${{ env.pythonVersion }}
24+
run: uv python install ${{ env.pythonVersion }}
2625

2726
- name: Install dependencies
28-
run: poetry install
27+
run: uv sync --dev
2928

3029
- name: Run Tests
31-
run: poetry run pytest tests/
30+
run: uv run pytest tests/
3231

3332
- name: Run Linter
34-
run: poetry run flake8 src/
33+
run: uv run flake8 src/
3534

3635
publish:
3736
name: "Deploy package to PyPI"
@@ -41,23 +40,24 @@ jobs:
4140
steps:
4241
- uses: actions/checkout@v3
4342

44-
- name: Use Python ${{ env.pythonVersion }}
45-
uses: actions/setup-python@v3
43+
- name: Install uv
44+
uses: astral-sh/setup-uv@v4
4645
with:
47-
python-version: ${{ env.pythonVersion }}
48-
architecture: x64
46+
version: "latest"
4947

50-
- name: Install Poetry
51-
run: pip install --user poetry
48+
- name: Set up Python ${{ env.pythonVersion }}
49+
run: uv python install ${{ env.pythonVersion }}
5250

5351
- name: Install dependencies
54-
run: poetry install
52+
run: uv sync --dev
53+
54+
- name: Build package
55+
run: uv build
5556

5657
- name: Publish to PyPI
5758
env:
58-
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
59-
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
60-
run: poetry publish --build --username $PYPI_USERNAME --password $PYPI_PASSWORD
59+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
60+
run: uv publish --token $PYPI_TOKEN
6161

6262
docs:
6363
name: "Deploy Docs"
@@ -69,17 +69,16 @@ jobs:
6969
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
7070
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
7171

72-
- name: Use Python ${{ env.pythonVersion }}
73-
uses: actions/setup-python@v3
72+
- name: Install uv
73+
uses: astral-sh/setup-uv@v4
7474
with:
75-
python-version: ${{ env.pythonVersion }}
76-
architecture: x64
75+
version: "latest"
7776

78-
- name: Install Poetry
79-
run: pip install --user poetry
77+
- name: Set up Python ${{ env.pythonVersion }}
78+
run: uv python install ${{ env.pythonVersion }}
8079

8180
- name: Install dependencies
82-
run: poetry install
81+
run: uv sync --dev
8382

8483
- name: Create local changes
8584
run: |

.github/workflows/tests.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
11
name: Units Tests
22

3-
env:
4-
pythonVersion: "3.11"
5-
63
on: push
74

85
jobs:
96
build:
107
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: ["3.11", "3.12", "3.13"]
1111

1212
steps:
1313
- uses: actions/checkout@v3
1414

15-
- name: Use Python ${{ env.pythonVersion }}
16-
uses: actions/setup-python@v3
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v4
1717
with:
18-
python-version: ${{ env.pythonVersion }}
19-
architecture: x64
18+
version: "latest"
2019

21-
- name: Install Poetry
22-
run: pip install --user poetry
20+
- name: Set up Python ${{ matrix.python-version }}
21+
run: uv python install ${{ matrix.python-version }}
2322

2423
- name: Install dependencies
25-
run: poetry install
24+
run: uv sync --extra dev
2625

2726
- name: Run Tests
28-
run: poetry run pytest tests/
27+
run: uv run pytest tests/
2928

3029
- name: Run Linter
31-
run: poetry run flake8 src/
30+
run: uv run ruff check src

0 commit comments

Comments
 (0)