From 4bb0c60e7b7283fd0b5c78ed5a6addc4f3ca20a9 Mon Sep 17 00:00:00 2001 From: Altynbek Orumbayev Date: Mon, 25 Mar 2024 14:42:19 +0100 Subject: [PATCH] chore: regen examples --- README.md | 6 +-- copier.yaml | 4 +- .../production_beaker_react.code-workspace | 40 +++++++++++++--- .../.copier-answers.yml | 2 +- .../.github/workflows/release.yaml | 38 --------------- .../.github/workflows/validate.yaml | 14 ------ .../.algokit.toml | 2 +- .../.copier-answers.yml | 2 +- .../.devcontainer.json | 0 .../.editorconfig | 0 .../.gitattributes | 0 ...production-python-react-contracts-cd.yaml} | 6 +-- ...production-python-react-contracts-ci.yaml} | 18 ++++---- .../production-python-react-frontend-cd.yaml} | 4 +- .../production-python-react-frontend-ci.yaml} | 10 ++-- .../.github/workflows/release.yaml | 38 +++++++++++++++ .../.github/workflows/validate.yaml | 14 ++++++ .../.gitignore | 0 .../.vscode/launch.json | 0 .../README.md | 12 ++--- .../production_python_react.code-workspace} | 46 +++++++++++++++---- .../projects/.gitkeep | 0 .../.algokit.toml | 4 +- .../generators/create_contract/copier.yaml | 0 .../{{ contract_name }}/contract.py.j2 | 0 .../{{ contract_name }}/deploy_config.py.j2 | 0 .../.copier-answers.yml | 6 +-- .../.editorconfig | 0 .../.env.localnet.template | 0 .../.env.template | 0 .../.env.testnet.template | 0 .../.gitattributes | 0 .../.gitignore | 0 ...ing-started-with-your-algokit-project.tour | 2 +- .../.vscode/extensions.json | 0 .../.vscode/launch.json | 0 .../.vscode/settings.json | 4 +- .../.vscode/tasks.json | 0 .../README.md | 4 +- .../poetry.toml | 0 .../pyproject.toml | 4 +- .../smart_contracts/README.md | 0 .../smart_contracts/__init__.py | 0 .../smart_contracts/__main__.py | 7 ++- .../smart_contracts/config.py | 0 .../smart_contracts/hello_world/contract.py | 0 .../hello_world/deploy_config.py | 0 .../smart_contracts/helpers/__init__.py | 0 .../smart_contracts/helpers/build.py | 10 +++- .../smart_contracts/helpers/deploy.py | 0 .../smart_contracts/helpers/util.py | 8 ++++ .../tests/__init__.py | 0 .../tests/conftest.py | 0 .../tests/hello_world_test.py | 0 .../.algokit.toml | 2 +- .../.copier-answers.yml | 2 +- .../.editorconfig | 0 .../.env.template | 0 .../.eslintrc | 0 .../.gitattributes | 0 .../.gitignore | 0 .../.prettierignore | 0 .../.prettierrc.cjs | 0 .../.vscode/extensions.json | 0 .../.vscode/launch.json | 0 .../.vscode/settings.json | 0 .../.vscode/tasks.json | 0 .../production_python_react-frontend}/LICENSE | 0 .../README.md | 2 +- .../index.html | 0 .../jest.config.ts | 0 .../package.json | 2 +- .../playwright.config.ts | 0 .../postcss.config.cjs | 0 .../public/index.html | 0 .../public/robots.txt | 0 .../src/App.tsx | 0 .../src/Home.tsx | 0 .../src/assets/logo.svg | 0 .../src/components/Account.tsx | 0 .../src/components/AppCalls.tsx | 0 .../src/components/ConnectWallet.tsx | 0 .../src/components/ErrorBoundary.tsx | 0 .../src/components/Transact.tsx | 0 .../src/contracts/README.md | 0 .../src/interfaces/network.ts | 0 .../src/main.tsx | 0 .../src/styles/main.css | 0 .../src/utils/ellipseAddress.spec.tsx | 0 .../src/utils/ellipseAddress.ts | 0 .../src/utils/network/getAlgoClientConfigs.ts | 0 .../src/vite-env.d.ts | 0 .../tailwind.config.js | 0 .../tests/example.spec.ts | 0 .../tsconfig.json | 0 .../tsconfig.node.json | 0 .../vite.config.ts | 0 ...production_tealscript_react.code-workspace | 24 ++++++++-- .../.algokit.toml | 4 +- .../.copier-answers.yml | 2 +- .../starter_beaker_react.code-workspace | 40 +++++++++++++--- .../.algokit.toml | 2 +- .../.copier-answers.yml | 2 +- .../.devcontainer.json | 0 .../.editorconfig | 0 .../.gitattributes | 0 .../.gitignore | 0 .../.vscode/launch.json | 0 .../README.md | 12 ++--- .../projects/.gitkeep | 0 .../.algokit.toml | 8 ++-- .../generators/create_contract/copier.yaml | 0 .../{{ contract_name }}/contract.py.j2 | 0 .../{{ contract_name }}/deploy-config.ts.j2 | 0 .../.copier-answers.yml | 6 +-- .../.editorconfig | 0 .../.env.localnet.template | 0 .../.env.template | 0 .../.env.testnet.template | 0 .../.gitattributes | 0 .../.gitignore | 0 .../.prettierignore | 0 .../.prettierrc.js | 0 ...ing-started-with-your-algokit-project.tour | 2 +- .../.vscode/extensions.json | 0 .../.vscode/launch.json | 0 .../.vscode/settings.json | 4 +- .../.vscode/tasks.json | 0 .../starter_python_react-contracts}/README.md | 4 +- .../package.json | 0 .../poetry.toml | 0 .../pyproject.toml | 4 +- .../smart_contracts/README.md | 0 .../smart_contracts/__init__.py | 0 .../smart_contracts/__main__.py | 0 .../smart_contracts/config.py | 0 .../smart_contracts/hello_world/contract.py | 0 .../hello_world/deploy-config.ts | 0 .../smart_contracts/helpers/__init__.py | 0 .../smart_contracts/helpers/build.py | 10 +++- .../smart_contracts/helpers/util.py | 8 ++++ .../smart_contracts/index.ts | 0 .../tsconfig.json | 0 .../.algokit.toml | 2 +- .../.copier-answers.yml | 2 +- .../.env.template | 0 .../.gitattributes | 0 .../starter_python_react-frontend}/.gitignore | 0 .../.vscode/extensions.json | 0 .../.vscode/launch.json | 0 .../.vscode/settings.json | 0 .../.vscode/tasks.json | 0 .../starter_python_react-frontend}/LICENSE | 0 .../starter_python_react-frontend}/README.md | 2 +- .../starter_python_react-frontend}/index.html | 0 .../package.json | 2 +- .../public/index.html | 0 .../public/robots.txt | 0 .../src/App.tsx | 0 .../src/Home.tsx | 0 .../src/assets/logo.svg | 0 .../src/components/Account.tsx | 0 .../src/components/AppCalls.tsx | 0 .../src/components/ConnectWallet.tsx | 0 .../src/components/ErrorBoundary.tsx | 0 .../src/components/Transact.tsx | 0 .../src/contracts/README.md | 0 .../src/interfaces/network.ts | 0 .../src/main.tsx | 0 .../src/styles/App.css | 0 .../src/utils/ellipseAddress.ts | 0 .../src/utils/network/getAlgoClientConfigs.ts | 0 .../src/vite-env.d.ts | 0 .../tsconfig.json | 0 .../tsconfig.node.json | 0 .../vite.config.ts | 0 .../starter_python_react.code-workspace} | 46 +++++++++++++++---- .../starter_tealscript_react.code-workspace | 24 ++++++++-- tests/test_templates.py | 4 +- 179 files changed, 346 insertions(+), 181 deletions(-) delete mode 100644 examples/production_puya_react/.github/workflows/release.yaml delete mode 100644 examples/production_puya_react/.github/workflows/validate.yaml rename examples/{production_puya_react => production_python_react}/.algokit.toml (57%) rename examples/{production_puya_react => production_python_react}/.copier-answers.yml (86%) rename examples/{production_puya_react => production_python_react}/.devcontainer.json (100%) rename examples/{production_puya_react => production_python_react}/.editorconfig (100%) rename examples/{production_puya_react => production_python_react}/.gitattributes (100%) rename examples/{production_puya_react/.github/workflows/production-puya-react-contracts-cd.yaml => production_python_react/.github/workflows/production-python-react-contracts-cd.yaml} (88%) rename examples/{production_puya_react/.github/workflows/production-puya-react-contracts-ci.yaml => production_python_react/.github/workflows/production-python-react-contracts-ci.yaml} (80%) rename examples/{production_puya_react/.github/workflows/production-puya-react-frontend-cd.yaml => production_python_react/.github/workflows/production-python-react-frontend-cd.yaml} (86%) rename examples/{production_puya_react/.github/workflows/production-puya-react-frontend-ci.yaml => production_python_react/.github/workflows/production-python-react-frontend-ci.yaml} (82%) create mode 100644 examples/production_python_react/.github/workflows/release.yaml create mode 100644 examples/production_python_react/.github/workflows/validate.yaml rename examples/{production_puya_react => production_python_react}/.gitignore (100%) rename examples/{production_puya_react => production_python_react}/.vscode/launch.json (100%) rename examples/{production_puya_react => production_python_react}/README.md (76%) rename examples/{starter_puya_react/starter_puya_react.code-workspace => production_python_react/production_python_react.code-workspace} (59%) rename examples/{production_puya_react => production_python_react}/projects/.gitkeep (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/.algokit.toml (94%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/.algokit/generators/create_contract/copier.yaml (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/.algokit/generators/create_contract/smart_contracts/{{ contract_name }}/contract.py.j2 (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/.algokit/generators/create_contract/smart_contracts/{{ contract_name }}/deploy_config.py.j2 (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/.copier-answers.yml (58%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/.editorconfig (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/.env.localnet.template (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/.env.template (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/.env.testnet.template (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/.gitattributes (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/.gitignore (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/.tours/getting-started-with-your-algokit-project.tour (99%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/.vscode/extensions.json (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/.vscode/launch.json (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/.vscode/settings.json (95%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/.vscode/tasks.json (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/README.md (98%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/poetry.toml (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/pyproject.toml (86%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/smart_contracts/README.md (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/smart_contracts/__init__.py (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/smart_contracts/__main__.py (82%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/smart_contracts/config.py (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/smart_contracts/hello_world/contract.py (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/smart_contracts/hello_world/deploy_config.py (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/smart_contracts/helpers/__init__.py (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/smart_contracts/helpers/build.py (82%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/smart_contracts/helpers/deploy.py (100%) create mode 100644 examples/production_python_react/projects/production_python_react-contracts/smart_contracts/helpers/util.py rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/tests/__init__.py (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/tests/conftest.py (100%) rename examples/{production_puya_react/projects/production_puya_react-contracts => production_python_react/projects/production_python_react-contracts}/tests/hello_world_test.py (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/.algokit.toml (93%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/.copier-answers.yml (83%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/.editorconfig (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/.env.template (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/.eslintrc (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/.gitattributes (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/.gitignore (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/.prettierignore (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/.prettierrc.cjs (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/.vscode/extensions.json (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/.vscode/launch.json (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/.vscode/settings.json (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/.vscode/tasks.json (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/LICENSE (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/README.md (99%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/index.html (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/jest.config.ts (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/package.json (97%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/playwright.config.ts (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/postcss.config.cjs (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/public/index.html (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/public/robots.txt (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/src/App.tsx (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/src/Home.tsx (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/src/assets/logo.svg (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/src/components/Account.tsx (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/src/components/AppCalls.tsx (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/src/components/ConnectWallet.tsx (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/src/components/ErrorBoundary.tsx (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/src/components/Transact.tsx (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/src/contracts/README.md (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/src/interfaces/network.ts (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/src/main.tsx (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/src/styles/main.css (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/src/utils/ellipseAddress.spec.tsx (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/src/utils/ellipseAddress.ts (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/src/utils/network/getAlgoClientConfigs.ts (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/src/vite-env.d.ts (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/tailwind.config.js (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/tests/example.spec.ts (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/tsconfig.json (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/tsconfig.node.json (100%) rename examples/{production_puya_react/projects/production_puya_react-frontend => production_python_react/projects/production_python_react-frontend}/vite.config.ts (100%) rename examples/{starter_puya_react => starter_python_react}/.algokit.toml (59%) rename examples/{starter_puya_react => starter_python_react}/.copier-answers.yml (86%) rename examples/{starter_puya_react => starter_python_react}/.devcontainer.json (100%) rename examples/{starter_puya_react => starter_python_react}/.editorconfig (100%) rename examples/{starter_puya_react => starter_python_react}/.gitattributes (100%) rename examples/{starter_puya_react => starter_python_react}/.gitignore (100%) rename examples/{starter_puya_react => starter_python_react}/.vscode/launch.json (100%) rename examples/{starter_puya_react => starter_python_react}/README.md (69%) rename examples/{starter_puya_react => starter_python_react}/projects/.gitkeep (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/.algokit.toml (88%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/.algokit/generators/create_contract/copier.yaml (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/.algokit/generators/create_contract/smart_contracts/{{ contract_name }}/contract.py.j2 (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/.algokit/generators/create_contract/smart_contracts/{{ contract_name }}/deploy-config.ts.j2 (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/.copier-answers.yml (58%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/.editorconfig (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/.env.localnet.template (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/.env.template (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/.env.testnet.template (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/.gitattributes (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/.gitignore (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/.prettierignore (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/.prettierrc.js (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/.tours/getting-started-with-your-algokit-project.tour (99%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/.vscode/extensions.json (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/.vscode/launch.json (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/.vscode/settings.json (92%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/.vscode/tasks.json (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/README.md (96%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/package.json (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/poetry.toml (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/pyproject.toml (68%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/smart_contracts/README.md (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/smart_contracts/__init__.py (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/smart_contracts/__main__.py (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/smart_contracts/config.py (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/smart_contracts/hello_world/contract.py (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/smart_contracts/hello_world/deploy-config.ts (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/smart_contracts/helpers/__init__.py (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/smart_contracts/helpers/build.py (82%) create mode 100644 examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/helpers/util.py rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/smart_contracts/index.ts (100%) rename examples/{starter_puya_react/projects/starter_puya_react-contracts => starter_python_react/projects/starter_python_react-contracts}/tsconfig.json (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/.algokit.toml (91%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/.copier-answers.yml (83%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/.env.template (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/.gitattributes (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/.gitignore (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/.vscode/extensions.json (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/.vscode/launch.json (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/.vscode/settings.json (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/.vscode/tasks.json (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/LICENSE (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/README.md (99%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/index.html (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/package.json (96%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/public/index.html (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/public/robots.txt (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/src/App.tsx (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/src/Home.tsx (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/src/assets/logo.svg (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/src/components/Account.tsx (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/src/components/AppCalls.tsx (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/src/components/ConnectWallet.tsx (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/src/components/ErrorBoundary.tsx (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/src/components/Transact.tsx (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/src/contracts/README.md (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/src/interfaces/network.ts (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/src/main.tsx (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/src/styles/App.css (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/src/utils/ellipseAddress.ts (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/src/utils/network/getAlgoClientConfigs.ts (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/src/vite-env.d.ts (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/tsconfig.json (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/tsconfig.node.json (100%) rename examples/{starter_puya_react/projects/starter_puya_react-frontend => starter_python_react/projects/starter_python_react-frontend}/vite.config.ts (100%) rename examples/{production_puya_react/production_puya_react.code-workspace => starter_python_react/starter_python_react.code-workspace} (60%) diff --git a/README.md b/README.md index 3cdb6b2..6875cc0 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,9 @@ This template supports a multitude of features for developing full-stack applica And the following backend templates: -- [algokit-puya-template](https://github.com/algorandfoundation/algokit-puya-template) - An official starter for developing and deploying Puya smart contracts. +- [algokit-python-template](https://github.com/algorandfoundation/algokit-python-template) - An official starter for developing and deploying Puya smart contracts. - [algokit-tealscript-template](https://github.com/algorand-devrel/tealscript-algokit-template) - An official starter for developing and deploying TealScript smart contracts. -- [algokit-beaker-default-template](https://github.com/algorandfoundation/algokit-beaker-default-template) - A production-ready baseline for developing and deploying Beaker smart contracts. Please note this template option is to be deprecated after `puya` is ready for production use. +- [algokit-beaker-default-template](https://github.com/algorandfoundation/algokit-beaker-default-template) - A production-ready baseline for developing and deploying Beaker smart contracts. ### Frontend @@ -44,7 +44,7 @@ And the following backend templates: ### Backend -- Compilation of multiple `puya`, `tealscript`, `beaker` contracts to a predictable folder location and file layout where they can be deployed. +- Compilation of multiple `python`, `tealscript`, `beaker` contracts to a predictable folder location and file layout where they can be deployed. - Deploy-time immutability and permanence control. - [Poetry](https://python-poetry.org/) for Python dependency management and virtual environment management. - Linting via [Ruff](https://github.com/charliermarsh/ruff) or [Flake8](https://flake8.pycqa.org/en/latest/). diff --git a/copier.yaml b/copier.yaml index d9d9966..1f281a4 100644 --- a/copier.yaml +++ b/copier.yaml @@ -45,10 +45,10 @@ contract_template: help: Choose the contract template. when: false choices: - Puya: puya + Python: python TealScript: tealscript Beaker: beaker - default: puya + default: python # project_name should never get prompted, AlgoKit should always pass it by convention project_name: diff --git a/examples/production_beaker_react/production_beaker_react.code-workspace b/examples/production_beaker_react/production_beaker_react.code-workspace index d856d3e..a55781d 100644 --- a/examples/production_beaker_react/production_beaker_react.code-workspace +++ b/examples/production_beaker_react/production_beaker_react.code-workspace @@ -9,26 +9,46 @@ }, { "path": "./projects/production_beaker_react-frontend" + }, + { + "path": "." + }, + { + "path": "projects/production_beaker_react-frontend" + }, + { + "path": "projects/production_beaker_react-contracts" + }, + { + "path": "." } ], "settings": { "files.exclude": { "projects/": true }, - "jest.disabledWorkspaceFolders": ["ROOT", "projects"], + "jest.disabledWorkspaceFolders": [ + "ROOT", + "projects" + ], "dotenv.enableAutocloaking": false }, "extensions": { - "recommendations": ["joshx.workspace-terminals"] + "recommendations": [ + "joshx.workspace-terminals" + ] }, - "tasks": { "version": "2.0.0", "tasks": [ { "label": "Build artifacts (+ LocalNet)", "command": "algokit", - "args": ["project", "run", "build"], + "args": [ + "project", + "run", + "build" + ], "options": { "cwd": "${workspaceFolder}" }, @@ -38,7 +58,10 @@ { "label": "Start AlgoKit LocalNet", "command": "algokit", - "args": ["localnet", "start"], + "args": [ + "localnet", + "start" + ], "type": "shell", "options": { "cwd": "${workspaceFolder}" @@ -58,7 +81,10 @@ "name": "Deploy contracts", "folder": "production_beaker_react-contracts" }, - { "name": "Run dApp", "folder": "production_beaker_react-frontend" } + { + "name": "Run dApp", + "folder": "production_beaker_react-frontend" + } ], "presentation": { "hidden": false, @@ -67,4 +93,4 @@ } ] } - } +} \ No newline at end of file diff --git a/examples/production_beaker_react/projects/production_beaker_react-contracts/.copier-answers.yml b/examples/production_beaker_react/projects/production_beaker_react-contracts/.copier-answers.yml index bbfb4ae..73fad0d 100644 --- a/examples/production_beaker_react/projects/production_beaker_react-contracts/.copier-answers.yml +++ b/examples/production_beaker_react/projects/production_beaker_react-contracts/.copier-answers.yml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY -_commit: 1.13.1-2-gf28c608 +_commit: 1.13.1-3-g2215bf7 _src_path: gh:algorandfoundation/algokit-beaker-default-template author_email: None author_name: None diff --git a/examples/production_puya_react/.github/workflows/release.yaml b/examples/production_puya_react/.github/workflows/release.yaml deleted file mode 100644 index e40bd29..0000000 --- a/examples/production_puya_react/.github/workflows/release.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: Release - -on: - push: - branches: - - main - paths-ignore: - - 'docs/**' - - '**.md' - - '.vscode/**' - - '.idea/**' - -permissions: - contents: read - packages: read - -jobs: - production_puya_react-contracts-validate: - name: Run production_puya_react-contracts release - secrets: inherit - uses: ./.github/workflows/production_puya_react-contracts-ci.yaml - - production_puya_react-contracts-release: - name: Run production_puya_react-contracts release - secrets: inherit - uses: ./.github/workflows/production_puya_react-contracts-cd.yaml - needs: production_puya_react-contracts-validate - - production_puya_react-frontend-validate: - name: Run production_puya_react-frontend release - secrets: inherit - uses: ./.github/workflows/production_puya_react-frontend-ci.yaml - - production_puya_react-frontend-release: - name: Run production_puya_react-frontend release - secrets: inherit - uses: ./.github/workflows/production_puya_react-frontend-cd.yaml - needs: production_puya_react-frontend-validate diff --git a/examples/production_puya_react/.github/workflows/validate.yaml b/examples/production_puya_react/.github/workflows/validate.yaml deleted file mode 100644 index 579a8b5..0000000 --- a/examples/production_puya_react/.github/workflows/validate.yaml +++ /dev/null @@ -1,14 +0,0 @@ -name: Pull Request validation - -on: [pull_request] - - -jobs: - production_puya_react-contracts-ci: - name: Run production_puya_react-contracts validation - uses: ./.github/workflows/production_puya_react-contracts-ci.yaml - - production_puya_react-frontend-ci: - name: Run production_puya_react-frontend validation - uses: ./.github/workflows/production_puya_react-frontend-ci.yaml - diff --git a/examples/production_puya_react/.algokit.toml b/examples/production_python_react/.algokit.toml similarity index 57% rename from examples/production_puya_react/.algokit.toml rename to examples/production_python_react/.algokit.toml index cafa822..6d95bed 100644 --- a/examples/production_puya_react/.algokit.toml +++ b/examples/production_python_react/.algokit.toml @@ -6,4 +6,4 @@ type = 'workspace' projects_root_path = 'projects' [project.run] -build = ['production_puya_react-contracts', 'production_puya_react-frontend'] +build = ['production_python_react-contracts', 'production_python_react-frontend'] diff --git a/examples/production_puya_react/.copier-answers.yml b/examples/production_python_react/.copier-answers.yml similarity index 86% rename from examples/production_puya_react/.copier-answers.yml rename to examples/production_python_react/.copier-answers.yml index e60ba05..f7ad3c2 100644 --- a/examples/production_puya_react/.copier-answers.yml +++ b/examples/production_python_react/.copier-answers.yml @@ -7,5 +7,5 @@ cloud_provider: netlify contract_name: hello_world deployment_language: python preset_name: production -project_name: production_puya_react +project_name: production_python_react diff --git a/examples/production_puya_react/.devcontainer.json b/examples/production_python_react/.devcontainer.json similarity index 100% rename from examples/production_puya_react/.devcontainer.json rename to examples/production_python_react/.devcontainer.json diff --git a/examples/production_puya_react/.editorconfig b/examples/production_python_react/.editorconfig similarity index 100% rename from examples/production_puya_react/.editorconfig rename to examples/production_python_react/.editorconfig diff --git a/examples/production_puya_react/.gitattributes b/examples/production_python_react/.gitattributes similarity index 100% rename from examples/production_puya_react/.gitattributes rename to examples/production_python_react/.gitattributes diff --git a/examples/production_puya_react/.github/workflows/production-puya-react-contracts-cd.yaml b/examples/production_python_react/.github/workflows/production-python-react-contracts-cd.yaml similarity index 88% rename from examples/production_puya_react/.github/workflows/production-puya-react-contracts-cd.yaml rename to examples/production_python_react/.github/workflows/production-python-react-contracts-cd.yaml index 58326f3..9445438 100644 --- a/examples/production_puya_react/.github/workflows/production-puya-react-contracts-cd.yaml +++ b/examples/production_python_react/.github/workflows/production-python-react-contracts-cd.yaml @@ -1,4 +1,4 @@ -name: Release production_puya_react-contracts +name: Release production_python_react-contracts on: workflow_call: @@ -25,7 +25,7 @@ jobs: run: pipx install git+https://github.com/algorandfoundation/algokit-cli@feat/command_orchestration - name: Bootstrap dependencies - run: algokit bootstrap all --project-name 'production_puya_react-contracts' + run: algokit bootstrap all --project-name 'production_python_react-contracts' - name: Configure git shell: bash @@ -34,7 +34,7 @@ jobs: git config --global user.email "actions@github.com" && git config --global user.name "github-actions" - name: Deploy to testnet - run: algokit deploy testnet --project-name 'production_puya_react-contracts' + run: algokit deploy testnet --project-name 'production_python_react-contracts' env: # This is the account that becomes the creator of the contract DEPLOYER_MNEMONIC: ${{ secrets.DEPLOYER_MNEMONIC }} diff --git a/examples/production_puya_react/.github/workflows/production-puya-react-contracts-ci.yaml b/examples/production_python_react/.github/workflows/production-python-react-contracts-ci.yaml similarity index 80% rename from examples/production_puya_react/.github/workflows/production-puya-react-contracts-ci.yaml rename to examples/production_python_react/.github/workflows/production-python-react-contracts-ci.yaml index 76b6f67..465be72 100644 --- a/examples/production_puya_react/.github/workflows/production-puya-react-contracts-ci.yaml +++ b/examples/production_python_react/.github/workflows/production-python-react-contracts-ci.yaml @@ -1,4 +1,4 @@ -name: Validate production_puya_react-contracts +name: Validate production_python_react-contracts on: workflow_call: @@ -26,7 +26,7 @@ jobs: run: algokit localnet start - name: Bootstrap dependencies - run: algokit bootstrap all --project-name 'production_puya_react-contracts' + run: algokit bootstrap all --project-name 'production_python_react-contracts' - name: Configure git shell: bash @@ -35,25 +35,25 @@ jobs: git config --global user.email "actions@github.com" && git config --global user.name "github-actions" - name: Audit python dependencies - run: algokit project run audit --project-name 'production_puya_react-contracts' + run: algokit project run audit --project-name 'production_python_react-contracts' - name: Lint and format python dependencies - run: algokit project run lint --project-name 'production_puya_react-contracts' + run: algokit project run lint --project-name 'production_python_react-contracts' - name: Run tests shell: bash run: | set -o pipefail - algokit project run test --project-name 'production_puya_react-contracts' + algokit project run test --project-name 'production_python_react-contracts' - name: Build smart contracts - run: algokit project run build --project-name 'production_puya_react-contracts' + run: algokit project run build --project-name 'production_python_react-contracts' - name: Scan TEAL files for issues - run: algokit project run audit-teal --project-name 'production_puya_react-contracts' + run: algokit project run audit-teal --project-name 'production_python_react-contracts' - name: Check output stability of the smart contracts - run: algokit project run ci-teal-diff --project-name 'production_puya_react-contracts' + run: algokit project run ci-teal-diff --project-name 'production_python_react-contracts' - name: Run deployer against LocalNet - run: algokit project deploy localnet --project-name 'production_puya_react-contracts' + run: algokit project deploy localnet --project-name 'production_python_react-contracts' diff --git a/examples/production_puya_react/.github/workflows/production-puya-react-frontend-cd.yaml b/examples/production_python_react/.github/workflows/production-python-react-frontend-cd.yaml similarity index 86% rename from examples/production_puya_react/.github/workflows/production-puya-react-frontend-cd.yaml rename to examples/production_python_react/.github/workflows/production-python-react-frontend-cd.yaml index 6127731..fc005d0 100644 --- a/examples/production_puya_react/.github/workflows/production-puya-react-frontend-cd.yaml +++ b/examples/production_python_react/.github/workflows/production-python-react-frontend-cd.yaml @@ -1,4 +1,4 @@ -name: Release production_puya_react-frontend +name: Release production_python_react-frontend on: workflow_call: @@ -26,7 +26,7 @@ jobs: run: pipx install git+https://github.com/algorandfoundation/algokit-cli@feat/command_orchestration - name: Bootstrap dependencies - run: algokit bootstrap all --project-name 'production_puya_react-frontend' + run: algokit bootstrap all --project-name 'production_python_react-frontend' - name: Publish to Netlify env: diff --git a/examples/production_puya_react/.github/workflows/production-puya-react-frontend-ci.yaml b/examples/production_python_react/.github/workflows/production-python-react-frontend-ci.yaml similarity index 82% rename from examples/production_puya_react/.github/workflows/production-puya-react-frontend-ci.yaml rename to examples/production_python_react/.github/workflows/production-python-react-frontend-ci.yaml index a87d353..0148eb2 100644 --- a/examples/production_puya_react/.github/workflows/production-puya-react-frontend-ci.yaml +++ b/examples/production_python_react/.github/workflows/production-python-react-frontend-ci.yaml @@ -1,4 +1,4 @@ -name: Validate production_puya_react-frontend +name: Validate production_python_react-frontend on: @@ -32,16 +32,16 @@ jobs: run: pipx install git+https://github.com/algorandfoundation/algokit-cli@feat/command_orchestration - name: Install dependencies - run: algokit bootstrap all --project-name 'production_puya_react-frontend' + run: algokit bootstrap all --project-name 'production_python_react-frontend' - name: Run linters - run: algokit project run lint --project-name 'production_puya_react-frontend' + run: algokit project run lint --project-name 'production_python_react-frontend' - name: Run unit tests - run: algokit project run test --project-name 'production_puya_react-frontend' + run: algokit project run test --project-name 'production_python_react-frontend' - name: Build - run: algokit project run build --project-name 'production_puya_react-frontend' + run: algokit project run build --project-name 'production_python_react-frontend' diff --git a/examples/production_python_react/.github/workflows/release.yaml b/examples/production_python_react/.github/workflows/release.yaml new file mode 100644 index 0000000..da8a24d --- /dev/null +++ b/examples/production_python_react/.github/workflows/release.yaml @@ -0,0 +1,38 @@ +name: Release + +on: + push: + branches: + - main + paths-ignore: + - 'docs/**' + - '**.md' + - '.vscode/**' + - '.idea/**' + +permissions: + contents: read + packages: read + +jobs: + production_python_react-contracts-validate: + name: Run production_python_react-contracts release + secrets: inherit + uses: ./.github/workflows/production_python_react-contracts-ci.yaml + + production_python_react-contracts-release: + name: Run production_python_react-contracts release + secrets: inherit + uses: ./.github/workflows/production_python_react-contracts-cd.yaml + needs: production_python_react-contracts-validate + + production_python_react-frontend-validate: + name: Run production_python_react-frontend release + secrets: inherit + uses: ./.github/workflows/production_python_react-frontend-ci.yaml + + production_python_react-frontend-release: + name: Run production_python_react-frontend release + secrets: inherit + uses: ./.github/workflows/production_python_react-frontend-cd.yaml + needs: production_python_react-frontend-validate diff --git a/examples/production_python_react/.github/workflows/validate.yaml b/examples/production_python_react/.github/workflows/validate.yaml new file mode 100644 index 0000000..7c648a5 --- /dev/null +++ b/examples/production_python_react/.github/workflows/validate.yaml @@ -0,0 +1,14 @@ +name: Pull Request validation + +on: [pull_request] + + +jobs: + production_python_react-contracts-ci: + name: Run production_python_react-contracts validation + uses: ./.github/workflows/production_python_react-contracts-ci.yaml + + production_python_react-frontend-ci: + name: Run production_python_react-frontend validation + uses: ./.github/workflows/production_python_react-frontend-ci.yaml + diff --git a/examples/production_puya_react/.gitignore b/examples/production_python_react/.gitignore similarity index 100% rename from examples/production_puya_react/.gitignore rename to examples/production_python_react/.gitignore diff --git a/examples/production_puya_react/.vscode/launch.json b/examples/production_python_react/.vscode/launch.json similarity index 100% rename from examples/production_puya_react/.vscode/launch.json rename to examples/production_python_react/.vscode/launch.json diff --git a/examples/production_puya_react/README.md b/examples/production_python_react/README.md similarity index 76% rename from examples/production_puya_react/README.md rename to examples/production_python_react/README.md index 6909f81..960b147 100644 --- a/examples/production_puya_react/README.md +++ b/examples/production_python_react/README.md @@ -1,4 +1,4 @@ -# production_puya_react +# production_python_react This starter full stack project has been generated using AlgoKit. See below for default getting started instructions. @@ -15,8 +15,8 @@ This starter full stack project has been generated using AlgoKit. See below for - For all projects, it will copy `.env.template` to `.env`. - Run `algokit localnet start` to start a local Algorand network in Docker. If you are using VS Code launch configurations provided by the template, this will be done automatically for you. 3. Open the project and start debugging / developing on: - - [production_puya_react-contracts](projects/production_puya_react-contracts/README.md) - Refer to the README for more information on how to work with smart contracts. - - [production_puya_react-frontend](projects/production_puya_react-frontend/README.md) - Refer to the README for more information on how to work with the frontend application. + - [production_python_react-contracts](projects/production_python_react-contracts/README.md) - Refer to the README for more information on how to work with smart contracts. + - [production_python_react-frontend](projects/production_python_react-frontend/README.md) - Refer to the README for more information on how to work with the frontend application. ### Subsequently @@ -48,10 +48,10 @@ It has also been configured to have a productive dev experience out of the box i ## Integrating with smart contracts and application clients -Refer to the [production_puya_react-contracts](projects/production_puya_react-contracts/README.md) folder for overview of working with smart contracts, [projects/production_puya_react-frontend](projects/production_puya_react-frontend/README.md) for overview of the React project and the [projects/production_puya_react-frontend/contracts](projects/production_puya_react-frontend/src/contracts/README.md) folder for README on adding new smart contracts from backend as application clients on your frontend. The templates provided in these folders will help you get started. -When you compile and generate smart contract artifacts, your frontend component will automatically generate typescript application clients from smart contract artifacts and move them to `frontend/src/contracts` folder, see [`generate:app-clients` in package.json](projects/production_puya_react-frontend/package.json). Afterwards, you are free to import and use them in your frontend application. +Refer to the [production_python_react-contracts](projects/production_python_react-contracts/README.md) folder for overview of working with smart contracts, [projects/production_python_react-frontend](projects/production_python_react-frontend/README.md) for overview of the React project and the [projects/production_python_react-frontend/contracts](projects/production_python_react-frontend/src/contracts/README.md) folder for README on adding new smart contracts from backend as application clients on your frontend. The templates provided in these folders will help you get started. +When you compile and generate smart contract artifacts, your frontend component will automatically generate typescript application clients from smart contract artifacts and move them to `frontend/src/contracts` folder, see [`generate:app-clients` in package.json](projects/production_python_react-frontend/package.json). Afterwards, you are free to import and use them in your frontend application. -The frontend starter also provides an example of interactions with your HelloWorldClient in [`AppCalls.tsx`](projects/production_puya_react-frontend/src/components/AppCalls.tsx) component by default. +The frontend starter also provides an example of interactions with your HelloWorldClient in [`AppCalls.tsx`](projects/production_python_react-frontend/src/components/AppCalls.tsx) component by default. ## Next Steps diff --git a/examples/starter_puya_react/starter_puya_react.code-workspace b/examples/production_python_react/production_python_react.code-workspace similarity index 59% rename from examples/starter_puya_react/starter_puya_react.code-workspace rename to examples/production_python_react/production_python_react.code-workspace index 43b2906..a4344b7 100644 --- a/examples/starter_puya_react/starter_puya_react.code-workspace +++ b/examples/production_python_react/production_python_react.code-workspace @@ -5,30 +5,50 @@ "name": "ROOT" }, { - "path": "./projects/starter_puya_react-contracts" + "path": "./projects/production_python_react-contracts" }, { - "path": "./projects/starter_puya_react-frontend" + "path": "./projects/production_python_react-frontend" + }, + { + "path": "." + }, + { + "path": "projects/production_python_react-frontend" + }, + { + "path": "projects/production_python_react-contracts" + }, + { + "path": "." } ], "settings": { "files.exclude": { "projects/": true }, - "jest.disabledWorkspaceFolders": ["ROOT", "projects"], + "jest.disabledWorkspaceFolders": [ + "ROOT", + "projects" + ], "dotenv.enableAutocloaking": false }, "extensions": { - "recommendations": ["joshx.workspace-terminals"] + "recommendations": [ + "joshx.workspace-terminals" + ] }, - "tasks": { "version": "2.0.0", "tasks": [ { "label": "Build artifacts (+ LocalNet)", "command": "algokit", - "args": ["project", "run", "build"], + "args": [ + "project", + "run", + "build" + ], "options": { "cwd": "${workspaceFolder}" }, @@ -38,7 +58,10 @@ { "label": "Start AlgoKit LocalNet", "command": "algokit", - "args": ["localnet", "start"], + "args": [ + "localnet", + "start" + ], "type": "shell", "options": { "cwd": "${workspaceFolder}" @@ -56,9 +79,12 @@ "configurations": [ { "name": "Deploy contracts", - "folder": "starter_puya_react-contracts" + "folder": "production_python_react-contracts" }, - { "name": "Run dApp", "folder": "starter_puya_react-frontend" } + { + "name": "Run dApp", + "folder": "production_python_react-frontend" + } ], "presentation": { "hidden": false, @@ -67,4 +93,4 @@ } ] } - } +} \ No newline at end of file diff --git a/examples/production_puya_react/projects/.gitkeep b/examples/production_python_react/projects/.gitkeep similarity index 100% rename from examples/production_puya_react/projects/.gitkeep rename to examples/production_python_react/projects/.gitkeep diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/.algokit.toml b/examples/production_python_react/projects/production_python_react-contracts/.algokit.toml similarity index 94% rename from examples/production_puya_react/projects/production_puya_react-contracts/.algokit.toml rename to examples/production_python_react/projects/production_python_react-contracts/.algokit.toml index be2fe2a..2dd6c6a 100644 --- a/examples/production_puya_react/projects/production_puya_react-contracts/.algokit.toml +++ b/examples/production_python_react/projects/production_python_react-contracts/.algokit.toml @@ -7,7 +7,7 @@ path = ".algokit/generators/create_contract" [project] type = 'contract' -name = 'production_puya_react-contracts' +name = 'production_python_react-contracts' artifacts = 'smart_contracts/artifacts' [project.deploy] @@ -42,7 +42,7 @@ audit-teal = { commands = [ 'algokit task analyze smart_contracts/artifacts --recursive --force --exclude rekey-to --exclude is-updatable --exclude missing-fee-check --exclude is-deletable --exclude can-close-asset --exclude can-close-account --exclude unprotected-deletable --exclude unprotected-updatable', ], description = 'Audit TEAL files' } -# Commands indented for CI only, prefixed with `ci-` by convention +# Commands intented for CI only, prefixed with `ci-` by convention ci-teal-diff = { commands = [ 'git add -N ./smart_contracts/artifacts', 'git diff --exit-code --minimal ./smart_contracts/artifacts', diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/.algokit/generators/create_contract/copier.yaml b/examples/production_python_react/projects/production_python_react-contracts/.algokit/generators/create_contract/copier.yaml similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/.algokit/generators/create_contract/copier.yaml rename to examples/production_python_react/projects/production_python_react-contracts/.algokit/generators/create_contract/copier.yaml diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/.algokit/generators/create_contract/smart_contracts/{{ contract_name }}/contract.py.j2 b/examples/production_python_react/projects/production_python_react-contracts/.algokit/generators/create_contract/smart_contracts/{{ contract_name }}/contract.py.j2 similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/.algokit/generators/create_contract/smart_contracts/{{ contract_name }}/contract.py.j2 rename to examples/production_python_react/projects/production_python_react-contracts/.algokit/generators/create_contract/smart_contracts/{{ contract_name }}/contract.py.j2 diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/.algokit/generators/create_contract/smart_contracts/{{ contract_name }}/deploy_config.py.j2 b/examples/production_python_react/projects/production_python_react-contracts/.algokit/generators/create_contract/smart_contracts/{{ contract_name }}/deploy_config.py.j2 similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/.algokit/generators/create_contract/smart_contracts/{{ contract_name }}/deploy_config.py.j2 rename to examples/production_python_react/projects/production_python_react-contracts/.algokit/generators/create_contract/smart_contracts/{{ contract_name }}/deploy_config.py.j2 diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/.copier-answers.yml b/examples/production_python_react/projects/production_python_react-contracts/.copier-answers.yml similarity index 58% rename from examples/production_puya_react/projects/production_puya_react-contracts/.copier-answers.yml rename to examples/production_python_react/projects/production_python_react-contracts/.copier-answers.yml index 7b85798..f1231f1 100644 --- a/examples/production_puya_react/projects/production_puya_react-contracts/.copier-answers.yml +++ b/examples/production_python_react/projects/production_python_react-contracts/.copier-answers.yml @@ -1,10 +1,10 @@ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY -_commit: 0.5.1-8-g2973caf -_src_path: gh:algorandfoundation/algokit-puya-template +_commit: 0.5.1-11-g49dc5db +_src_path: gh:algorandfoundation/algokit-python-template author_email: None author_name: None contract_name: hello_world deployment_language: python preset_name: production -project_name: production_puya_react-contracts +project_name: production_python_react-contracts diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/.editorconfig b/examples/production_python_react/projects/production_python_react-contracts/.editorconfig similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/.editorconfig rename to examples/production_python_react/projects/production_python_react-contracts/.editorconfig diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/.env.localnet.template b/examples/production_python_react/projects/production_python_react-contracts/.env.localnet.template similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/.env.localnet.template rename to examples/production_python_react/projects/production_python_react-contracts/.env.localnet.template diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/.env.template b/examples/production_python_react/projects/production_python_react-contracts/.env.template similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/.env.template rename to examples/production_python_react/projects/production_python_react-contracts/.env.template diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/.env.testnet.template b/examples/production_python_react/projects/production_python_react-contracts/.env.testnet.template similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/.env.testnet.template rename to examples/production_python_react/projects/production_python_react-contracts/.env.testnet.template diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/.gitattributes b/examples/production_python_react/projects/production_python_react-contracts/.gitattributes similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/.gitattributes rename to examples/production_python_react/projects/production_python_react-contracts/.gitattributes diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/.gitignore b/examples/production_python_react/projects/production_python_react-contracts/.gitignore similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/.gitignore rename to examples/production_python_react/projects/production_python_react-contracts/.gitignore diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/.tours/getting-started-with-your-algokit-project.tour b/examples/production_python_react/projects/production_python_react-contracts/.tours/getting-started-with-your-algokit-project.tour similarity index 99% rename from examples/production_puya_react/projects/production_puya_react-contracts/.tours/getting-started-with-your-algokit-project.tour rename to examples/production_python_react/projects/production_python_react-contracts/.tours/getting-started-with-your-algokit-project.tour index c1309a6..6b593eb 100644 --- a/examples/production_puya_react/projects/production_puya_react-contracts/.tours/getting-started-with-your-algokit-project.tour +++ b/examples/production_python_react/projects/production_python_react-contracts/.tours/getting-started-with-your-algokit-project.tour @@ -50,7 +50,7 @@ { "file": "smart_contracts/__main__.py", "description": "Uncomment the following lines to enable complementary utilities that will generate artifacts required for the [AlgoKit AVM Debugger](https://github.com/algorandfoundation/algokit-avm-vscode-debugger) VSCode plugin available on the [VSCode Extension Marketplace](https://marketplace.visualstudio.com/items?itemName=algorandfoundation.algokit-avm-vscode-debugger). A new folder will be automatically created in the `.algokit` directory with source maps of all TEAL contracts in this workspace, as well as traces that will appear in a folder at the root of the workspace. You can then use the traces as entry points to trigger the debug extension. Make sure to have the `.algokit.toml` file available at the root of the workspace.", - "line": 13 + "line": 15 } ] } diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/.vscode/extensions.json b/examples/production_python_react/projects/production_python_react-contracts/.vscode/extensions.json similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/.vscode/extensions.json rename to examples/production_python_react/projects/production_python_react-contracts/.vscode/extensions.json diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/.vscode/launch.json b/examples/production_python_react/projects/production_python_react-contracts/.vscode/launch.json similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/.vscode/launch.json rename to examples/production_python_react/projects/production_python_react-contracts/.vscode/launch.json diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/.vscode/settings.json b/examples/production_python_react/projects/production_python_react-contracts/.vscode/settings.json similarity index 95% rename from examples/production_puya_react/projects/production_puya_react-contracts/.vscode/settings.json rename to examples/production_python_react/projects/production_python_react-contracts/.vscode/settings.json index 0c2dfec..61681c0 100644 --- a/examples/production_puya_react/projects/production_puya_react-contracts/.vscode/settings.json +++ b/examples/production_python_react/projects/production_python_react-contracts/.vscode/settings.json @@ -17,9 +17,9 @@ "python.defaultInterpreterPath": "${workspaceFolder}/.venv", "[python]": { "editor.codeActionsOnSave": { - "source.fixAll": true, + "source.fixAll": "explicit", // Prevent default import sorting from running; Ruff will sort imports for us anyway - "source.organizeImports": false + "source.organizeImports": "never" }, "editor.defaultFormatter": "ms-python.black-formatter", }, diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/.vscode/tasks.json b/examples/production_python_react/projects/production_python_react-contracts/.vscode/tasks.json similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/.vscode/tasks.json rename to examples/production_python_react/projects/production_python_react-contracts/.vscode/tasks.json diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/README.md b/examples/production_python_react/projects/production_python_react-contracts/README.md similarity index 98% rename from examples/production_puya_react/projects/production_puya_react-contracts/README.md rename to examples/production_python_react/projects/production_python_react-contracts/README.md index b2c1b52..6ede49a 100644 --- a/examples/production_puya_react/projects/production_puya_react-contracts/README.md +++ b/examples/production_python_react/projects/production_python_react-contracts/README.md @@ -1,4 +1,4 @@ -# production_puya_react-contracts +# production_python_react-contracts This project has been generated using AlgoKit. See below for default getting started instructions. @@ -9,8 +9,6 @@ This project has been generated using AlgoKit. See below for default getting sta - [Python 3.12](https://www.python.org/downloads/) or later - [Docker](https://www.docker.com/) (only required for LocalNet) -> Please note `Puya` smart contract development language is currently in alpha / developer preview. It is not recommended for production usage yet. - ### Initial setup 1. Clone this repository locally diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/poetry.toml b/examples/production_python_react/projects/production_python_react-contracts/poetry.toml similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/poetry.toml rename to examples/production_python_react/projects/production_python_react-contracts/poetry.toml diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/pyproject.toml b/examples/production_python_react/projects/production_python_react-contracts/pyproject.toml similarity index 86% rename from examples/production_puya_react/projects/production_puya_react-contracts/pyproject.toml rename to examples/production_python_react/projects/production_python_react-contracts/pyproject.toml index 76baee6..d403d3c 100644 --- a/examples/production_puya_react/projects/production_puya_react-contracts/pyproject.toml +++ b/examples/production_python_react/projects/production_python_react-contracts/pyproject.toml @@ -1,5 +1,5 @@ [tool.poetry] -name = "production_puya_react-contracts" +name = "production_python_react-contracts" version = "0.1.0" description = "Algorand smart contracts" authors = ["None "] @@ -9,7 +9,7 @@ readme = "README.md" python = "^3.12" algokit-utils = "^2.2.0" python-dotenv = "^1.0.0" -puya = "^0" +puya = { git = "https://github.com/algorandfoundation/puya.git" } # TODO: Update this once Puya v1.0.0 is released [tool.poetry.group.dev.dependencies] black = {extras = ["d"], version = "*"} diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/smart_contracts/README.md b/examples/production_python_react/projects/production_python_react-contracts/smart_contracts/README.md similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/smart_contracts/README.md rename to examples/production_python_react/projects/production_python_react-contracts/smart_contracts/README.md diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/smart_contracts/__init__.py b/examples/production_python_react/projects/production_python_react-contracts/smart_contracts/__init__.py similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/smart_contracts/__init__.py rename to examples/production_python_react/projects/production_python_react-contracts/smart_contracts/__init__.py diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/smart_contracts/__main__.py b/examples/production_python_react/projects/production_python_react-contracts/smart_contracts/__main__.py similarity index 82% rename from examples/production_puya_react/projects/production_puya_react-contracts/smart_contracts/__main__.py rename to examples/production_python_react/projects/production_python_react-contracts/smart_contracts/__main__.py index 7db8a69..aa936c9 100644 --- a/examples/production_puya_react/projects/production_puya_react-contracts/smart_contracts/__main__.py +++ b/examples/production_python_react/projects/production_python_react-contracts/smart_contracts/__main__.py @@ -7,6 +7,7 @@ from smart_contracts.config import contracts from smart_contracts.helpers.build import build from smart_contracts.helpers.deploy import deploy +from smart_contracts.helpers.util import find_app_spec_file # Uncomment the following lines to enable auto generation of AVM Debugger compliant sourcemap and simulation trace file. # Learn more about using AlgoKit AVM Debugger to debug your TEAL source codes and inspect various kinds of @@ -32,7 +33,11 @@ def main(action: str) -> None: case "deploy": for contract in contracts: logger.info(f"Deploying app {contract.name}") - app_spec_path = artifact_path / contract.name / "application.json" + output_dir = artifact_path / contract.name + app_spec_file_name = find_app_spec_file(output_dir) + if app_spec_file_name is None: + raise Exception("Could not deploy app, .arc32.json file not found") + app_spec_path = output_dir / app_spec_file_name if contract.deploy: deploy(app_spec_path, contract.deploy) case "all": diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/smart_contracts/config.py b/examples/production_python_react/projects/production_python_react-contracts/smart_contracts/config.py similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/smart_contracts/config.py rename to examples/production_python_react/projects/production_python_react-contracts/smart_contracts/config.py diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/smart_contracts/hello_world/contract.py b/examples/production_python_react/projects/production_python_react-contracts/smart_contracts/hello_world/contract.py similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/smart_contracts/hello_world/contract.py rename to examples/production_python_react/projects/production_python_react-contracts/smart_contracts/hello_world/contract.py diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/smart_contracts/hello_world/deploy_config.py b/examples/production_python_react/projects/production_python_react-contracts/smart_contracts/hello_world/deploy_config.py similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/smart_contracts/hello_world/deploy_config.py rename to examples/production_python_react/projects/production_python_react-contracts/smart_contracts/hello_world/deploy_config.py diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/smart_contracts/helpers/__init__.py b/examples/production_python_react/projects/production_python_react-contracts/smart_contracts/helpers/__init__.py similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/smart_contracts/helpers/__init__.py rename to examples/production_python_react/projects/production_python_react-contracts/smart_contracts/helpers/__init__.py diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/smart_contracts/helpers/build.py b/examples/production_python_react/projects/production_python_react-contracts/smart_contracts/helpers/build.py similarity index 82% rename from examples/production_puya_react/projects/production_puya_react-contracts/smart_contracts/helpers/build.py rename to examples/production_python_react/projects/production_python_react-contracts/smart_contracts/helpers/build.py index 0dad0c8..439af55 100644 --- a/examples/production_puya_react/projects/production_puya_react-contracts/smart_contracts/helpers/build.py +++ b/examples/production_python_react/projects/production_python_react-contracts/smart_contracts/helpers/build.py @@ -3,6 +3,8 @@ from pathlib import Path from shutil import rmtree +from smart_contracts.helpers.util import find_app_spec_file + logger = logging.getLogger(__name__) deployment_extension = "py" @@ -30,12 +32,16 @@ def build(output_dir: Path, contract_path: Path) -> Path: if build_result.returncode: raise Exception(f"Could not build contract:\n{build_result.stdout}") + app_spec_file_name = find_app_spec_file(output_dir) + if app_spec_file_name is None: + raise Exception("Could not generate typed client, .arc32.json file not found") + generate_result = subprocess.run( [ "algokit", "generate", "client", - output_dir / "application.json", + output_dir / app_spec_file_name, "--output", output_dir / f"client.{deployment_extension}", ], @@ -53,4 +59,4 @@ def build(output_dir: Path, contract_path: Path) -> Path: raise Exception( f"Could not generate typed client:\n{generate_result.stdout}" ) - return output_dir / "application.json" + return output_dir / app_spec_file_name diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/smart_contracts/helpers/deploy.py b/examples/production_python_react/projects/production_python_react-contracts/smart_contracts/helpers/deploy.py similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/smart_contracts/helpers/deploy.py rename to examples/production_python_react/projects/production_python_react-contracts/smart_contracts/helpers/deploy.py diff --git a/examples/production_python_react/projects/production_python_react-contracts/smart_contracts/helpers/util.py b/examples/production_python_react/projects/production_python_react-contracts/smart_contracts/helpers/util.py new file mode 100644 index 0000000..6cf7e5b --- /dev/null +++ b/examples/production_python_react/projects/production_python_react-contracts/smart_contracts/helpers/util.py @@ -0,0 +1,8 @@ +from pathlib import Path + + +def find_app_spec_file(output_dir: Path) -> str | None: + for file in output_dir.iterdir(): + if file.is_file() and file.suffixes == [".arc32", ".json"]: + return file.name + return None diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/tests/__init__.py b/examples/production_python_react/projects/production_python_react-contracts/tests/__init__.py similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/tests/__init__.py rename to examples/production_python_react/projects/production_python_react-contracts/tests/__init__.py diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/tests/conftest.py b/examples/production_python_react/projects/production_python_react-contracts/tests/conftest.py similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/tests/conftest.py rename to examples/production_python_react/projects/production_python_react-contracts/tests/conftest.py diff --git a/examples/production_puya_react/projects/production_puya_react-contracts/tests/hello_world_test.py b/examples/production_python_react/projects/production_python_react-contracts/tests/hello_world_test.py similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-contracts/tests/hello_world_test.py rename to examples/production_python_react/projects/production_python_react-contracts/tests/hello_world_test.py diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/.algokit.toml b/examples/production_python_react/projects/production_python_react-frontend/.algokit.toml similarity index 93% rename from examples/production_puya_react/projects/production_puya_react-frontend/.algokit.toml rename to examples/production_python_react/projects/production_python_react-frontend/.algokit.toml index 83fbb02..dab9cbb 100644 --- a/examples/production_puya_react/projects/production_puya_react-frontend/.algokit.toml +++ b/examples/production_python_react/projects/production_python_react-frontend/.algokit.toml @@ -7,7 +7,7 @@ path = ".algokit/generators/import_contract" [project] type = "frontend" -name = 'production_puya_react-frontend' +name = 'production_python_react-frontend' artifacts = "src/contracts" [project.run] diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/.copier-answers.yml b/examples/production_python_react/projects/production_python_react-frontend/.copier-answers.yml similarity index 83% rename from examples/production_puya_react/projects/production_puya_react-frontend/.copier-answers.yml rename to examples/production_python_react/projects/production_python_react-frontend/.copier-answers.yml index 0852ea6..be2b267 100644 --- a/examples/production_puya_react/projects/production_puya_react-frontend/.copier-answers.yml +++ b/examples/production_python_react/projects/production_python_react-frontend/.copier-answers.yml @@ -5,5 +5,5 @@ author_email: None author_name: None cloud_provider: netlify preset_name: production -project_name: production_puya_react-frontend +project_name: production_python_react-frontend diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/.editorconfig b/examples/production_python_react/projects/production_python_react-frontend/.editorconfig similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/.editorconfig rename to examples/production_python_react/projects/production_python_react-frontend/.editorconfig diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/.env.template b/examples/production_python_react/projects/production_python_react-frontend/.env.template similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/.env.template rename to examples/production_python_react/projects/production_python_react-frontend/.env.template diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/.eslintrc b/examples/production_python_react/projects/production_python_react-frontend/.eslintrc similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/.eslintrc rename to examples/production_python_react/projects/production_python_react-frontend/.eslintrc diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/.gitattributes b/examples/production_python_react/projects/production_python_react-frontend/.gitattributes similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/.gitattributes rename to examples/production_python_react/projects/production_python_react-frontend/.gitattributes diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/.gitignore b/examples/production_python_react/projects/production_python_react-frontend/.gitignore similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/.gitignore rename to examples/production_python_react/projects/production_python_react-frontend/.gitignore diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/.prettierignore b/examples/production_python_react/projects/production_python_react-frontend/.prettierignore similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/.prettierignore rename to examples/production_python_react/projects/production_python_react-frontend/.prettierignore diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/.prettierrc.cjs b/examples/production_python_react/projects/production_python_react-frontend/.prettierrc.cjs similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/.prettierrc.cjs rename to examples/production_python_react/projects/production_python_react-frontend/.prettierrc.cjs diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/.vscode/extensions.json b/examples/production_python_react/projects/production_python_react-frontend/.vscode/extensions.json similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/.vscode/extensions.json rename to examples/production_python_react/projects/production_python_react-frontend/.vscode/extensions.json diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/.vscode/launch.json b/examples/production_python_react/projects/production_python_react-frontend/.vscode/launch.json similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/.vscode/launch.json rename to examples/production_python_react/projects/production_python_react-frontend/.vscode/launch.json diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/.vscode/settings.json b/examples/production_python_react/projects/production_python_react-frontend/.vscode/settings.json similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/.vscode/settings.json rename to examples/production_python_react/projects/production_python_react-frontend/.vscode/settings.json diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/.vscode/tasks.json b/examples/production_python_react/projects/production_python_react-frontend/.vscode/tasks.json similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/.vscode/tasks.json rename to examples/production_python_react/projects/production_python_react-frontend/.vscode/tasks.json diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/LICENSE b/examples/production_python_react/projects/production_python_react-frontend/LICENSE similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/LICENSE rename to examples/production_python_react/projects/production_python_react-frontend/LICENSE diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/README.md b/examples/production_python_react/projects/production_python_react-frontend/README.md similarity index 99% rename from examples/production_puya_react/projects/production_puya_react-frontend/README.md rename to examples/production_python_react/projects/production_python_react-frontend/README.md index 327390a..c8cd66e 100644 --- a/examples/production_puya_react/projects/production_puya_react-frontend/README.md +++ b/examples/production_python_react/projects/production_python_react-frontend/README.md @@ -1,4 +1,4 @@ -# production_puya_react-frontend +# production_python_react-frontend This starter React project has been generated using AlgoKit. See below for default getting started instructions. diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/index.html b/examples/production_python_react/projects/production_python_react-frontend/index.html similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/index.html rename to examples/production_python_react/projects/production_python_react-frontend/index.html diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/jest.config.ts b/examples/production_python_react/projects/production_python_react-frontend/jest.config.ts similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/jest.config.ts rename to examples/production_python_react/projects/production_python_react-frontend/jest.config.ts diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/package.json b/examples/production_python_react/projects/production_python_react-frontend/package.json similarity index 97% rename from examples/production_puya_react/projects/production_puya_react-frontend/package.json rename to examples/production_python_react/projects/production_python_react-frontend/package.json index eb6ab75..2e68522 100644 --- a/examples/production_puya_react/projects/production_puya_react-frontend/package.json +++ b/examples/production_python_react/projects/production_python_react-frontend/package.json @@ -1,5 +1,5 @@ { - "name": "production_puya_react-frontend", + "name": "production_python_react-frontend", "version": "0.1.0", "author": { "name": "None", diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/playwright.config.ts b/examples/production_python_react/projects/production_python_react-frontend/playwright.config.ts similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/playwright.config.ts rename to examples/production_python_react/projects/production_python_react-frontend/playwright.config.ts diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/postcss.config.cjs b/examples/production_python_react/projects/production_python_react-frontend/postcss.config.cjs similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/postcss.config.cjs rename to examples/production_python_react/projects/production_python_react-frontend/postcss.config.cjs diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/public/index.html b/examples/production_python_react/projects/production_python_react-frontend/public/index.html similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/public/index.html rename to examples/production_python_react/projects/production_python_react-frontend/public/index.html diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/public/robots.txt b/examples/production_python_react/projects/production_python_react-frontend/public/robots.txt similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/public/robots.txt rename to examples/production_python_react/projects/production_python_react-frontend/public/robots.txt diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/src/App.tsx b/examples/production_python_react/projects/production_python_react-frontend/src/App.tsx similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/src/App.tsx rename to examples/production_python_react/projects/production_python_react-frontend/src/App.tsx diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/src/Home.tsx b/examples/production_python_react/projects/production_python_react-frontend/src/Home.tsx similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/src/Home.tsx rename to examples/production_python_react/projects/production_python_react-frontend/src/Home.tsx diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/src/assets/logo.svg b/examples/production_python_react/projects/production_python_react-frontend/src/assets/logo.svg similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/src/assets/logo.svg rename to examples/production_python_react/projects/production_python_react-frontend/src/assets/logo.svg diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/src/components/Account.tsx b/examples/production_python_react/projects/production_python_react-frontend/src/components/Account.tsx similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/src/components/Account.tsx rename to examples/production_python_react/projects/production_python_react-frontend/src/components/Account.tsx diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/src/components/AppCalls.tsx b/examples/production_python_react/projects/production_python_react-frontend/src/components/AppCalls.tsx similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/src/components/AppCalls.tsx rename to examples/production_python_react/projects/production_python_react-frontend/src/components/AppCalls.tsx diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/src/components/ConnectWallet.tsx b/examples/production_python_react/projects/production_python_react-frontend/src/components/ConnectWallet.tsx similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/src/components/ConnectWallet.tsx rename to examples/production_python_react/projects/production_python_react-frontend/src/components/ConnectWallet.tsx diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/src/components/ErrorBoundary.tsx b/examples/production_python_react/projects/production_python_react-frontend/src/components/ErrorBoundary.tsx similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/src/components/ErrorBoundary.tsx rename to examples/production_python_react/projects/production_python_react-frontend/src/components/ErrorBoundary.tsx diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/src/components/Transact.tsx b/examples/production_python_react/projects/production_python_react-frontend/src/components/Transact.tsx similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/src/components/Transact.tsx rename to examples/production_python_react/projects/production_python_react-frontend/src/components/Transact.tsx diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/src/contracts/README.md b/examples/production_python_react/projects/production_python_react-frontend/src/contracts/README.md similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/src/contracts/README.md rename to examples/production_python_react/projects/production_python_react-frontend/src/contracts/README.md diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/src/interfaces/network.ts b/examples/production_python_react/projects/production_python_react-frontend/src/interfaces/network.ts similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/src/interfaces/network.ts rename to examples/production_python_react/projects/production_python_react-frontend/src/interfaces/network.ts diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/src/main.tsx b/examples/production_python_react/projects/production_python_react-frontend/src/main.tsx similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/src/main.tsx rename to examples/production_python_react/projects/production_python_react-frontend/src/main.tsx diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/src/styles/main.css b/examples/production_python_react/projects/production_python_react-frontend/src/styles/main.css similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/src/styles/main.css rename to examples/production_python_react/projects/production_python_react-frontend/src/styles/main.css diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/src/utils/ellipseAddress.spec.tsx b/examples/production_python_react/projects/production_python_react-frontend/src/utils/ellipseAddress.spec.tsx similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/src/utils/ellipseAddress.spec.tsx rename to examples/production_python_react/projects/production_python_react-frontend/src/utils/ellipseAddress.spec.tsx diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/src/utils/ellipseAddress.ts b/examples/production_python_react/projects/production_python_react-frontend/src/utils/ellipseAddress.ts similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/src/utils/ellipseAddress.ts rename to examples/production_python_react/projects/production_python_react-frontend/src/utils/ellipseAddress.ts diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/src/utils/network/getAlgoClientConfigs.ts b/examples/production_python_react/projects/production_python_react-frontend/src/utils/network/getAlgoClientConfigs.ts similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/src/utils/network/getAlgoClientConfigs.ts rename to examples/production_python_react/projects/production_python_react-frontend/src/utils/network/getAlgoClientConfigs.ts diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/src/vite-env.d.ts b/examples/production_python_react/projects/production_python_react-frontend/src/vite-env.d.ts similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/src/vite-env.d.ts rename to examples/production_python_react/projects/production_python_react-frontend/src/vite-env.d.ts diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/tailwind.config.js b/examples/production_python_react/projects/production_python_react-frontend/tailwind.config.js similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/tailwind.config.js rename to examples/production_python_react/projects/production_python_react-frontend/tailwind.config.js diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/tests/example.spec.ts b/examples/production_python_react/projects/production_python_react-frontend/tests/example.spec.ts similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/tests/example.spec.ts rename to examples/production_python_react/projects/production_python_react-frontend/tests/example.spec.ts diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/tsconfig.json b/examples/production_python_react/projects/production_python_react-frontend/tsconfig.json similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/tsconfig.json rename to examples/production_python_react/projects/production_python_react-frontend/tsconfig.json diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/tsconfig.node.json b/examples/production_python_react/projects/production_python_react-frontend/tsconfig.node.json similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/tsconfig.node.json rename to examples/production_python_react/projects/production_python_react-frontend/tsconfig.node.json diff --git a/examples/production_puya_react/projects/production_puya_react-frontend/vite.config.ts b/examples/production_python_react/projects/production_python_react-frontend/vite.config.ts similarity index 100% rename from examples/production_puya_react/projects/production_puya_react-frontend/vite.config.ts rename to examples/production_python_react/projects/production_python_react-frontend/vite.config.ts diff --git a/examples/production_tealscript_react/production_tealscript_react.code-workspace b/examples/production_tealscript_react/production_tealscript_react.code-workspace index 7783a90..d6c24a8 100644 --- a/examples/production_tealscript_react/production_tealscript_react.code-workspace +++ b/examples/production_tealscript_react/production_tealscript_react.code-workspace @@ -9,19 +9,35 @@ }, { "path": "./projects/production_tealscript_react-frontend" + }, + { + "path": "." + }, + { + "path": "projects/production_tealscript_react-frontend" + }, + { + "path": "projects/production_tealscript_react-contracts" + }, + { + "path": "." } ], "settings": { "files.exclude": { "projects/": true }, - "jest.disabledWorkspaceFolders": ["ROOT", "projects"], + "jest.disabledWorkspaceFolders": [ + "ROOT", + "projects" + ], "dotenv.enableAutocloaking": false }, "extensions": { - "recommendations": ["joshx.workspace-terminals"] + "recommendations": [ + "joshx.workspace-terminals" + ] }, - "tasks": { "version": "2.0.0", "tasks": [] @@ -29,4 +45,4 @@ "launch": { "configurations": [] } - } +} \ No newline at end of file diff --git a/examples/starter_beaker_react/projects/starter_beaker_react-contracts/.algokit.toml b/examples/starter_beaker_react/projects/starter_beaker_react-contracts/.algokit.toml index 2791ca3..a658290 100644 --- a/examples/starter_beaker_react/projects/starter_beaker_react-contracts/.algokit.toml +++ b/examples/starter_beaker_react/projects/starter_beaker_react-contracts/.algokit.toml @@ -21,8 +21,8 @@ environment_secrets = [] [project.run] # Commands intented for use locally and in CI -build = { commands = [ - 'npm run build', +build = { commands = [ + 'poetry run python -m smart_contracts build', ], description = 'Build all smart contracts in the project' } lint = { commands = [ ], description = 'Perform linting' } diff --git a/examples/starter_beaker_react/projects/starter_beaker_react-contracts/.copier-answers.yml b/examples/starter_beaker_react/projects/starter_beaker_react-contracts/.copier-answers.yml index 829a60d..452fc0d 100644 --- a/examples/starter_beaker_react/projects/starter_beaker_react-contracts/.copier-answers.yml +++ b/examples/starter_beaker_react/projects/starter_beaker_react-contracts/.copier-answers.yml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY -_commit: 1.13.1-2-gf28c608 +_commit: 1.13.1-3-g2215bf7 _src_path: gh:algorandfoundation/algokit-beaker-default-template author_email: None author_name: None diff --git a/examples/starter_beaker_react/starter_beaker_react.code-workspace b/examples/starter_beaker_react/starter_beaker_react.code-workspace index 2d67d98..9d6c208 100644 --- a/examples/starter_beaker_react/starter_beaker_react.code-workspace +++ b/examples/starter_beaker_react/starter_beaker_react.code-workspace @@ -9,26 +9,46 @@ }, { "path": "./projects/starter_beaker_react-frontend" + }, + { + "path": "." + }, + { + "path": "projects/starter_beaker_react-frontend" + }, + { + "path": "projects/starter_beaker_react-contracts" + }, + { + "path": "." } ], "settings": { "files.exclude": { "projects/": true }, - "jest.disabledWorkspaceFolders": ["ROOT", "projects"], + "jest.disabledWorkspaceFolders": [ + "ROOT", + "projects" + ], "dotenv.enableAutocloaking": false }, "extensions": { - "recommendations": ["joshx.workspace-terminals"] + "recommendations": [ + "joshx.workspace-terminals" + ] }, - "tasks": { "version": "2.0.0", "tasks": [ { "label": "Build artifacts (+ LocalNet)", "command": "algokit", - "args": ["project", "run", "build"], + "args": [ + "project", + "run", + "build" + ], "options": { "cwd": "${workspaceFolder}" }, @@ -38,7 +58,10 @@ { "label": "Start AlgoKit LocalNet", "command": "algokit", - "args": ["localnet", "start"], + "args": [ + "localnet", + "start" + ], "type": "shell", "options": { "cwd": "${workspaceFolder}" @@ -58,7 +81,10 @@ "name": "Deploy contracts", "folder": "starter_beaker_react-contracts" }, - { "name": "Run dApp", "folder": "starter_beaker_react-frontend" } + { + "name": "Run dApp", + "folder": "starter_beaker_react-frontend" + } ], "presentation": { "hidden": false, @@ -67,4 +93,4 @@ } ] } - } +} \ No newline at end of file diff --git a/examples/starter_puya_react/.algokit.toml b/examples/starter_python_react/.algokit.toml similarity index 59% rename from examples/starter_puya_react/.algokit.toml rename to examples/starter_python_react/.algokit.toml index b0ad929..e147082 100644 --- a/examples/starter_puya_react/.algokit.toml +++ b/examples/starter_python_react/.algokit.toml @@ -6,4 +6,4 @@ type = 'workspace' projects_root_path = 'projects' [project.run] -build = ['starter_puya_react-contracts', 'starter_puya_react-frontend'] +build = ['starter_python_react-contracts', 'starter_python_react-frontend'] diff --git a/examples/starter_puya_react/.copier-answers.yml b/examples/starter_python_react/.copier-answers.yml similarity index 86% rename from examples/starter_puya_react/.copier-answers.yml rename to examples/starter_python_react/.copier-answers.yml index d98b155..388faae 100644 --- a/examples/starter_puya_react/.copier-answers.yml +++ b/examples/starter_python_react/.copier-answers.yml @@ -6,5 +6,5 @@ author_name: None contract_name: hello_world deployment_language: typescript preset_name: starter -project_name: starter_puya_react +project_name: starter_python_react diff --git a/examples/starter_puya_react/.devcontainer.json b/examples/starter_python_react/.devcontainer.json similarity index 100% rename from examples/starter_puya_react/.devcontainer.json rename to examples/starter_python_react/.devcontainer.json diff --git a/examples/starter_puya_react/.editorconfig b/examples/starter_python_react/.editorconfig similarity index 100% rename from examples/starter_puya_react/.editorconfig rename to examples/starter_python_react/.editorconfig diff --git a/examples/starter_puya_react/.gitattributes b/examples/starter_python_react/.gitattributes similarity index 100% rename from examples/starter_puya_react/.gitattributes rename to examples/starter_python_react/.gitattributes diff --git a/examples/starter_puya_react/.gitignore b/examples/starter_python_react/.gitignore similarity index 100% rename from examples/starter_puya_react/.gitignore rename to examples/starter_python_react/.gitignore diff --git a/examples/starter_puya_react/.vscode/launch.json b/examples/starter_python_react/.vscode/launch.json similarity index 100% rename from examples/starter_puya_react/.vscode/launch.json rename to examples/starter_python_react/.vscode/launch.json diff --git a/examples/starter_puya_react/README.md b/examples/starter_python_react/README.md similarity index 69% rename from examples/starter_puya_react/README.md rename to examples/starter_python_react/README.md index ee0d65c..b5c7676 100644 --- a/examples/starter_puya_react/README.md +++ b/examples/starter_python_react/README.md @@ -1,4 +1,4 @@ -# starter_puya_react +# starter_python_react This starter full stack project has been generated using AlgoKit. See below for default getting started instructions. @@ -15,8 +15,8 @@ This starter full stack project has been generated using AlgoKit. See below for - For all projects, it will copy `.env.template` to `.env`. - Run `algokit localnet start` to start a local Algorand network in Docker. If you are using VS Code launch configurations provided by the template, this will be done automatically for you. 3. Open the project and start debugging / developing on: - - [starter_puya_react-contracts](projects/starter_puya_react-contracts/README.md) - Refer to the README for more information on how to work with smart contracts. - - [starter_puya_react-frontend](projects/starter_puya_react-frontend/README.md) - Refer to the README for more information on how to work with the frontend application. + - [starter_python_react-contracts](projects/starter_python_react-contracts/README.md) - Refer to the README for more information on how to work with smart contracts. + - [starter_python_react-frontend](projects/starter_python_react-frontend/README.md) - Refer to the README for more information on how to work with the frontend application. ### Subsequently @@ -38,10 +38,10 @@ It has also been configured to have a productive dev experience out of the box i ## Integrating with smart contracts and application clients -Refer to the [starter_puya_react-contracts](projects/starter_puya_react-contracts/README.md) folder for overview of working with smart contracts, [projects/starter_puya_react-frontend](projects/starter_puya_react-frontend/README.md) for overview of the React project and the [projects/starter_puya_react-frontend/contracts](projects/starter_puya_react-frontend/src/contracts/README.md) folder for README on adding new smart contracts from backend as application clients on your frontend. The templates provided in these folders will help you get started. -When you compile and generate smart contract artifacts, your frontend component will automatically generate typescript application clients from smart contract artifacts and move them to `frontend/src/contracts` folder, see [`generate:app-clients` in package.json](projects/starter_puya_react-frontend/package.json). Afterwards, you are free to import and use them in your frontend application. +Refer to the [starter_python_react-contracts](projects/starter_python_react-contracts/README.md) folder for overview of working with smart contracts, [projects/starter_python_react-frontend](projects/starter_python_react-frontend/README.md) for overview of the React project and the [projects/starter_python_react-frontend/contracts](projects/starter_python_react-frontend/src/contracts/README.md) folder for README on adding new smart contracts from backend as application clients on your frontend. The templates provided in these folders will help you get started. +When you compile and generate smart contract artifacts, your frontend component will automatically generate typescript application clients from smart contract artifacts and move them to `frontend/src/contracts` folder, see [`generate:app-clients` in package.json](projects/starter_python_react-frontend/package.json). Afterwards, you are free to import and use them in your frontend application. -The frontend starter also provides an example of interactions with your HelloWorldClient in [`AppCalls.tsx`](projects/starter_puya_react-frontend/src/components/AppCalls.tsx) component by default. +The frontend starter also provides an example of interactions with your HelloWorldClient in [`AppCalls.tsx`](projects/starter_python_react-frontend/src/components/AppCalls.tsx) component by default. ## Next Steps diff --git a/examples/starter_puya_react/projects/.gitkeep b/examples/starter_python_react/projects/.gitkeep similarity index 100% rename from examples/starter_puya_react/projects/.gitkeep rename to examples/starter_python_react/projects/.gitkeep diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/.algokit.toml b/examples/starter_python_react/projects/starter_python_react-contracts/.algokit.toml similarity index 88% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/.algokit.toml rename to examples/starter_python_react/projects/starter_python_react-contracts/.algokit.toml index 24f1d10..d1d26f7 100644 --- a/examples/starter_puya_react/projects/starter_puya_react-contracts/.algokit.toml +++ b/examples/starter_python_react/projects/starter_python_react-contracts/.algokit.toml @@ -7,7 +7,7 @@ path = ".algokit/generators/create_contract" [project] type = 'contract' -name = 'starter_puya_react-contracts' +name = 'starter_python_react-contracts' artifacts = 'smart_contracts/artifacts' [project.deploy] @@ -21,8 +21,8 @@ environment_secrets = [] [project.run] # Commands intented for use locally and in CI -build = { commands = [ - 'npm run build', +build = { commands = [ + 'poetry run python -m smart_contracts build', ], description = 'Build all smart contracts in the project' } lint = { commands = [ ], description = 'Perform linting' } @@ -31,7 +31,7 @@ audit-teal = { commands = [ 'algokit task analyze smart_contracts/artifacts --recursive --force --exclude rekey-to --exclude is-updatable --exclude missing-fee-check --exclude is-deletable --exclude can-close-asset --exclude can-close-account --exclude unprotected-deletable --exclude unprotected-updatable', ], description = 'Audit TEAL files' } -# Commands indented for CI only, prefixed with `ci-` by convention +# Commands intented for CI only, prefixed with `ci-` by convention ci-teal-diff = { commands = [ 'git add -N ./smart_contracts/artifacts', 'git diff --exit-code --minimal ./smart_contracts/artifacts', diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/.algokit/generators/create_contract/copier.yaml b/examples/starter_python_react/projects/starter_python_react-contracts/.algokit/generators/create_contract/copier.yaml similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/.algokit/generators/create_contract/copier.yaml rename to examples/starter_python_react/projects/starter_python_react-contracts/.algokit/generators/create_contract/copier.yaml diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/.algokit/generators/create_contract/smart_contracts/{{ contract_name }}/contract.py.j2 b/examples/starter_python_react/projects/starter_python_react-contracts/.algokit/generators/create_contract/smart_contracts/{{ contract_name }}/contract.py.j2 similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/.algokit/generators/create_contract/smart_contracts/{{ contract_name }}/contract.py.j2 rename to examples/starter_python_react/projects/starter_python_react-contracts/.algokit/generators/create_contract/smart_contracts/{{ contract_name }}/contract.py.j2 diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/.algokit/generators/create_contract/smart_contracts/{{ contract_name }}/deploy-config.ts.j2 b/examples/starter_python_react/projects/starter_python_react-contracts/.algokit/generators/create_contract/smart_contracts/{{ contract_name }}/deploy-config.ts.j2 similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/.algokit/generators/create_contract/smart_contracts/{{ contract_name }}/deploy-config.ts.j2 rename to examples/starter_python_react/projects/starter_python_react-contracts/.algokit/generators/create_contract/smart_contracts/{{ contract_name }}/deploy-config.ts.j2 diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/.copier-answers.yml b/examples/starter_python_react/projects/starter_python_react-contracts/.copier-answers.yml similarity index 58% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/.copier-answers.yml rename to examples/starter_python_react/projects/starter_python_react-contracts/.copier-answers.yml index 85f7155..c5b1262 100644 --- a/examples/starter_puya_react/projects/starter_puya_react-contracts/.copier-answers.yml +++ b/examples/starter_python_react/projects/starter_python_react-contracts/.copier-answers.yml @@ -1,10 +1,10 @@ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY -_commit: 0.5.1-8-g2973caf -_src_path: gh:algorandfoundation/algokit-puya-template +_commit: 0.5.1-11-g49dc5db +_src_path: gh:algorandfoundation/algokit-python-template author_email: None author_name: None contract_name: hello_world deployment_language: typescript preset_name: starter -project_name: starter_puya_react-contracts +project_name: starter_python_react-contracts diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/.editorconfig b/examples/starter_python_react/projects/starter_python_react-contracts/.editorconfig similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/.editorconfig rename to examples/starter_python_react/projects/starter_python_react-contracts/.editorconfig diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/.env.localnet.template b/examples/starter_python_react/projects/starter_python_react-contracts/.env.localnet.template similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/.env.localnet.template rename to examples/starter_python_react/projects/starter_python_react-contracts/.env.localnet.template diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/.env.template b/examples/starter_python_react/projects/starter_python_react-contracts/.env.template similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/.env.template rename to examples/starter_python_react/projects/starter_python_react-contracts/.env.template diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/.env.testnet.template b/examples/starter_python_react/projects/starter_python_react-contracts/.env.testnet.template similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/.env.testnet.template rename to examples/starter_python_react/projects/starter_python_react-contracts/.env.testnet.template diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/.gitattributes b/examples/starter_python_react/projects/starter_python_react-contracts/.gitattributes similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/.gitattributes rename to examples/starter_python_react/projects/starter_python_react-contracts/.gitattributes diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/.gitignore b/examples/starter_python_react/projects/starter_python_react-contracts/.gitignore similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/.gitignore rename to examples/starter_python_react/projects/starter_python_react-contracts/.gitignore diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/.prettierignore b/examples/starter_python_react/projects/starter_python_react-contracts/.prettierignore similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/.prettierignore rename to examples/starter_python_react/projects/starter_python_react-contracts/.prettierignore diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/.prettierrc.js b/examples/starter_python_react/projects/starter_python_react-contracts/.prettierrc.js similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/.prettierrc.js rename to examples/starter_python_react/projects/starter_python_react-contracts/.prettierrc.js diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/.tours/getting-started-with-your-algokit-project.tour b/examples/starter_python_react/projects/starter_python_react-contracts/.tours/getting-started-with-your-algokit-project.tour similarity index 99% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/.tours/getting-started-with-your-algokit-project.tour rename to examples/starter_python_react/projects/starter_python_react-contracts/.tours/getting-started-with-your-algokit-project.tour index 30f150f..bd27ad2 100644 --- a/examples/starter_puya_react/projects/starter_puya_react-contracts/.tours/getting-started-with-your-algokit-project.tour +++ b/examples/starter_python_react/projects/starter_python_react-contracts/.tours/getting-started-with-your-algokit-project.tour @@ -50,7 +50,7 @@ { "file": "smart_contracts/index.ts", "description": "Uncomment the following lines to enable complementary utilities that will generate artifacts required for the [AlgoKit AVM Debugger](https://github.com/algorandfoundation/algokit-avm-vscode-debugger) VSCode plugin available on the [VSCode Extension Marketplace](https://marketplace.visualstudio.com/items?itemName=algorandfoundation.algokit-avm-vscode-debugger). A new folder will be automatically created in the `.algokit` directory with source maps of all TEAL contracts in this workspace, as well as traces that will appear in a folder at the root of the workspace. You can then use the traces as entry points to trigger the debug extension. Make sure to have the `.algokit.toml` file available at the root of the workspace.", - "line": 13 + "line": 15 } ] } diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/.vscode/extensions.json b/examples/starter_python_react/projects/starter_python_react-contracts/.vscode/extensions.json similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/.vscode/extensions.json rename to examples/starter_python_react/projects/starter_python_react-contracts/.vscode/extensions.json diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/.vscode/launch.json b/examples/starter_python_react/projects/starter_python_react-contracts/.vscode/launch.json similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/.vscode/launch.json rename to examples/starter_python_react/projects/starter_python_react-contracts/.vscode/launch.json diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/.vscode/settings.json b/examples/starter_python_react/projects/starter_python_react-contracts/.vscode/settings.json similarity index 92% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/.vscode/settings.json rename to examples/starter_python_react/projects/starter_python_react-contracts/.vscode/settings.json index dfae20d..0bffa07 100644 --- a/examples/starter_puya_react/projects/starter_puya_react-contracts/.vscode/settings.json +++ b/examples/starter_python_react/projects/starter_python_react-contracts/.vscode/settings.json @@ -20,9 +20,9 @@ "python.defaultInterpreterPath": "${workspaceFolder}/.venv", "[python]": { "editor.codeActionsOnSave": { - "source.fixAll": true, + "source.fixAll": "explicit", // Prevent default import sorting from running; Ruff will sort imports for us anyway - "source.organizeImports": false + "source.organizeImports": "never" }, "editor.defaultFormatter": null, }, diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/.vscode/tasks.json b/examples/starter_python_react/projects/starter_python_react-contracts/.vscode/tasks.json similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/.vscode/tasks.json rename to examples/starter_python_react/projects/starter_python_react-contracts/.vscode/tasks.json diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/README.md b/examples/starter_python_react/projects/starter_python_react-contracts/README.md similarity index 96% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/README.md rename to examples/starter_python_react/projects/starter_python_react-contracts/README.md index f42a1af..614aba0 100644 --- a/examples/starter_puya_react/projects/starter_puya_react-contracts/README.md +++ b/examples/starter_python_react/projects/starter_python_react-contracts/README.md @@ -1,4 +1,4 @@ -# starter_puya_react-contracts +# starter_python_react-contracts This project has been generated using AlgoKit. See below for default getting started instructions. @@ -9,8 +9,6 @@ This project has been generated using AlgoKit. See below for default getting sta - [Python 3.12](https://www.python.org/downloads/) or later - [Docker](https://www.docker.com/) (only required for LocalNet) -> Please note `Puya` smart contract development language is currently in alpha / developer preview. It is not recommended for production usage yet. - ### Initial setup 1. Clone this repository locally diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/package.json b/examples/starter_python_react/projects/starter_python_react-contracts/package.json similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/package.json rename to examples/starter_python_react/projects/starter_python_react-contracts/package.json diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/poetry.toml b/examples/starter_python_react/projects/starter_python_react-contracts/poetry.toml similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/poetry.toml rename to examples/starter_python_react/projects/starter_python_react-contracts/poetry.toml diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/pyproject.toml b/examples/starter_python_react/projects/starter_python_react-contracts/pyproject.toml similarity index 68% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/pyproject.toml rename to examples/starter_python_react/projects/starter_python_react-contracts/pyproject.toml index 1aad27e..6e32b51 100644 --- a/examples/starter_puya_react/projects/starter_puya_react-contracts/pyproject.toml +++ b/examples/starter_python_react/projects/starter_python_react-contracts/pyproject.toml @@ -1,5 +1,5 @@ [tool.poetry] -name = "starter_puya_react-contracts" +name = "starter_python_react-contracts" version = "0.1.0" description = "Algorand smart contracts" authors = ["None "] @@ -9,7 +9,7 @@ readme = "README.md" python = "^3.12" algokit-utils = "^2.2.0" python-dotenv = "^1.0.0" -puya = "^0" +puya = { git = "https://github.com/algorandfoundation/puya.git" } # TODO: Update this once Puya v1.0.0 is released [tool.poetry.group.dev.dependencies] diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/smart_contracts/README.md b/examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/README.md similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/smart_contracts/README.md rename to examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/README.md diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/smart_contracts/__init__.py b/examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/__init__.py similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/smart_contracts/__init__.py rename to examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/__init__.py diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/smart_contracts/__main__.py b/examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/__main__.py similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/smart_contracts/__main__.py rename to examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/__main__.py diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/smart_contracts/config.py b/examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/config.py similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/smart_contracts/config.py rename to examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/config.py diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/smart_contracts/hello_world/contract.py b/examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/hello_world/contract.py similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/smart_contracts/hello_world/contract.py rename to examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/hello_world/contract.py diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/smart_contracts/hello_world/deploy-config.ts b/examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/hello_world/deploy-config.ts similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/smart_contracts/hello_world/deploy-config.ts rename to examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/hello_world/deploy-config.ts diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/smart_contracts/helpers/__init__.py b/examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/helpers/__init__.py similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/smart_contracts/helpers/__init__.py rename to examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/helpers/__init__.py diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/smart_contracts/helpers/build.py b/examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/helpers/build.py similarity index 82% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/smart_contracts/helpers/build.py rename to examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/helpers/build.py index 67377d3..8f68b02 100644 --- a/examples/starter_puya_react/projects/starter_puya_react-contracts/smart_contracts/helpers/build.py +++ b/examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/helpers/build.py @@ -3,6 +3,8 @@ from pathlib import Path from shutil import rmtree +from smart_contracts.helpers.util import find_app_spec_file + logger = logging.getLogger(__name__) deployment_extension = "ts" @@ -30,12 +32,16 @@ def build(output_dir: Path, contract_path: Path) -> Path: if build_result.returncode: raise Exception(f"Could not build contract:\n{build_result.stdout}") + app_spec_file_name = find_app_spec_file(output_dir) + if app_spec_file_name is None: + raise Exception("Could not generate typed client, .arc32.json file not found") + generate_result = subprocess.run( [ "algokit", "generate", "client", - output_dir / "application.json", + output_dir / app_spec_file_name, "--output", output_dir / f"client.{deployment_extension}", ], @@ -53,4 +59,4 @@ def build(output_dir: Path, contract_path: Path) -> Path: raise Exception( f"Could not generate typed client:\n{generate_result.stdout}" ) - return output_dir / "application.json" + return output_dir / app_spec_file_name diff --git a/examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/helpers/util.py b/examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/helpers/util.py new file mode 100644 index 0000000..6cf7e5b --- /dev/null +++ b/examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/helpers/util.py @@ -0,0 +1,8 @@ +from pathlib import Path + + +def find_app_spec_file(output_dir: Path) -> str | None: + for file in output_dir.iterdir(): + if file.is_file() and file.suffixes == [".arc32", ".json"]: + return file.name + return None diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/smart_contracts/index.ts b/examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/index.ts similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/smart_contracts/index.ts rename to examples/starter_python_react/projects/starter_python_react-contracts/smart_contracts/index.ts diff --git a/examples/starter_puya_react/projects/starter_puya_react-contracts/tsconfig.json b/examples/starter_python_react/projects/starter_python_react-contracts/tsconfig.json similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-contracts/tsconfig.json rename to examples/starter_python_react/projects/starter_python_react-contracts/tsconfig.json diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/.algokit.toml b/examples/starter_python_react/projects/starter_python_react-frontend/.algokit.toml similarity index 91% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/.algokit.toml rename to examples/starter_python_react/projects/starter_python_react-frontend/.algokit.toml index 9885596..b6e511c 100644 --- a/examples/starter_puya_react/projects/starter_puya_react-frontend/.algokit.toml +++ b/examples/starter_python_react/projects/starter_python_react-frontend/.algokit.toml @@ -7,7 +7,7 @@ path = ".algokit/generators/import_contract" [project] type = "frontend" -name = 'starter_puya_react-frontend' +name = 'starter_python_react-frontend' artifacts = "src/contracts" [project.run] diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/.copier-answers.yml b/examples/starter_python_react/projects/starter_python_react-frontend/.copier-answers.yml similarity index 83% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/.copier-answers.yml rename to examples/starter_python_react/projects/starter_python_react-frontend/.copier-answers.yml index a9d7914..bf05764 100644 --- a/examples/starter_puya_react/projects/starter_puya_react-frontend/.copier-answers.yml +++ b/examples/starter_python_react/projects/starter_python_react-frontend/.copier-answers.yml @@ -4,5 +4,5 @@ _src_path: gh:algorandfoundation/algokit-react-frontend-template author_email: None author_name: None preset_name: starter -project_name: starter_puya_react-frontend +project_name: starter_python_react-frontend diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/.env.template b/examples/starter_python_react/projects/starter_python_react-frontend/.env.template similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/.env.template rename to examples/starter_python_react/projects/starter_python_react-frontend/.env.template diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/.gitattributes b/examples/starter_python_react/projects/starter_python_react-frontend/.gitattributes similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/.gitattributes rename to examples/starter_python_react/projects/starter_python_react-frontend/.gitattributes diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/.gitignore b/examples/starter_python_react/projects/starter_python_react-frontend/.gitignore similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/.gitignore rename to examples/starter_python_react/projects/starter_python_react-frontend/.gitignore diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/.vscode/extensions.json b/examples/starter_python_react/projects/starter_python_react-frontend/.vscode/extensions.json similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/.vscode/extensions.json rename to examples/starter_python_react/projects/starter_python_react-frontend/.vscode/extensions.json diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/.vscode/launch.json b/examples/starter_python_react/projects/starter_python_react-frontend/.vscode/launch.json similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/.vscode/launch.json rename to examples/starter_python_react/projects/starter_python_react-frontend/.vscode/launch.json diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/.vscode/settings.json b/examples/starter_python_react/projects/starter_python_react-frontend/.vscode/settings.json similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/.vscode/settings.json rename to examples/starter_python_react/projects/starter_python_react-frontend/.vscode/settings.json diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/.vscode/tasks.json b/examples/starter_python_react/projects/starter_python_react-frontend/.vscode/tasks.json similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/.vscode/tasks.json rename to examples/starter_python_react/projects/starter_python_react-frontend/.vscode/tasks.json diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/LICENSE b/examples/starter_python_react/projects/starter_python_react-frontend/LICENSE similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/LICENSE rename to examples/starter_python_react/projects/starter_python_react-frontend/LICENSE diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/README.md b/examples/starter_python_react/projects/starter_python_react-frontend/README.md similarity index 99% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/README.md rename to examples/starter_python_react/projects/starter_python_react-frontend/README.md index 9fce5e8..59b60b3 100644 --- a/examples/starter_puya_react/projects/starter_puya_react-frontend/README.md +++ b/examples/starter_python_react/projects/starter_python_react-frontend/README.md @@ -1,4 +1,4 @@ -# starter_puya_react-frontend +# starter_python_react-frontend This starter React project has been generated using AlgoKit. See below for default getting started instructions. diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/index.html b/examples/starter_python_react/projects/starter_python_react-frontend/index.html similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/index.html rename to examples/starter_python_react/projects/starter_python_react-frontend/index.html diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/package.json b/examples/starter_python_react/projects/starter_python_react-frontend/package.json similarity index 96% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/package.json rename to examples/starter_python_react/projects/starter_python_react-frontend/package.json index 6420916..5f5b7c0 100644 --- a/examples/starter_puya_react/projects/starter_puya_react-frontend/package.json +++ b/examples/starter_python_react/projects/starter_python_react-frontend/package.json @@ -1,5 +1,5 @@ { - "name": "starter_puya_react-frontend", + "name": "starter_python_react-frontend", "version": "0.1.0", "author": { "name": "None", diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/public/index.html b/examples/starter_python_react/projects/starter_python_react-frontend/public/index.html similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/public/index.html rename to examples/starter_python_react/projects/starter_python_react-frontend/public/index.html diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/public/robots.txt b/examples/starter_python_react/projects/starter_python_react-frontend/public/robots.txt similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/public/robots.txt rename to examples/starter_python_react/projects/starter_python_react-frontend/public/robots.txt diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/src/App.tsx b/examples/starter_python_react/projects/starter_python_react-frontend/src/App.tsx similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/src/App.tsx rename to examples/starter_python_react/projects/starter_python_react-frontend/src/App.tsx diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/src/Home.tsx b/examples/starter_python_react/projects/starter_python_react-frontend/src/Home.tsx similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/src/Home.tsx rename to examples/starter_python_react/projects/starter_python_react-frontend/src/Home.tsx diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/src/assets/logo.svg b/examples/starter_python_react/projects/starter_python_react-frontend/src/assets/logo.svg similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/src/assets/logo.svg rename to examples/starter_python_react/projects/starter_python_react-frontend/src/assets/logo.svg diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/src/components/Account.tsx b/examples/starter_python_react/projects/starter_python_react-frontend/src/components/Account.tsx similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/src/components/Account.tsx rename to examples/starter_python_react/projects/starter_python_react-frontend/src/components/Account.tsx diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/src/components/AppCalls.tsx b/examples/starter_python_react/projects/starter_python_react-frontend/src/components/AppCalls.tsx similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/src/components/AppCalls.tsx rename to examples/starter_python_react/projects/starter_python_react-frontend/src/components/AppCalls.tsx diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/src/components/ConnectWallet.tsx b/examples/starter_python_react/projects/starter_python_react-frontend/src/components/ConnectWallet.tsx similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/src/components/ConnectWallet.tsx rename to examples/starter_python_react/projects/starter_python_react-frontend/src/components/ConnectWallet.tsx diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/src/components/ErrorBoundary.tsx b/examples/starter_python_react/projects/starter_python_react-frontend/src/components/ErrorBoundary.tsx similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/src/components/ErrorBoundary.tsx rename to examples/starter_python_react/projects/starter_python_react-frontend/src/components/ErrorBoundary.tsx diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/src/components/Transact.tsx b/examples/starter_python_react/projects/starter_python_react-frontend/src/components/Transact.tsx similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/src/components/Transact.tsx rename to examples/starter_python_react/projects/starter_python_react-frontend/src/components/Transact.tsx diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/src/contracts/README.md b/examples/starter_python_react/projects/starter_python_react-frontend/src/contracts/README.md similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/src/contracts/README.md rename to examples/starter_python_react/projects/starter_python_react-frontend/src/contracts/README.md diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/src/interfaces/network.ts b/examples/starter_python_react/projects/starter_python_react-frontend/src/interfaces/network.ts similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/src/interfaces/network.ts rename to examples/starter_python_react/projects/starter_python_react-frontend/src/interfaces/network.ts diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/src/main.tsx b/examples/starter_python_react/projects/starter_python_react-frontend/src/main.tsx similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/src/main.tsx rename to examples/starter_python_react/projects/starter_python_react-frontend/src/main.tsx diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/src/styles/App.css b/examples/starter_python_react/projects/starter_python_react-frontend/src/styles/App.css similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/src/styles/App.css rename to examples/starter_python_react/projects/starter_python_react-frontend/src/styles/App.css diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/src/utils/ellipseAddress.ts b/examples/starter_python_react/projects/starter_python_react-frontend/src/utils/ellipseAddress.ts similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/src/utils/ellipseAddress.ts rename to examples/starter_python_react/projects/starter_python_react-frontend/src/utils/ellipseAddress.ts diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/src/utils/network/getAlgoClientConfigs.ts b/examples/starter_python_react/projects/starter_python_react-frontend/src/utils/network/getAlgoClientConfigs.ts similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/src/utils/network/getAlgoClientConfigs.ts rename to examples/starter_python_react/projects/starter_python_react-frontend/src/utils/network/getAlgoClientConfigs.ts diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/src/vite-env.d.ts b/examples/starter_python_react/projects/starter_python_react-frontend/src/vite-env.d.ts similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/src/vite-env.d.ts rename to examples/starter_python_react/projects/starter_python_react-frontend/src/vite-env.d.ts diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/tsconfig.json b/examples/starter_python_react/projects/starter_python_react-frontend/tsconfig.json similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/tsconfig.json rename to examples/starter_python_react/projects/starter_python_react-frontend/tsconfig.json diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/tsconfig.node.json b/examples/starter_python_react/projects/starter_python_react-frontend/tsconfig.node.json similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/tsconfig.node.json rename to examples/starter_python_react/projects/starter_python_react-frontend/tsconfig.node.json diff --git a/examples/starter_puya_react/projects/starter_puya_react-frontend/vite.config.ts b/examples/starter_python_react/projects/starter_python_react-frontend/vite.config.ts similarity index 100% rename from examples/starter_puya_react/projects/starter_puya_react-frontend/vite.config.ts rename to examples/starter_python_react/projects/starter_python_react-frontend/vite.config.ts diff --git a/examples/production_puya_react/production_puya_react.code-workspace b/examples/starter_python_react/starter_python_react.code-workspace similarity index 60% rename from examples/production_puya_react/production_puya_react.code-workspace rename to examples/starter_python_react/starter_python_react.code-workspace index 41f5254..26d3f7b 100644 --- a/examples/production_puya_react/production_puya_react.code-workspace +++ b/examples/starter_python_react/starter_python_react.code-workspace @@ -5,30 +5,50 @@ "name": "ROOT" }, { - "path": "./projects/production_puya_react-contracts" + "path": "./projects/starter_python_react-contracts" }, { - "path": "./projects/production_puya_react-frontend" + "path": "./projects/starter_python_react-frontend" + }, + { + "path": "." + }, + { + "path": "projects/starter_python_react-frontend" + }, + { + "path": "projects/starter_python_react-contracts" + }, + { + "path": "." } ], "settings": { "files.exclude": { "projects/": true }, - "jest.disabledWorkspaceFolders": ["ROOT", "projects"], + "jest.disabledWorkspaceFolders": [ + "ROOT", + "projects" + ], "dotenv.enableAutocloaking": false }, "extensions": { - "recommendations": ["joshx.workspace-terminals"] + "recommendations": [ + "joshx.workspace-terminals" + ] }, - "tasks": { "version": "2.0.0", "tasks": [ { "label": "Build artifacts (+ LocalNet)", "command": "algokit", - "args": ["project", "run", "build"], + "args": [ + "project", + "run", + "build" + ], "options": { "cwd": "${workspaceFolder}" }, @@ -38,7 +58,10 @@ { "label": "Start AlgoKit LocalNet", "command": "algokit", - "args": ["localnet", "start"], + "args": [ + "localnet", + "start" + ], "type": "shell", "options": { "cwd": "${workspaceFolder}" @@ -56,9 +79,12 @@ "configurations": [ { "name": "Deploy contracts", - "folder": "production_puya_react-contracts" + "folder": "starter_python_react-contracts" }, - { "name": "Run dApp", "folder": "production_puya_react-frontend" } + { + "name": "Run dApp", + "folder": "starter_python_react-frontend" + } ], "presentation": { "hidden": false, @@ -67,4 +93,4 @@ } ] } - } +} \ No newline at end of file diff --git a/examples/starter_tealscript_react/starter_tealscript_react.code-workspace b/examples/starter_tealscript_react/starter_tealscript_react.code-workspace index a275de9..cf010b1 100644 --- a/examples/starter_tealscript_react/starter_tealscript_react.code-workspace +++ b/examples/starter_tealscript_react/starter_tealscript_react.code-workspace @@ -9,19 +9,35 @@ }, { "path": "./projects/starter_tealscript_react-frontend" + }, + { + "path": "." + }, + { + "path": "projects/starter_tealscript_react-frontend" + }, + { + "path": "projects/starter_tealscript_react-contracts" + }, + { + "path": "." } ], "settings": { "files.exclude": { "projects/": true }, - "jest.disabledWorkspaceFolders": ["ROOT", "projects"], + "jest.disabledWorkspaceFolders": [ + "ROOT", + "projects" + ], "dotenv.enableAutocloaking": false }, "extensions": { - "recommendations": ["joshx.workspace-terminals"] + "recommendations": [ + "joshx.workspace-terminals" + ] }, - "tasks": { "version": "2.0.0", "tasks": [] @@ -29,4 +45,4 @@ "launch": { "configurations": [] } - } +} \ No newline at end of file diff --git a/tests/test_templates.py b/tests/test_templates.py index 5ec9fb2..2200d8e 100644 --- a/tests/test_templates.py +++ b/tests/test_templates.py @@ -322,7 +322,7 @@ def get_answered_questions_from_copier_yaml( return answers -@pytest.mark.parametrize("contract_template", ["puya", "beaker", "tealscript"]) +@pytest.mark.parametrize("contract_template", ["python", "beaker", "tealscript"]) def test_production_preset(contract_template: str, working_dir: Path) -> None: response = run_init( working_dir, @@ -338,7 +338,7 @@ def test_production_preset(contract_template: str, working_dir: Path) -> None: assert response.returncode == 0, response.stdout -@pytest.mark.parametrize("contract_template", ["puya", "beaker", "tealscript"]) +@pytest.mark.parametrize("contract_template", ["python", "beaker", "tealscript"]) def test_starter_preset(contract_template: str, working_dir: Path) -> None: response = run_init( working_dir,