Skip to content

Commit

Permalink
chore: renaming puya to python
Browse files Browse the repository at this point in the history
  • Loading branch information
aorumbayev committed Mar 25, 2024
1 parent 8da8fc6 commit 49dc5db
Show file tree
Hide file tree
Showing 226 changed files with 113 additions and 95 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

---

This template provides a production-ready baseline for developing and deploying [Puya](https://github.com/algorand-devrel/puya) smart contracts.
This template provides a production-ready baseline for developing and deploying [Puya](https://github.com/algorandfoundation/puya) smart contracts.

To use it [install AlgoKit](https://github.com/algorandfoundation/algokit-cli#readme) and then either pass in `-t puya` to `algokit init` or select the `puya` template.
To use it [install AlgoKit](https://github.com/algorandfoundation/algokit-cli#readme) and then either pass in `-t python` to `algokit init` or select the `python` template.

This is one of the official templates used by AlgoKit to initialize an Algorand smart contract project. It's a [Copier template](https://copier.readthedocs.io/en/stable/).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ path = ".algokit/generators/create_contract"

[project]
type = 'contract'
name = 'production_puya_smart_contract_python'
name = 'production_python_smart_contract_python'
artifacts = 'smart_contracts/artifacts'

[project.deploy]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ author_name: None
contract_name: hello_world
deployment_language: python
preset_name: production
project_name: production_puya_smart_contract_python
project_name: production_python_smart_contract_python

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release production_puya_smart_contract_python
name: Release production_python_smart_contract_python

on:
workflow_call:
Expand All @@ -8,8 +8,8 @@ on:

jobs:
validate:
name: Validate production_puya_smart_contract_python
uses: ./.github/workflows/production-puya-smart-contract-python-ci.yaml
name: Validate production_python_smart_contract_python
uses: ./.github/workflows/production-python-smart-contract-python-ci.yaml
deploy-testnet:
runs-on: "ubuntu-latest"
needs: validate
Expand All @@ -31,7 +31,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_smart_contract_python'
run: algokit bootstrap all --project-name 'production_python_smart_contract_python'

- name: Configure git
shell: bash
Expand All @@ -40,7 +40,7 @@ jobs:
git config --global user.email "[email protected]" && git config --global user.name "github-actions"
- name: Deploy to testnet
run: algokit deploy testnet --project-name 'production_puya_smart_contract_python'
run: algokit deploy testnet --project-name 'production_python_smart_contract_python'
env:
# This is the account that becomes the creator of the contract
DEPLOYER_MNEMONIC: ${{ secrets.DEPLOYER_MNEMONIC }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Validate production_puya_smart_contract_python
name: Validate production_python_smart_contract_python

on:
workflow_call:
Expand Down Expand Up @@ -27,7 +27,7 @@ jobs:
run: algokit localnet start

- name: Bootstrap dependencies
run: algokit bootstrap all --project-name 'production_puya_smart_contract_python'
run: algokit bootstrap all --project-name 'production_python_smart_contract_python'

- name: Configure git
shell: bash
Expand All @@ -36,25 +36,25 @@ jobs:
git config --global user.email "[email protected]" && git config --global user.name "github-actions"
- name: Audit python dependencies
run: algokit project run audit --project-name 'production_puya_smart_contract_python'
run: algokit project run audit --project-name 'production_python_smart_contract_python'

- name: Lint and format python dependencies
run: algokit project run lint --project-name 'production_puya_smart_contract_python'
run: algokit project run lint --project-name 'production_python_smart_contract_python'

- name: Run tests
shell: bash
run: |
set -o pipefail
algokit project run test --project-name 'production_puya_smart_contract_python'
algokit project run test --project-name 'production_python_smart_contract_python'
- name: Build smart contracts
run: algokit project run build --project-name 'production_puya_smart_contract_python'
run: algokit project run build --project-name 'production_python_smart_contract_python'

- name: Scan TEAL files for issues
run: algokit project run audit-teal --project-name 'production_puya_smart_contract_python'
run: algokit project run audit-teal --project-name 'production_python_smart_contract_python'

- name: Check output stability of the smart contracts
run: algokit project run ci-teal-diff --project-name 'production_puya_smart_contract_python'
run: algokit project run ci-teal-diff --project-name 'production_python_smart_contract_python'

- name: Run deployer against LocalNet
run: algokit project deploy localnet --project-name 'production_puya_smart_contract_python'
run: algokit project deploy localnet --project-name 'production_python_smart_contract_python'

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# production_puya
# production_python_smart_contract_python

This project has been generated using AlgoKit. See below for default getting started instructions.

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "production_puya_smart_contract_python"
name = "production_python_smart_contract_python"
version = "0.1.0"
description = "Algorand smart contracts"
authors = ["None <None>"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ path = ".algokit/generators/create_contract"

[project]
type = 'contract'
name = 'production_puya_smart_contract_typescript'
name = 'production_python_smart_contract_typescript'
artifacts = 'smart_contracts/artifacts'

[project.deploy]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ author_name: None
contract_name: hello_world
deployment_language: typescript
preset_name: production
project_name: production_puya_smart_contract_typescript
project_name: production_python_smart_contract_typescript

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release production_puya_smart_contract_typescript
name: Release production_python_smart_contract_typescript

on:
workflow_call:
Expand All @@ -8,8 +8,8 @@ on:

jobs:
validate:
name: Validate production_puya_smart_contract_typescript
uses: ./.github/workflows/production-puya-smart-contract-typescript-ci.yaml
name: Validate production_python_smart_contract_typescript
uses: ./.github/workflows/production-python-smart-contract-typescript-ci.yaml
deploy-testnet:
runs-on: "ubuntu-latest"
needs: validate
Expand All @@ -31,7 +31,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_smart_contract_typescript'
run: algokit bootstrap all --project-name 'production_python_smart_contract_typescript'

- name: Configure git
shell: bash
Expand All @@ -40,7 +40,7 @@ jobs:
git config --global user.email "[email protected]" && git config --global user.name "github-actions"
- name: Deploy to testnet
run: algokit deploy testnet --project-name 'production_puya_smart_contract_typescript'
run: algokit deploy testnet --project-name 'production_python_smart_contract_typescript'
env:
# This is the account that becomes the creator of the contract
DEPLOYER_MNEMONIC: ${{ secrets.DEPLOYER_MNEMONIC }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Validate production_puya_smart_contract_typescript
name: Validate production_python_smart_contract_typescript

on:
workflow_call:
Expand Down Expand Up @@ -27,7 +27,7 @@ jobs:
run: algokit localnet start

- name: Bootstrap dependencies
run: algokit bootstrap all --project-name 'production_puya_smart_contract_typescript'
run: algokit bootstrap all --project-name 'production_python_smart_contract_typescript'

- name: Configure git
shell: bash
Expand All @@ -36,25 +36,25 @@ jobs:
git config --global user.email "[email protected]" && git config --global user.name "github-actions"
- name: Audit python dependencies
run: algokit project run audit --project-name 'production_puya_smart_contract_typescript'
run: algokit project run audit --project-name 'production_python_smart_contract_typescript'

- name: Lint and format python dependencies
run: algokit project run lint --project-name 'production_puya_smart_contract_typescript'
run: algokit project run lint --project-name 'production_python_smart_contract_typescript'

- name: Run tests
shell: bash
run: |
set -o pipefail
algokit project run test --project-name 'production_puya_smart_contract_typescript'
algokit project run test --project-name 'production_python_smart_contract_typescript'
- name: Build smart contracts
run: algokit project run build --project-name 'production_puya_smart_contract_typescript'
run: algokit project run build --project-name 'production_python_smart_contract_typescript'

- name: Scan TEAL files for issues
run: algokit project run audit-teal --project-name 'production_puya_smart_contract_typescript'
run: algokit project run audit-teal --project-name 'production_python_smart_contract_typescript'

- name: Check output stability of the smart contracts
run: algokit project run ci-teal-diff --project-name 'production_puya_smart_contract_typescript'
run: algokit project run ci-teal-diff --project-name 'production_python_smart_contract_typescript'

- name: Run deployer against LocalNet
run: algokit project deploy localnet --project-name 'production_puya_smart_contract_typescript'
run: algokit project deploy localnet --project-name 'production_python_smart_contract_typescript'

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# production_puya_smart_contract_typescript
# production_python_smart_contract_typescript

This project has been generated using AlgoKit. See below for default getting started instructions.

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "production_puya_smart_contract_typescript"
name = "production_python_smart_contract_typescript"
version = "0.1.0"
description = "Algorand smart contracts"
authors = ["None <None>"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ path = ".algokit/generators/create_contract"

[project]
type = 'contract'
name = 'starter_puya_smart_contract_python'
name = 'starter_python_smart_contract_python'
artifacts = 'smart_contracts/artifacts'

[project.deploy]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ author_name: None
contract_name: hello_world
deployment_language: python
preset_name: starter
project_name: starter_puya_smart_contract_python
project_name: starter_python_smart_contract_python

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# starter_puya
# starter_python_smart_contract_python

This project has been generated using AlgoKit. See below for default getting started instructions.

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "starter_puya_smart_contract_python"
name = "starter_python_smart_contract_python"
version = "0.1.0"
description = "Algorand smart contracts"
authors = ["None <None>"]
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ path = ".algokit/generators/create_contract"

[project]
type = 'contract'
name = 'starter_puya_smart_contract_typescript'
name = 'starter_python_smart_contract_typescript'
artifacts = 'smart_contracts/artifacts'

[project.deploy]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ author_name: None
contract_name: hello_world
deployment_language: typescript
preset_name: starter
project_name: starter_puya_smart_contract_typescript
project_name: starter_python_smart_contract_typescript

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# starter_puya_smart_contract_typescript
# starter_python_smart_contract_typescript

This project has been generated using AlgoKit. See below for default getting started instructions.

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "starter_puya_smart_contract_typescript"
name = "starter_python_smart_contract_typescript"
version = "0.1.0"
description = "Algorand smart contracts"
authors = ["None <None>"]
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit 49dc5db

Please sign in to comment.