Skip to content

Commit 0f1a58c

Browse files
authored
Chore/move to uv (#24)
* Convert workflows from Poetry to uv * Update CHANGES.md and README.md * Bump version to 0.0.6
1 parent 5db67fd commit 0f1a58c

7 files changed

Lines changed: 1037 additions & 1541 deletions

File tree

.github/workflows/branch.yaml

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,58 @@ on: [push]
33

44
jobs:
55
test:
6+
name: Setup tests
7+
runs-on: ubuntu-latest
68
strategy:
79
fail-fast: false
810
matrix:
911
python-version: ['3.11', '3.12', '3.13']
10-
poetry-version: ['2.1.1']
11-
os: [ubuntu-latest]
12-
runs-on: ${{ matrix.os }}
12+
1313
steps:
1414
- uses: actions/checkout@v4
15-
- uses: actions/setup-python@v5
15+
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v5
1618
with:
1719
python-version: ${{ matrix.python-version }}
18-
- name: Run image
19-
uses: abatilo/actions-poetry@v2
20-
with:
21-
poetry-version: ${{ matrix.poetry-version }}
22-
- name: Install dependencies
23-
run: poetry install
20+
21+
- name: Install the project
22+
run: uv sync --all-extras --dev
23+
2424
- name: Run tests
25-
run: poetry run pytest --cov=./ --cov-report=xml
25+
run: uv run pytest --cov=./ --cov-report=xml
26+
2627
- name: Upload coverage to Codecov
2728
uses: codecov/codecov-action@v4
29+
2830
code-quality:
31+
runs-on: ubuntu-latest
2932
strategy:
3033
fail-fast: false
3134
matrix:
3235
python-version: ['3.11', '3.12', '3.13']
33-
poetry-version: ['2.1.1']
34-
os: [ubuntu-latest]
35-
runs-on: ${{ matrix.os }}
3636
steps:
3737
- uses: actions/checkout@v4
38-
- uses: actions/setup-python@v5
38+
39+
- name: Install uv
40+
uses: astral-sh/setup-uv@v5
3941
with:
4042
python-version: ${{ matrix.python-version }}
41-
- name: Run image
42-
uses: abatilo/actions-poetry@v2
43-
with:
44-
poetry-version: ${{ matrix.poetry-version }}
45-
- name: Install dependencies
46-
run: poetry install
43+
44+
- name: Install the project
45+
run: uv sync --all-extras --dev
46+
4747
- name: Run ruff
48-
run: poetry run ruff check .
48+
run: uv run ruff check .
49+
4950
- name: Run mypy
50-
run: poetry run mypy .
51+
run: uv run mypy .
52+
5153
- name: Run bandit
52-
run: poetry run bandit .
54+
run: uv run bandit .
55+
5356
- name: Run safety
54-
run: poetry run safety check
57+
run: uv run safety check
58+
5559
- name: Check for acceptable licenses
56-
run: poetry run pip-licenses --allow-only="MIT License;BSD License;Python Software Foundation License;Apache Software License;Mozilla Public License 2.0 (MPL 2.0);ISC License (ISCL);The Unlicense (Unlicense)"
60+
run: uv run pip-licenses --allow-only="MIT License;BSD License;Python Software Foundation License;Apache Software License;Mozilla Public License 2.0 (MPL 2.0);ISC License (ISCL);The Unlicense (Unlicense)"

.github/workflows/release.yaml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,22 @@ on:
66

77
jobs:
88
publish:
9+
runs-on: ubuntu-latest
910
strategy:
1011
fail-fast: false
1112
matrix:
1213
python-version: ['3.12']
13-
poetry-version: ['2.1.1']
14-
os: [ubuntu-latest]
15-
runs-on: ${{ matrix.os }}
1614
steps:
1715
- uses: actions/checkout@v4
18-
- uses: actions/setup-python@v5
16+
17+
- name: Install uv and set the python version
18+
uses: astral-sh/setup-uv@v5
1919
with:
2020
python-version: ${{ matrix.python-version }}
21-
- name: Run image
22-
uses: abatilo/actions-poetry@v2
23-
with:
24-
poetry-version: ${{ matrix.poetry-version }}
21+
2522
- name: Publish
2623
env:
2724
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
2825
run: |
29-
poetry config pypi-token.pypi $PYPI_TOKEN
30-
poetry publish --build
26+
uv build
27+
uv publish --token $PYPI_TOKEN

CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# NGI Python SGF Parser Package
22

3+
_2025-03-13_
4+
5+
Version 0.0.6
6+
7+
- Converting from Poetry to uv. No functional changes.
8+
39
_2025-03-10_
410

511
Version 0.0.5

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,25 @@ len(method.method_data)
5151
1. Software dependencies
5252

5353
- Python 3.11 or higher
54-
- Poetry 2
54+
- uv
5555
- ruff code formatter
5656

5757
2. Clone this repository
5858

5959
3. Install
6060

61-
`poetry install`
61+
`uv sync`
6262

6363

6464
# Build and Test
6565

6666
Run in the project root folder:
6767

68-
poetry shell pytest
68+
uv run pytest
6969

7070
Build the package wheel:
7171

72-
poetry build
72+
uv build
7373

7474
# Publish
7575

0 commit comments

Comments
 (0)