From 0371f28685f6eb07ca72ae27747f56f59927828d Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Wed, 14 Aug 2024 15:57:41 +0200 Subject: [PATCH 1/3] feat: upgrade to our latest version of pytezos --- pyproject.toml | 2 +- tests/unit/test_chain_tezos.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ca59ef79..3fd02d17 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,7 +80,7 @@ optional-dependencies.substrate = [ "substrate-interface", ] optional-dependencies.tezos = [ - "aleph-pytezos==0.1.1", + "aleph-pytezos==3.13.4", "pynacl", ] urls.Documentation = "https://aleph.im/" diff --git a/tests/unit/test_chain_tezos.py b/tests/unit/test_chain_tezos.py index 0beaffc9..96e52ca3 100644 --- a/tests/unit/test_chain_tezos.py +++ b/tests/unit/test_chain_tezos.py @@ -31,7 +31,7 @@ async def test_tezos_account(tezos_account: TezosAccount): message = Message("TEZOS", tezos_account.get_address(), "SomeType", "ItemHash") signed = await tezos_account.sign_message(asdict(message)) assert signed["signature"] - assert len(signed["signature"]) == 188 + assert len(signed["signature"]) == 187 address = tezos_account.get_address() assert address is not None @@ -40,7 +40,7 @@ async def test_tezos_account(tezos_account: TezosAccount): pubkey = tezos_account.get_public_key() assert isinstance(pubkey, str) - assert len(pubkey) == 55 + assert len(pubkey) == 54 @pytest.mark.asyncio From adbd8d2ecf6c13dfba606b4d254606ce74253a04 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Wed, 14 Aug 2024 16:50:04 +0200 Subject: [PATCH 2/3] ci: use python 3.12 as the reference version for tests --- .github/workflows/build-wheels.yml | 5 ++--- .github/workflows/pytest.yml | 10 +++------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 61074b57..97d03fc1 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -27,7 +27,7 @@ jobs: if: startsWith(matrix.os, 'macos') uses: actions/setup-python@v2 with: - python-version: 3.11 + python-version: 3.12 - name: Cache dependencies uses: actions/cache@v4 @@ -64,9 +64,8 @@ jobs: run: | /tmp/venv/bin/python3 -m pip install dist/aleph_sdk_python-*.whl - - name: Install `setuptools` on systems where it is missing by default + - name: Install/upgrade `setuptools` run: /tmp/venv/bin/python3 -m pip install --upgrade setuptools - if: matrix.os == 'ubuntu-24.04' - name: Import and use the package run: | diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index b4fecc57..18322137 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -16,10 +16,9 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.9", "3.10", "3.11" ] - # An issue with secp256k1 prevents Python 3.12 from working - # See https://github.com/baking-bad/pytezos/issues/370 - runs-on: ubuntu-latest + python-version: [ "3.9", "3.10", "3.11", "3.12" ] + os: [ubuntu-22.04, ubuntu-24.04] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -37,13 +36,10 @@ jobs: /tmp/venv/bin/pip freeze /tmp/venv/bin/hatch run testing:pip freeze /tmp/venv/bin/hatch run testing:test - if: matrix.python-version != '3.11' - run: /tmp/venv/bin/hatch run testing:cov - if: matrix.python-version == '3.11' - uses: codecov/codecov-action@v4.0.1 - if: matrix.python-version == '3.11' with: token: ${{ secrets.CODECOV_TOKEN }} slug: aleph-im/aleph-sdk-python From 20dfd56e485a3c68ba36710e6c4e97a6158cd52b Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Thu, 24 Oct 2024 22:03:11 +0200 Subject: [PATCH 3/3] feat: run pytest on ubuntu 22.04 and 24.04 --- .github/workflows/pytest.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 18322137..f1af47c5 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -26,7 +26,9 @@ jobs: with: python-version: ${{ matrix.python-version }} - - run: sudo apt-get install -y python3-pip libsecp256k1-dev + - run: | + sudo apt-get update + sudo apt-get install -y python3-pip libsodium-dev - run: | python3 -m venv /tmp/venv