From 03f0816a92a5b7164d700c7a142291381be7c387 Mon Sep 17 00:00:00 2001 From: Hoang Dinh Date: Tue, 26 Mar 2024 00:15:17 +1000 Subject: [PATCH] feat: Add puyapy compile integration (#457) * feat: enable puya integration * chore: doc * chore: refactor compile command and enhance the docs * docs: wording tweaks to the compile docs * chore: change install to run, as I think it is the behaviour we want * chore: fix snapshots * fix: resolve issue running on windows * chore: add info about PuyaPy Python version and matching behaviour. * chore: fix snapshots * chore: wording tweaks * chore: allowing running puya with no color * docs: adjust compile command terminology --------- Co-authored-by: Neil Campbell --- README.md | 4 +- docs/cli/index.md | 132 ++++++++++++------ docs/features/compile.md | 98 +++++++++++++ src/algokit/cli/compile.py | 63 +++------ src/algokit/cli/compilers/__init__.py | 0 src/algokit/cli/compilers/python.py | 58 ++++++++ .../core/{compile => compilers}/python.py | 48 +++---- ...apy_is_not_installed_anywhere.approved.txt | 10 +- ...yapy_version_is_not_installed.approved.txt | 8 +- tests/test_root.test_help.approved.txt | 3 + 10 files changed, 303 insertions(+), 121 deletions(-) create mode 100644 docs/features/compile.md create mode 100644 src/algokit/cli/compilers/__init__.py create mode 100644 src/algokit/cli/compilers/python.py rename src/algokit/core/{compile => compilers}/python.py (61%) diff --git a/README.md b/README.md index 92496581..bc02a210 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ This is an open source project managed by the Algorand Foundation. See the [cont ## Prerequisites -The key required dependency is Python 3.10+, but some of the installation options below will install that for you. +The key required dependency is Python 3.10+, but some of the installation options below will install that for you. We recommend using Python 3.12+, as the `algokit compile python` command requires this version. AlgoKit also has some runtime dependencies that also need to be available for particular commands. @@ -126,10 +126,12 @@ AlgoKit can be installed using OS specific package managers, or using the python > **App Installer python.exe** or **App Installer python3.exe**. 3. Install pipx: + ``` pip install --user pipx python -m pipx ensurepath ``` + 4. Restart the terminal to ensure pipx is available on the path 5. Install AlgoKit via pipx: `pipx install algokit` 6. Restart the terminal to ensure AlgoKit is available on the path diff --git a/docs/cli/index.md b/docs/cli/index.md index 288da442..2b038002 100644 --- a/docs/cli/index.md +++ b/docs/cli/index.md @@ -18,64 +18,73 @@ - [--interactive, --non-interactive, --ci](#--interactive---non-interactive---ci-1) - [npm](#npm) - [poetry](#poetry) + - [compile](#compile) + - [Options](#options-4) + - [-v, --version ](#-v---version-) + - [py](#py) + - [Arguments](#arguments) + - [PUYAPY_ARGS](#puyapy_args) + - [python](#python) + - [Arguments](#arguments-1) + - [PUYAPY_ARGS](#puyapy_args-1) - [completions](#completions) - [install](#install) - - [Options](#options-4) + - [Options](#options-5) - [--shell ](#--shell-) - [uninstall](#uninstall) - - [Options](#options-5) + - [Options](#options-6) - [--shell ](#--shell--1) - [config](#config) - [version-prompt](#version-prompt) - - [Arguments](#arguments) + - [Arguments](#arguments-2) - [ENABLE](#enable) - [deploy](#deploy) - - [Options](#options-6) + - [Options](#options-7) - [-C, --command ](#-c---command-) - [--interactive, --non-interactive, --ci](#--interactive---non-interactive---ci-2) - [-P, --path ](#-p---path-) - [--deployer ](#--deployer-) - [--dispenser ](#--dispenser-) - - [Arguments](#arguments-1) + - [Arguments](#arguments-3) - [ENVIRONMENT_NAME](#environment_name) - [dispenser](#dispenser) - [fund](#fund) - - [Options](#options-7) + - [Options](#options-8) - [-r, --receiver ](#-r---receiver-) - [-a, --amount ](#-a---amount-) - [--whole-units](#--whole-units) - [limit](#limit) - - [Options](#options-8) + - [Options](#options-9) - [--whole-units](#--whole-units-1) - [login](#login) - - [Options](#options-9) + - [Options](#options-10) - [--ci](#--ci) - [-o, --output ](#-o---output-) - [-f, --file ](#-f---file-) - [logout](#logout) - [refund](#refund) - - [Options](#options-10) + - [Options](#options-11) - [-t, --txID ](#-t---txid-) - [doctor](#doctor) - - [Options](#options-11) + - [Options](#options-12) - [-c, --copy-to-clipboard](#-c---copy-to-clipboard) - [explore](#explore) - - [Arguments](#arguments-2) + - [Arguments](#arguments-4) - [NETWORK](#network) - [generate](#generate) - [client](#client) - - [Options](#options-12) + - [Options](#options-13) - [-o, --output ](#-o---output--1) - [-l, --language ](#-l---language-) - - [Arguments](#arguments-3) + - [Arguments](#arguments-5) - [APP_SPEC_PATH_OR_DIR](#app_spec_path_or_dir) - [goal](#goal) - - [Options](#options-13) + - [Options](#options-14) - [--console](#--console) - - [Arguments](#arguments-4) + - [Arguments](#arguments-6) - [GOAL_ARGS](#goal_args) - [init](#init) - - [Options](#options-14) + - [Options](#options-15) - [-n, --name ](#-n---name-) - [-t, --template ](#-t---template-) - [--template-url ](#--template-url-) @@ -91,33 +100,33 @@ - [console](#console) - [explore](#explore-1) - [logs](#logs) - - [Options](#options-15) + - [Options](#options-16) - [--follow, -f](#--follow--f) - [--tail ](#--tail-) - [reset](#reset) - - [Options](#options-16) + - [Options](#options-17) - [--update, --no-update](#--update---no-update) - [start](#start) - - [Options](#options-17) + - [Options](#options-18) - [-n, --name ](#-n---name--1) - [status](#status) - [stop](#stop) - [task](#task) - [analyze](#analyze) - - [Options](#options-18) + - [Options](#options-19) - [-r, --recursive](#-r---recursive) - [--force](#--force-1) - [--diff](#--diff) - [-o, --output ](#-o---output--2) - [-e, --exclude ](#-e---exclude-) - - [Arguments](#arguments-5) + - [Arguments](#arguments-7) - [INPUT_PATHS](#input_paths) - [ipfs](#ipfs) - - [Options](#options-19) + - [Options](#options-20) - [-f, --file ](#-f---file--1) - [-n, --name ](#-n---name--2) - [mint](#mint) - - [Options](#options-20) + - [Options](#options-21) - [--creator ](#--creator-) - [-n, --name ](#-n---name--3) - [-u, --unit ](#-u---unit-) @@ -129,37 +138,37 @@ - [--nft, --ft](#--nft---ft) - [-n, --network ](#-n---network-) - [nfd-lookup](#nfd-lookup) - - [Options](#options-21) + - [Options](#options-22) - [-o, --output ](#-o---output--3) - - [Arguments](#arguments-6) + - [Arguments](#arguments-8) - [VALUE](#value) - [opt-in](#opt-in) - - [Options](#options-22) + - [Options](#options-23) - [-a, --account ](#-a---account-) - [-n, --network ](#-n---network--1) - - [Arguments](#arguments-7) + - [Arguments](#arguments-9) - [ASSET_IDS](#asset_ids) - [opt-out](#opt-out) - - [Options](#options-23) + - [Options](#options-24) - [-a, --account ](#-a---account--1) - [--all](#--all) - [-n, --network ](#-n---network--2) - - [Arguments](#arguments-8) + - [Arguments](#arguments-10) - [ASSET_IDS](#asset_ids-1) - [send](#send) - - [Options](#options-24) + - [Options](#options-25) - [-f, --file ](#-f---file--2) - [-t, --transaction ](#-t---transaction-) - [-n, --network ](#-n---network--3) - [sign](#sign) - - [Options](#options-25) + - [Options](#options-26) - [-a, --account ](#-a---account--2) - [-f, --file ](#-f---file--3) - [-t, --transaction ](#-t---transaction--1) - [-o, --output ](#-o---output--4) - [--force](#--force-2) - [transfer](#transfer) - - [Options](#options-26) + - [Options](#options-27) - [-s, --sender ](#-s---sender-) - [-r, --receiver ](#-r---receiver--1) - [--asset, --id ](#--asset---id-) @@ -167,28 +176,28 @@ - [--whole-units](#--whole-units-2) - [-n, --network ](#-n---network--4) - [vanity-address](#vanity-address) - - [Options](#options-27) + - [Options](#options-28) - [-m, --match ](#-m---match-) - [-o, --output ](#-o---output--5) - [-a, --alias ](#-a---alias-) - [--file-path ](#--file-path-) - [-f, --force](#-f---force) - - [Arguments](#arguments-9) + - [Arguments](#arguments-11) - [KEYWORD](#keyword) - [wallet](#wallet) - - [Options](#options-28) + - [Options](#options-29) - [-a, --address ](#-a---address-) - [-m, --mnemonic](#-m---mnemonic) - [-f, --force](#-f---force-1) - - [Arguments](#arguments-10) + - [Arguments](#arguments-12) - [ALIAS_NAME](#alias_name) - - [Arguments](#arguments-11) + - [Arguments](#arguments-13) - [ALIAS](#alias) - - [Options](#options-29) + - [Options](#options-30) - [-f, --force](#-f---force-2) - - [Arguments](#arguments-12) + - [Arguments](#arguments-14) - [ALIAS](#alias-1) - - [Options](#options-30) + - [Options](#options-31) - [-f, --force](#-f---force-3) # algokit @@ -278,6 +287,49 @@ Installs Python Poetry (if not present) and runs poetry install in the current w algokit bootstrap poetry [OPTIONS] ``` +## compile + +Compile smart contracts and smart signatures written in a supported high-level language +to a format deployable on the Algorand Virtual Machine (AVM). + +```shell +algokit compile [OPTIONS] COMMAND [ARGS]... +``` + +### Options + + +### -v, --version +The compiler version to pin to, for example, 1.0.0. If no version is specified, AlgoKit checks if the compiler is installed and runs the installed version. If the compiler is not installed, AlgoKit runs the latest version. If a version is specified, AlgoKit checks if an installed version matches and runs the installed version. Otherwise, AlgoKit runs the specified version. + +### py + +Compile Algorand Python contract(s) using the PuyaPy compiler. + +```shell +algokit compile py [OPTIONS] [PUYAPY_ARGS]... +``` + +### Arguments + + +### PUYAPY_ARGS +Optional argument(s) + +### python + +Compile Algorand Python contract(s) using the PuyaPy compiler. + +```shell +algokit compile python [OPTIONS] [PUYAPY_ARGS]... +``` + +### Arguments + + +### PUYAPY_ARGS +Optional argument(s) + ## completions Install and Uninstall AlgoKit shell integrations. diff --git a/docs/features/compile.md b/docs/features/compile.md new file mode 100644 index 00000000..391df442 --- /dev/null +++ b/docs/features/compile.md @@ -0,0 +1,98 @@ +# AlgoKit Compile + +The AlgoKit Compile feature enables you to compile smart contracts (apps) and smart signatures (logic signatures) written in a supported high-level language to a format deployable on the Algorand Virtual Machine (AVM). + +When running the compile command, AlgoKit will take care of working out which compiler you need and dynamically resolve it. Additionally, AlgoKit will detect if a matching compiler version is already installed globally on your machine or is included in your project and use that. + +## Prerequisites + +See [Compile Python - Prerequisites](#prerequisites-1) for details. + +## What is Algorand Python & PuyaPy? + +Algorand Python is a semantically and syntactically compatible, typed Python language that works with standard Python tooling and allows you to express smart contracts (apps) and smart signatures (logic signatures) for deployment on the Algorand Virtual Machine (AVM). + +Algorand Python can be deployed to Algorand by using the PuyaPy optimising compiler, which takes Algorand Python and outputs [ARC-32](https://github.com/algorandfoundation/ARCs/blob/main/ARCs/arc-0032.md) application spec files (among other formats) which, [when deployed](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/generate.md#1-typed-clients), will result in AVM bytecode execution semantics that match the given Python code. + +If you want to learn more, check out the [PuyaPy docs](https://github.com/algorandfoundation/puya/blob/main/docs/index.md). + +Below is an example Algorand Python smart contract. + +```py +from puyapy import ARC4Contract, arc4 + +class HelloWorldContract(ARC4Contract): + @arc4.abimethod + def hello(self, name: arc4.String) -> arc4.String: + return "Hello, " + name +``` + +For more complex examples, see the [examples](https://github.com/algorandfoundation/puya/tree/main/examples) in the [PuyaPy repo](https://github.com/algorandfoundation/puya). + +## Usage + +Available commands and possible usage are as follows: + +``` +Usage: algokit compile [OPTIONS] COMMAND [ARGS]... + + Compile smart contracts and smart signatures written in a supported high-level language to a format deployable on + the Algorand Virtual Machine (AVM). + +Options: + -v, --version TEXT The compiler version to pin to, for example, 1.0.0. If no version is specified, AlgoKit checks + if the compiler is installed and runs the installed version. If the compiler is not installed, + AlgoKit runs the latest version. If a version is specified, AlgoKit checks if an installed + version matches and runs the installed version. Otherwise, AlgoKit runs the specified version. + -h, --help Show this message and exit. + +Commands: + py Compile Algorand Python contract(s) using the PuyaPy compiler. + python Compile Algorand Python contract(s) using the PuyaPy compiler. +``` + +### Compile Python + +The command `algokit compile python` or `algokit compile py` will run the [PuyaPy](https://github.com/algorandfoundation/puya) compiler against the supplied Algorand Python smart contract. + +All arguments supplied to the command are passed directly to PuyaPy, therefore this command supports all options supported by the PuyaPy compiler. + +Any errors detected by PuyaPy during the compilation process will be printed to the output. + +#### Prerequisites + +PuyaPy requires Python 3.12+, so please ensure your Python version satisfies this requirement. + +This command will attempt to resolve a matching installed PuyaPy compiler, either globally installed in the system or locally installed in your project (via [Poetry](https://python-poetry.org/)). If no appropriate match is found, the PuyaPy compiler will be dynamically run using [pipx](https://pipx.pypa.io/stable/). In this case pipx is also required. + +#### Examples + +To see a list of the supported PuyaPy options, run the following: + +```shell +algokit compile python -h +``` + +To determine the version of the PuyaPy compiler in use, execute the following command: + +```shell +algokit compile python --version +``` + +To compile a single Algorand Python smart contract and write the output to a specific location, run the following: + +```shell +algokit compile python hello_world/contract.py --out-dir hello_world/out +``` + +To compile multiple Algorand Python smart contracts and write the output to a specific location, run the following: + +```shell +algokit compile python hello_world/contract.py calculator/contract.py --out-dir my_contracts +``` + +To compile a directory of Algorand Python smart contracts and write the output to the default location, run the following: + +```shell +algokit compile python my_contracts +``` diff --git a/src/algokit/cli/compile.py b/src/algokit/cli/compile.py index b5df7671..931de201 100644 --- a/src/algokit/cli/compile.py +++ b/src/algokit/cli/compile.py @@ -2,13 +2,18 @@ import click -from algokit.core.compile.python import find_valid_puyapy_command -from algokit.core.proc import run +from algokit.cli.compilers.python import py, python logger = logging.getLogger(__name__) -@click.group("compile", hidden=True) +@click.group( + "compile", + short_help=( + "Compile smart contracts and smart signatures written in a supported high-level language " + "to a format deployable on the Algorand Virtual Machine (AVM)." + ), +) @click.option( "-v", "--version", @@ -16,52 +21,22 @@ required=False, default=None, help=( - "Compiler version, for example, 1.0.0. " - "If the version isn't specified, AlgoKit will check if the compiler is installed locally, and execute that. " - "If the compiler is not found, it will install the latest version. " - "If the version is specified, AlgoKit will check if the local compiler's version satisfies, and execute that. " - "Otherwise, AlgoKit will install the specifed compiler version." + "The compiler version to pin to, for example, 1.0.0. " + "If no version is specified, AlgoKit checks if the compiler is installed and runs the installed version. " + "If the compiler is not installed, AlgoKit runs the latest version. " + "If a version is specified, AlgoKit checks if an installed version matches and runs the installed version. " + "Otherwise, AlgoKit runs the specified version." ), ) @click.pass_context def compile_group(context: click.Context, version: str | None) -> None: - """Compile high level language smart contracts to TEAL""" - context.ensure_object(dict) - context.obj["version"] = version - - -@click.command( - context_settings={ - "ignore_unknown_options": True, - }, - add_help_option=False, -) -@click.argument("puya_args", nargs=-1, type=click.UNPROCESSED) -@click.pass_context -def compile_py_command(context: click.Context, puya_args: list[str]) -> None: """ - Compile Python contract(s) to TEAL with PuyaPy + Compile smart contracts and smart signatures written in a supported high-level language + to a format deployable on the Algorand Virtual Machine (AVM). """ - version = str(context.obj["version"]) if context.obj["version"] else None - - puya_command = find_valid_puyapy_command(version) - - run_result = run( - [ - *puya_command, - *puya_args, - ], - ) - click.echo(run_result.output) - - if run_result.exit_code != 0: - click.secho( - "An error occurred during compile. Ensure supplied files are valid PuyaPy code before retrying.", - err=True, - fg="red", - ) - raise click.exceptions.Exit(run_result.exit_code) + context.ensure_object(dict) + context.obj["version"] = version -compile_group.add_command(compile_py_command, "python") -compile_group.add_command(compile_py_command, "py") +compile_group.add_command(python, "python") +compile_group.add_command(py, "py") diff --git a/src/algokit/cli/compilers/__init__.py b/src/algokit/cli/compilers/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/algokit/cli/compilers/python.py b/src/algokit/cli/compilers/python.py new file mode 100644 index 00000000..1a5f5f52 --- /dev/null +++ b/src/algokit/cli/compilers/python.py @@ -0,0 +1,58 @@ +import logging +import os +from collections.abc import Callable +from typing import Any + +import click + +from algokit.core.compilers.python import find_valid_puyapy_command +from algokit.core.proc import run + +logger = logging.getLogger(__name__) +_AnyCallable = Callable[..., Any] + + +def invoke_puyapy(context: click.Context, puyapy_args: list[str]) -> None: + version = str(context.obj["version"]) if context.obj["version"] else None + + puyapy_command = find_valid_puyapy_command(version) + + run_result = run( + [ + *puyapy_command, + *puyapy_args, + ], + env=(dict(os.environ) | {"NO_COLOR": "1"}) if context.color is False else None, + ) + click.echo(run_result.output) + + if run_result.exit_code != 0: + click.secho( + "An error occurred during compile. Please ensure that any supplied arguments are valid " + "and any files passed are valid Algorand Python code before retrying.", + err=True, + fg="red", + ) + raise click.exceptions.Exit(run_result.exit_code) + + +def common_puyapy_command_options(function: _AnyCallable) -> click.Command: + function = click.argument("puyapy_args", nargs=-1, type=click.UNPROCESSED)(function) + function = click.pass_context(function) + return click.command( + context_settings={ + "ignore_unknown_options": True, + }, + add_help_option=False, + help="Compile Algorand Python contract(s) using the PuyaPy compiler.", + )(function) + + +@common_puyapy_command_options +def python(context: click.Context, puyapy_args: list[str]) -> None: + invoke_puyapy(context, puyapy_args) + + +@common_puyapy_command_options +def py(context: click.Context, puyapy_args: list[str]) -> None: + invoke_puyapy(context, puyapy_args) diff --git a/src/algokit/core/compile/python.py b/src/algokit/core/compilers/python.py similarity index 61% rename from src/algokit/core/compile/python.py rename to src/algokit/core/compilers/python.py index e4e4b12c..38859490 100644 --- a/src/algokit/core/compile/python.py +++ b/src/algokit/core/compilers/python.py @@ -5,15 +5,15 @@ def find_valid_puyapy_command(version: str | None) -> list[str]: - return _find_puya_command_at_version(version) if version is not None else _find_puya_command() + return _find_puyapy_command_at_version(version) if version is not None else _find_puyapy_command() -def _find_puya_command_at_version(version: str) -> list[str]: +def _find_puyapy_command_at_version(version: str) -> list[str]: """ - Find puya command with a specific version. + Find puyapy command with a specific version. If the puya version isn't installed, install it with pipx run. """ - for puyapy_command in _get_candidates_puyapy_commands(): + for puyapy_command in _get_candidate_puyapy_commands(): try: puyapy_version_result = run([*puyapy_command, "--version"]) except OSError: @@ -25,24 +25,25 @@ def _find_puya_command_at_version(version: str) -> list[str]: return puyapy_command pipx_command = find_valid_pipx_command( - "Unable to find pipx install so that the `PuyaPy` compiler can be installed; " + "Unable to find pipx install so that the `PuyaPy` compiler can be run; " "please install pipx via https://pypa.github.io/pipx/ " - "and then try `algokit compile py ...` again." + "and then try `algokit compile python ...` again." ) return [ *pipx_command, "run", - f"puya=={version}", + f"--spec=puya=={version}", + "puyapy", ] -def _find_puya_command() -> list[str]: +def _find_puyapy_command() -> list[str]: """ - Find puya command. + Find puyapy command. If puya isn't installed, install the latest version with pipx. """ - for puyapy_command in _get_candidates_puyapy_commands(): + for puyapy_command in _get_candidate_puyapy_commands(): try: puyapy_help_result = run([*puyapy_command, "-h"]) except OSError: @@ -52,28 +53,19 @@ def _find_puya_command() -> list[str]: return puyapy_command pipx_command = find_valid_pipx_command( - "Unable to find pipx install so that the `PuyaPy` compiler can be installed; " + "Unable to find pipx install so that the `PuyaPy` compiler can be run; " "please install pipx via https://pypa.github.io/pipx/ " - "and then try `algokit compile py ...` again." - ) - _install_puyapy_with_pipx(pipx_command) - return ["puyapy"] - - -def _install_puyapy_with_pipx(pipx_command: list[str]) -> None: - run( - [ - *pipx_command, - "install", - "puya", - ], - bad_return_code_error_message=( - "Unable to install puya via pipx; please install puya manually and try `algokit compile py ...` again." - ), + "and then try `algokit compile python ...` again." ) + return [ + *pipx_command, + "run", + "--spec=puya", + "puyapy", + ] -def _get_candidates_puyapy_commands() -> Iterator[list[str]]: +def _get_candidate_puyapy_commands() -> Iterator[list[str]]: # when puya is installed at the project level yield ["poetry", "run", "puyapy"] # when puya is installed at the global level diff --git a/tests/compile/test_python.test_puyapy_is_not_installed_anywhere.approved.txt b/tests/compile/test_python.test_puyapy_is_not_installed_anywhere.approved.txt index 9eb04315..3839aef2 100644 --- a/tests/compile/test_python.test_puyapy_is_not_installed_anywhere.approved.txt +++ b/tests/compile/test_python.test_puyapy_is_not_installed_anywhere.approved.txt @@ -4,8 +4,8 @@ DEBUG: Running 'puyapy -h' in '{current_working_directory}' DEBUG: puyapy: Puyapy not found DEBUG: Running 'pipx --version' in '{current_working_directory}' DEBUG: pipx: 1.0.0 -DEBUG: Running 'pipx install puya' in '{current_working_directory}' -DEBUG: pipx: Puyapy is installed -DEBUG: Running 'puyapy {current_working_directory}/tests/compile/dummy_contract.py' in '{current_working_directory}' -DEBUG: puyapy: Done -Done +DEBUG: Running 'pipx run --spec=puya puyapy {current_working_directory}/tests/compile/dummy_contract.py' in '{current_working_directory}' +DEBUG: pipx: STDOUT +DEBUG: pipx: STDERR +STDOUT +STDERR diff --git a/tests/compile/test_python.test_specificed_puyapy_version_is_not_installed.approved.txt b/tests/compile/test_python.test_specificed_puyapy_version_is_not_installed.approved.txt index 0cf292cd..44452729 100644 --- a/tests/compile/test_python.test_specificed_puyapy_version_is_not_installed.approved.txt +++ b/tests/compile/test_python.test_specificed_puyapy_version_is_not_installed.approved.txt @@ -4,6 +4,8 @@ DEBUG: Running 'puyapy --version' in '{current_working_directory}' DEBUG: puyapy: Puyapy not found DEBUG: Running 'pipx --version' in '{current_working_directory}' DEBUG: pipx: 1.0.0 -DEBUG: Running 'pipx run puya==1.1.0 {current_working_directory}/tests/compile/dummy_contract.py' in '{current_working_directory}' -DEBUG: pipx: Done -Done +DEBUG: Running 'pipx run --spec=puya==1.1.0 puyapy {current_working_directory}/tests/compile/dummy_contract.py' in '{current_working_directory}' +DEBUG: pipx: STDOUT +DEBUG: pipx: STDERR +STDOUT +STDERR diff --git a/tests/test_root.test_help.approved.txt b/tests/test_root.test_help.approved.txt index 7968b1a9..d45fc7ad 100644 --- a/tests/test_root.test_help.approved.txt +++ b/tests/test_root.test_help.approved.txt @@ -16,6 +16,9 @@ Options: Commands: bootstrap Bootstrap local dependencies in an AlgoKit project; run from project root directory. + compile Compile smart contracts and smart signatures written in a + supported high-level language to a format deployable on the + Algorand Virtual Machine (AVM). completions Install and Uninstall AlgoKit shell integrations. config Configure AlgoKit settings. deploy Deploy smart contracts from AlgoKit compliant repository.