Skip to content

Commit 5136365

Browse files
Merge pull request #10 from ricardogsilva/8-switch-from-poetry-to-uv
switched to uv
2 parents cf69ebe + 44a2bcb commit 5136365

File tree

10 files changed

+3273
-3806
lines changed

10 files changed

+3273
-3806
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,27 @@
2020
# - name: Checkout code
2121
# uses: actions/checkout@v3
2222
#
23-
# - name: Install poetry
24-
# run: pipx install poetry==1.3.1
23+
# - name: Install uv
24+
# uses: astral-sh/setup-uv@v5
2525
#
26-
# - name: setup Python cache
27-
# uses: actions/setup-python@v4
28-
# with:
29-
# python-version: '3.10'
30-
# cache: poetry
26+
# - name: Set up Python
27+
# run: uv python install 3.10
3128
#
3229
# - name: Install package
33-
# run: poetry install --with dev --with docs
30+
# run: uv sync --all-groups
3431
#
3532
# - name: run pre-commit
36-
# run: poetry run pre-commit run --all-files
33+
# run: uv run pre-commit run --all-files
3734
#
3835
## - name: Run tests
39-
## run: poetry run pytest --suppress-no-test-exit-code
36+
## run: uv run pytest --suppress-no-test-exit-code
4037
#
4138
## - name: Setup Pages
4239
## id: pages
4340
## uses: actions/configure-pages@v3
4441
#
4542
# - name: (Re)build docs
46-
# run: poetry run mkdocs build
43+
# run: uv run mkdocs build
4744
#
4845
# - name: Upload artifact
4946
# uses: actions/upload-pages-artifact@v1.0.8

.github/workflows/docs.yml

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,17 @@ jobs:
1616
- name: Checkout code
1717
uses: actions/checkout@v3
1818

19-
# - name: Install poetry
20-
# run: pipx install poetry==1.3.1
19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v5
2121

22-
# - name: setup Python cache
23-
# uses: actions/setup-python@v4
24-
# with:
25-
# python-version: '3.10'
26-
# cache: poetry
22+
- name: Set up Python
23+
run: uv python install 3.10
2724

28-
- name: setup Python cache
29-
uses: actions/setup-python@v4
30-
with:
31-
python-version: '3.10'
32-
cache: pip
33-
#
34-
# - name: Install requirements
35-
# run: poetry install --only docs
36-
37-
- name: Install requirements
38-
run: pip install mkdocs mkdocs-material
39-
40-
# - name: (Re)build docs
41-
# run: poetry run mkdocs build
25+
- name: Install docs dependencies
26+
run: uv sync --group docs
4227

4328
- name: (Re)build docs
44-
run: mkdocs build
29+
run: uv run mkdocs build
4530

4631
- name: Upload artifact
4732
uses: actions/upload-pages-artifact@v1.0.8

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ repos:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
99
- id: check-added-large-files
10+
args: ["--maxkb=1000"]
1011
- repo: https://github.com/charliermarsh/ruff-pre-commit
1112
rev: v0.0.263
1213
hooks:

CLAUDE.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,36 @@ pygeoapi-prefect is a process/job manager for PyGeoAPI that uses Prefect for wor
1010

1111
```bash
1212
# Install with dev dependencies
13-
poetry install --with dev
13+
uv sync --group dev
1414

1515
# Run pre-commit checks (ruff, black, mypy)
16-
poetry run pre-commit run --all-files
16+
uv run pre-commit run --all-files
1717

1818
# Run tests
19-
poetry run pytest tests/
19+
uv run pytest tests/
2020

2121
# Build documentation
22-
poetry run mkdocs build
22+
uv run mkdocs build
2323
```
2424

2525
## Running Locally
2626

2727
```bash
2828
# Start Prefect server (terminal 1)
29-
poetry run prefect server start
29+
uv run prefect server start
3030

3131
# Configure and start agent (terminal 2)
32-
poetry run prefect config set PREFECT_API_URL=http://127.0.0.1:4200/api
33-
poetry run prefect agent start --work-queue pygeoapi
32+
uv run prefect config set PREFECT_API_URL=http://127.0.0.1:4200/api
33+
uv run prefect agent start --work-queue pygeoapi
3434

3535
# Start PyGeoAPI (terminal 3)
36-
PYGEOAPI_CONFIG=example-config.yml PYGEOAPI_OPENAPI=example-openapi.yml poetry run pygeoapi serve
36+
PYGEOAPI_CONFIG=example-config.yml PYGEOAPI_OPENAPI=example-openapi.yml uv run pygeoapi serve
3737

3838
# Deploy a process flow
39-
poetry run pygeoapi-prefect deploy-process hi-prefect-world --pygeoapi-config example-config.yml
39+
uv run pygeoapi-prefect deploy-process hi-prefect-world --pygeoapi-config example-config.yml
4040

4141
# Regenerate OpenAPI spec after config changes
42-
poetry run pygeoapi openapi generate example-config.yml > example-openapi.yml
42+
uv run pygeoapi openapi generate example-config.yml > example-openapi.yml
4343
```
4444

4545
## Architecture
@@ -76,7 +76,7 @@ def process_flow(
7676

7777
- Uses Pydantic v1.x (1.10.7)
7878
- Click pinned to 8.0.0 for pygeoapi compatibility
79-
- Requires local pygeoapi installation (path-based dependency in pyproject.toml)
79+
- Requires local pygeoapi installation (path dependency configured in `[tool.uv.sources]`)
8080
- Uses anyio for async Prefect API communication
8181

8282
## Configuration

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ A process manager for [pygeoapi] that uses [prefect].
1010
## Installation
1111

1212
In time, this project will be available in the python package index (AKA pypi) and be installable via pip, but for
13-
now you can install it by git cloning and then using poetry to install
13+
now you can install it by git cloning and then using uv to install

docs/development.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
11
# Development
22

3-
Install this project with poetry
3+
Install this project with uv
44

55
```shell
66
git clone
7-
poetry install --with dev
7+
uv sync --group dev
88
```
99

1010
Start the prefect server:
1111

1212
```shell
13-
poetry run prefect server start
13+
uv run prefect server start
1414
```
1515

1616
Update the prefect config, as directed by the prefect server:
1717

1818
```shell
19-
poetry run prefect config set PREFECT_API_URL=http://127.0.0.1:4200/api
19+
uv run prefect config set PREFECT_API_URL=http://127.0.0.1:4200/api
2020
```
2121

2222
If you want to deploy a pygeoapi process locally with prefect, then also start a prefect agent:
2323

2424
```shell
25-
poetry run prefect agent start --work-queue pygeoapi
25+
uv run prefect agent start --work-queue pygeoapi
2626
```
2727

2828
Now stand up pygeoapi with the provided config files:
2929

3030
```shell
31-
PYGEOAPI_CONFIG=example-config.yml PYGEOAPI_OPENAPI=example-openapi.yml poetry run pygeoapi serve
31+
PYGEOAPI_CONFIG=example-config.yml PYGEOAPI_OPENAPI=example-openapi.yml uv run pygeoapi serve
3232
```
3333

3434
If you need to regenerate the openapi description file, run:
3535

3636
```shell
37-
poetry run pygeoapi openapi generate example-config.yml > example-openapi.yml
37+
uv run pygeoapi openapi generate example-config.yml > example-openapi.yml
3838
```
3939

4040
Deploy the `hi-prefect-world` process:
4141

4242
```shell
43-
poetry run pygeoapi-prefect deploy-as-prefect-flow hi-prefect-world
43+
uv run pygeoapi-prefect deploy-as-prefect-flow hi-prefect-world
4444
```
4545

4646
- Run a deployed process with prefect
4747

4848
```shell
49-
poetry run prefect deployment run --param
49+
uv run prefect deployment run --param
5050
```
5151

5252

docs/user-guide/installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Installation
22

33
In time, this project will be available in the python package index (AKA pypi) and be installable via pip, but for
4-
now you can install it by git cloning and then using poetry to install
4+
now you can install it by git cloning and then using uv to install
55

66
```shell
77
git clone https://github.com/geobeyond/pygeoapi-prefect.git
88
cd pygeoapi-prefect
9-
poetry install
9+
uv sync
1010
```
1111

1212
Check the [Development](development.md) section for a more developer oriented

0 commit comments

Comments
 (0)