From b0b4bad0a2c2a7bfb4dd4240787378322036f18b Mon Sep 17 00:00:00 2001 From: Altynbek Orumbayev Date: Tue, 16 Dec 2025 18:21:07 +0100 Subject: [PATCH 1/2] ci: add alpha release pipeline --- .github/workflows/cd.yaml | 17 +++++++++++++++++ pyproject.toml | 23 +++++++++++++++++++---- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 8dbc6caf..a84821eb 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -4,6 +4,7 @@ on: push: branches: - main + - alpha paths-ignore: - "docs/**" - ".github/**" @@ -68,6 +69,22 @@ jobs: - name: Set Git user as GitHub actions run: git config --global user.email "179917785+engineering-ci[bot]@users.noreply.github.com" && git config --global user.name "engineering-ci[bot]" + - name: Create Continuous Deployment - Alpha + if: steps.get_branch.outputs.branch == 'alpha' + run: | + uv run semantic-release \ + -v DEBUG \ + --prerelease \ + --define=prerelease_tag=alpha \ + --define=branch=alpha \ + --define=upload_to_repository=true \ + publish + gh release edit --prerelease "v$(uv run semantic-release print-version --current)" + env: + GH_TOKEN: ${{ steps.app_token.outputs.token }} + REPOSITORY_USERNAME: __token__ + REPOSITORY_PASSWORD: ${{ secrets.PYPI_API_KEY }} + - name: Create Continuous Deployment - Beta (non-prod) if: steps.get_branch.outputs.branch == 'main' && !inputs.production_release run: | diff --git a/pyproject.toml b/pyproject.toml index 8332db1d..9ff01516 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -260,6 +260,21 @@ sequence = [ "generate-kmd-client", ] +[tool.poe.tasks.release-preview] +sequence = [ + { cmd = "semantic-release print-version --current" }, + { cmd = "semantic-release print-version --prerelease" }, +] +help = "Preview current and next prerelease version" + +[tool.poe.tasks.release-dry-run-alpha] +shell = "semantic-release -v DEBUG --noop --prerelease --define=prerelease_tag=alpha publish" +help = "Dry-run alpha release (no changes made)" + +[tool.poe.tasks.release-dry-run-beta] +shell = "semantic-release -v DEBUG --noop --prerelease --define=prerelease_tag=beta publish" +help = "Dry-run beta release (no changes made)" + [tool.pytest.ini_options] pythonpath = ["src"] testpaths = ["tests"] @@ -308,6 +323,10 @@ disallow_untyped_calls = false module = ["tests.transactions.test_transaction_composer"] disable_error_code = ["call-overload", "union-attr"] +[[tool.mypy.overrides]] +module = ["msgpack", "msgpack.*"] +ignore_missing_imports = true + [tool.semantic_release] version_toml = "pyproject.toml:project.version" remove_dist = false @@ -318,7 +337,3 @@ upload_to_repository = false tag_commit = true branch = "main" commit_message = "{version}\n\nskip-checks: true" - -[[tool.mypy.overrides]] -module = ["msgpack", "msgpack.*"] -ignore_missing_imports = true From 1592342d1a7b71928b7c09d21db93a231d295b63 Mon Sep 17 00:00:00 2001 From: Altynbek Orumbayev Date: Tue, 16 Dec 2025 18:42:17 +0100 Subject: [PATCH 2/2] fix(ci): remove redundant gh release edit from prerelease steps --- .github/workflows/cd.yaml | 2 - .../autoapi/algokit_utils/algosdk/index.md | 5 +++ src/algokit_utils/clients/__init__.py | 43 ++++++++++++++++++- src/algokit_utils/common.py | 40 +++++++++++++++++ 4 files changed, 86 insertions(+), 4 deletions(-) create mode 100644 docs/markdown/autoapi/algokit_utils/algosdk/index.md create mode 100644 src/algokit_utils/common.py diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index a84821eb..d0071886 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -79,7 +79,6 @@ jobs: --define=branch=alpha \ --define=upload_to_repository=true \ publish - gh release edit --prerelease "v$(uv run semantic-release print-version --current)" env: GH_TOKEN: ${{ steps.app_token.outputs.token }} REPOSITORY_USERNAME: __token__ @@ -94,7 +93,6 @@ jobs: --define=branch=main \ --define=upload_to_repository=true \ publish - gh release edit --prerelease "v$(uv run semantic-release print-version --current)" env: GH_TOKEN: ${{ steps.app_token.outputs.token }} REPOSITORY_USERNAME: __token__ diff --git a/docs/markdown/autoapi/algokit_utils/algosdk/index.md b/docs/markdown/autoapi/algokit_utils/algosdk/index.md new file mode 100644 index 00000000..f39996d4 --- /dev/null +++ b/docs/markdown/autoapi/algokit_utils/algosdk/index.md @@ -0,0 +1,5 @@ +# algokit_utils.algosdk + +Algorand SDK compatibility types - user-facing facade for algokit_algosdk. + +Users should import from this module instead of algokit_algosdk directly. diff --git a/src/algokit_utils/clients/__init__.py b/src/algokit_utils/clients/__init__.py index 1a48b824..e8916665 100644 --- a/src/algokit_utils/clients/__init__.py +++ b/src/algokit_utils/clients/__init__.py @@ -1,2 +1,41 @@ -from algokit_utils.clients.client_manager import * # noqa: F403 -from algokit_utils.clients.dispenser_api_client import * # noqa: F403 +from algokit_algod_client import AlgodClient +from algokit_algod_client import models as algod_models +from algokit_algod_client.exceptions import UnexpectedStatusError +from algokit_indexer_client import IndexerClient +from algokit_kmd_client import KmdClient +from algokit_utils.clients.client_manager import ( + AlgoSdkClients, + ClientManager, + NetworkDetail, +) +from algokit_utils.clients.dispenser_api_client import ( + DISPENSER_ACCESS_TOKEN_KEY, + DISPENSER_ASSETS, + DISPENSER_REQUEST_TIMEOUT, + DispenserApiConfig, + DispenserAsset, + DispenserAssetName, + DispenserFundResponse, + DispenserLimitResponse, + TestNetDispenserApiClient, +) + +__all__ = [ + "DISPENSER_ACCESS_TOKEN_KEY", + "DISPENSER_ASSETS", + "DISPENSER_REQUEST_TIMEOUT", + "AlgoSdkClients", + "AlgodClient", + "ClientManager", + "DispenserApiConfig", + "DispenserAsset", + "DispenserAssetName", + "DispenserFundResponse", + "DispenserLimitResponse", + "IndexerClient", + "KmdClient", + "NetworkDetail", + "TestNetDispenserApiClient", + "UnexpectedStatusError", + "algod_models", +] diff --git a/src/algokit_utils/common.py b/src/algokit_utils/common.py new file mode 100644 index 00000000..e0986138 --- /dev/null +++ b/src/algokit_utils/common.py @@ -0,0 +1,40 @@ +"""Common utilities - user-facing facade for algokit_common. + +Users should import from this module instead of algokit_common directly. +""" + +from algokit_common import ( + ADDRESS_LENGTH, + CHECKSUM_BYTE_LENGTH, + HASH_BYTES_LENGTH, + MAX_TRANSACTION_GROUP_SIZE, + MICROALGOS_TO_ALGOS_RATIO, + MIN_TXN_FEE, + PUBLIC_KEY_BYTE_LENGTH, + SIGNATURE_BYTE_LENGTH, + TRANSACTION_ID_LENGTH, + ZERO_ADDRESS, + ProgramSourceMap, + address_from_public_key, + get_application_address, + public_key_from_address, + sha512_256, +) + +__all__ = [ + "ADDRESS_LENGTH", + "CHECKSUM_BYTE_LENGTH", + "HASH_BYTES_LENGTH", + "MAX_TRANSACTION_GROUP_SIZE", + "MICROALGOS_TO_ALGOS_RATIO", + "MIN_TXN_FEE", + "PUBLIC_KEY_BYTE_LENGTH", + "SIGNATURE_BYTE_LENGTH", + "TRANSACTION_ID_LENGTH", + "ZERO_ADDRESS", + "ProgramSourceMap", + "address_from_public_key", + "get_application_address", + "public_key_from_address", + "sha512_256", +]