Skip to content

Commit 74ce4f4

Browse files
committed
Migrate from Poetry to uv for dependency management and update related configurations
1 parent 3c63cdf commit 74ce4f4

7 files changed

Lines changed: 1588 additions & 1624 deletions

File tree

.github/workflows/branch.yaml

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

44
jobs:
55
test:
6+
name: Setup tests
7+
runs-on: ubuntu-latest
68
strategy:
79
fail-fast: false
810
matrix:
9-
python-version: ['3.10', '3.11', '3.12']
10-
poetry-version: ['1.8.3']
11-
os: [ubuntu-latest]
12-
runs-on: ${{ matrix.os }}
11+
python-version: ['3.10', '3.11', '3.12', '3.13']
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 project
22+
run: uv sync --all-extras --dev
23+
2424
- name: Run tests
25-
run: poetry run pytest --cov=./ --cov-report=xml
26-
# - name: Upload coverage to Codecov
27-
# uses: codecov/codecov-action@v4
25+
run: uv run pytest --cov=./ --cov-report=xml
26+
27+
- name: Upload coverage to Codecov
28+
uses: codecov/codecov-action@v4
29+
30+
2831
code-quality:
32+
runs-on: ubuntu-latest
2933
strategy:
3034
fail-fast: false
3135
matrix:
32-
python-version: ['3.10', '3.11', '3.12']
33-
poetry-version: ['1.8.3']
34-
os: [ubuntu-latest]
35-
runs-on: ${{ matrix.os }}
36+
python-version: ['3.10', '3.11', '3.12', '3.13']
37+
3638
steps:
3739
- uses: actions/checkout@v4
38-
- uses: actions/setup-python@v5
40+
41+
- name: Install uv
42+
uses: astral-sh/setup-uv@v5
3943
with:
4044
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
45+
46+
- name: Install the project
47+
run: uv sync --all-extras --dev
48+
4749
- name: Run ruff
48-
run: poetry run ruff check .
50+
run: uv run ruff check .
51+
4952
- name: Run mypy
50-
run: poetry run mypy .
53+
run: uv run mypy .
54+
5155
- name: Run bandit
52-
run: poetry run bandit .
56+
run: uv run bandit .
57+
5358
- name: Run safety
54-
run: poetry run safety check -i 70612
59+
run: uv run safety check
60+
5561
- 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);The Unlicense (Unlicense);ISC License (ISCL)"
62+
run: uv run pip-licenses --partial-match --allow-only="Apache;BSD;ISCL;MIT;MPL;Unlicense;PSF-2.0"

.github/workflows/release.yaml

Lines changed: 8 additions & 11 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:
12-
python-version: ['3.12']
13-
poetry-version: ['1.8.3']
14-
os: [ubuntu-latest]
15-
runs-on: ${{ matrix.os }}
13+
python-version: ['3.13']
1614
steps:
1715
- uses: actions/checkout@v4
18-
- uses: actions/setup-python@v5
16+
17+
- name: Install uv
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: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
# NGI Python Coordinate Projector Package
22

33

4+
5+
6+
## Version 0.0.12
7+
_2025-05-21_
8+
9+
Internal
10+
11+
- Move from Poetry to uv.
12+
- Update packages.
13+
14+
415
_2024-08-13_
516

617
Version 0.0.11
@@ -30,7 +41,7 @@ Version 0.0.8
3041
- Change valid Python versions to ">=3.9,<4".
3142
- Update packages.
3243

33-
- _2023-03-03_
44+
_2023-03-03_
3445

3546
Version 0.0.7
3647

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,30 +47,34 @@ print(f"{projected_east=}, {projected_north=}")
4747

4848
1. Software dependencies
4949

50-
- Python 3.9 or higher
51-
- Poetry
50+
- Python 3.10 or higher
51+
- uv
5252
- Ruff code formatter
5353

5454
2. Clone this repository
5555

5656
3. Install
5757

58-
`poetry install`
58+
`uv install`
5959

6060

6161

6262
# Build and Test
6363

6464
Run in the project root folder:
6565

66-
poetry shell pytest
66+
uv run pytest
6767

6868
Build the package wheel:
6969

70-
poetry build
70+
uv build
7171

7272
# Publish
7373

74+
Publish the package to PyPi:
75+
76+
uv publish --token ${PYPI_TOKEN}
77+
7478
# TODOs
7579

7680
- Handle lines

0 commit comments

Comments
 (0)