Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/docs-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ jobs:
with:
python-version: 3.9

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

- name: Install dependencies
run: |
Expand All @@ -58,7 +55,7 @@ jobs:
chmod a+x /usr/local/bin/protoc && \
rm -rf /tmp/protoc \

- name: Install poetry dependencies
- name: Install dependencies
run: uv sync

- name: Build docs
Expand Down
7 changes: 1 addition & 6 deletions docker/gl-testing/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,8 @@ RUN apt update && apt install -qqy curl python3 python3-pip python3-venv libpq-d
ENV PATH=/tmp/venv/bin:$PATH
RUN python3 -m venv /tmp/venv

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


ADD . /repo
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ The docs are hosted on https://blockstream.github.io/greenlight/

## Contributing to the documentation

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

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

```
poetry install --with-only docs
uv sync --only-group docs
```

To build the docs
Expand Down
15 changes: 9 additions & 6 deletions docs/src/tutorials/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ integrated rpc client that we can use to fund the `l2` node with
!!! tip "Tip: Use your IDEs autocompletion"
If you want to use the __autocompletion__ features of your IDE you
need to select the python interpreter form the environment set by
poetry in `libs/gl-testing`. You can then import the classes from
uv in `libs/gl-testing`. You can then import the classes from
the fixtures and annotate the fixtures with its types.
e.g.
``` { .python .no-copy }
Expand Down Expand Up @@ -661,17 +661,21 @@ the necessary dependencies for the
example.

```bash
poetry shell
uv venv
```

```bash
poetry install
source .venv/bin/activate
```

The first command drops us into a [`poetry`][poetry]-shell, the second
```bash
uv sync
```

The first command creates a virtual environment, the second activates it, and the third
installs the necessary dependencies from the `pyproject.toml` file.

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

```bash
Expand Down Expand Up @@ -724,6 +728,5 @@ trigger a shutdown.
[gl-testing-diff]: https://github.com/Blockstream/greenlight/tree/main/libs/gl-testing#differences-between-greenlight-and-gl-testing
[stickers]: https://store.blockstream.com/product/sticker-bundle/
[repl]: https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop
[poetry]: https://python-poetry.org
[grpc]: https://grpc.io/
[protoc]: https://grpc.io/docs/protoc-installation/
365 changes: 0 additions & 365 deletions examples/python/poetry.lock

This file was deleted.

6 changes: 3 additions & 3 deletions examples/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[tool.poetry]
[project]
name = "my-gl-example"
version = "0.1.0"
description = "An example application for greenlight that uses the gl-client library"
authors = []
license = "MIT"
requires-python = ">=3.7,<4"

[tool.poetry.dependencies]
[project.dependencies]
gl-client = {path = "../../libs/gl-client-py"}
pytest = "^7.1.2"
python = ">=3.7,<4"
6 changes: 3 additions & 3 deletions gitlab/build-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ build_gl_client_py:
- sed -i "s/^version = \".*\"/version = \"$NEW_VER\"/" libs/gl-client-py/Cargo.toml
- . $HOME/.cargo/env # sh doesn't have the correct PATH
script:
- poetry run maturin build -m libs/gl-client-py/Cargo.toml --release || sleep 3600
- poetry run maturin sdist -m libs/gl-client-py/Cargo.toml
- poetry run maturin upload --username __token__ --password ${PYPI_TOKEN} target/wheels/*
- uv run maturin build -m libs/gl-client-py/Cargo.toml --release || sleep 3600
- uv run maturin sdist -m libs/gl-client-py/Cargo.toml
- uv run maturin upload --username __token__ --password ${PYPI_TOKEN} target/wheels/*
- ls -lh target/wheels
artifacts:
expire_in: 2 weeks
Expand Down
2,891 changes: 0 additions & 2,891 deletions poetry.lock

This file was deleted.

Loading