Skip to content

Commit 6835a79

Browse files
kwsantiagocdecker
authored andcommitted
Switch to uv for pipelines
1 parent 5380807 commit 6835a79

File tree

8 files changed

+19
-3280
lines changed

8 files changed

+19
-3280
lines changed

.github/workflows/docs-action.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ jobs:
4444
with:
4545
python-version: 3.9
4646

47-
- name: Install poetry
48-
run: |
49-
curl -sSL https://install.python-poetry.org | python3 -
5047

5148
- name: Install dependencies
5249
run: |
@@ -58,7 +55,7 @@ jobs:
5855
chmod a+x /usr/local/bin/protoc && \
5956
rm -rf /tmp/protoc \
6057
61-
- name: Install poetry dependencies
58+
- name: Install dependencies
6259
run: uv sync
6360

6461
- name: Build docs

docker/gl-testing/Dockerfile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,8 @@ RUN apt update && apt install -qqy curl python3 python3-pip python3-venv libpq-d
4040
ENV PATH=/tmp/venv/bin:$PATH
4141
RUN python3 -m venv /tmp/venv
4242

43-
# We use the official poetry installer
44-
# This ensures poetry is always up-to-date.
45-
# This approach also ensures `poetry` and our environment don't overlap
46-
ENV POETRY_HOME=/tmp/poetry
47-
RUN curl -sSL https://install.python-poetry.org | python3 - --version 1.8.2
4843
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
49-
ENV PATH=$POETRY_HOME/bin:$HOME/.local/bin:$PATH
44+
ENV PATH=$HOME/.local/bin:$PATH
5045

5146

5247
ADD . /repo

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ The docs are hosted on https://blockstream.github.io/greenlight/
44

55
## Contributing to the documentation
66

7-
You must have a working installation of `python` and `poetry` to contribute to the docs.
7+
You must have a working installation of `python` and `uv` to contribute to the docs.
88

99
To install dependencies make sure you are at the root of the repository
1010

1111
```
12-
poetry install --with-only docs
12+
uv sync --only-group docs
1313
```
1414

1515
To build the docs

docs/src/tutorials/testing.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ integrated rpc client that we can use to fund the `l2` node with
228228
!!! tip "Tip: Use your IDEs autocompletion"
229229
If you want to use the __autocompletion__ features of your IDE you
230230
need to select the python interpreter form the environment set by
231-
poetry in `libs/gl-testing`. You can then import the classes from
231+
uv in `libs/gl-testing`. You can then import the classes from
232232
the fixtures and annotate the fixtures with its types.
233233
e.g.
234234
``` { .python .no-copy }
@@ -661,17 +661,21 @@ the necessary dependencies for the
661661
example.
662662

663663
```bash
664-
poetry shell
664+
uv venv
665665
```
666666

667667
```bash
668-
poetry install
668+
source .venv/bin/activate
669669
```
670670

671-
The first command drops us into a [`poetry`][poetry]-shell, the second
671+
```bash
672+
uv sync
673+
```
674+
675+
The first command creates a virtual environment, the second activates it, and the third
672676
installs the necessary dependencies from the `pyproject.toml` file.
673677

674-
With the REPL setup in the docker-shell and from the poetry-shell on
678+
With the REPL setup in the docker-shell and from the virtual environment on
675679
the host we can now run our test application.
676680

677681
```bash
@@ -724,6 +728,5 @@ trigger a shutdown.
724728
[gl-testing-diff]: https://github.com/Blockstream/greenlight/tree/main/libs/gl-testing#differences-between-greenlight-and-gl-testing
725729
[stickers]: https://store.blockstream.com/product/sticker-bundle/
726730
[repl]: https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop
727-
[poetry]: https://python-poetry.org
728731
[grpc]: https://grpc.io/
729732
[protoc]: https://grpc.io/docs/protoc-installation/

examples/python/poetry.lock

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

examples/python/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
[tool.poetry]
1+
[project]
22
name = "my-gl-example"
33
version = "0.1.0"
44
description = "An example application for greenlight that uses the gl-client library"
55
authors = []
66
license = "MIT"
7+
requires-python = ">=3.7,<4"
78

8-
[tool.poetry.dependencies]
9+
[project.dependencies]
910
gl-client = {path = "../../libs/gl-client-py"}
1011
pytest = "^7.1.2"
11-
python = ">=3.7,<4"

gitlab/build-pypi.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ build_gl_client_py:
99
- sed -i "s/^version = \".*\"/version = \"$NEW_VER\"/" libs/gl-client-py/Cargo.toml
1010
- . $HOME/.cargo/env # sh doesn't have the correct PATH
1111
script:
12-
- poetry run maturin build -m libs/gl-client-py/Cargo.toml --release || sleep 3600
13-
- poetry run maturin sdist -m libs/gl-client-py/Cargo.toml
14-
- poetry run maturin upload --username __token__ --password ${PYPI_TOKEN} target/wheels/*
12+
- uv run maturin build -m libs/gl-client-py/Cargo.toml --release || sleep 3600
13+
- uv run maturin sdist -m libs/gl-client-py/Cargo.toml
14+
- uv run maturin upload --username __token__ --password ${PYPI_TOKEN} target/wheels/*
1515
- ls -lh target/wheels
1616
artifacts:
1717
expire_in: 2 weeks

poetry.lock

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

0 commit comments

Comments
 (0)