Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: patch vscode launch config to account for no .env #34

Merged
merged 2 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
_tasks:
- "echo '==== Successfully generated new .env file 🚀 ===='"

use_generic_env:
type: bool
help: Create generic empty .env file (true) or create a network specific .env.{network_name} file (false).
placeholder: "true"
default: "true"

target_network:
type: str
help: Name of your target network.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@
"module": "smart_contracts",
"cwd": "${workspaceFolder}",
"preLaunchTask": "Start AlgoKit LocalNet",
"envFile": "${workspaceFolder}/.env.localnet"
"env": {
"ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"ALGOD_SERVER": "http://localhost",
"ALGOD_PORT": "4001",
"INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"INDEXER_SERVER": "http://localhost",
"INDEXER_PORT": "8980"
}
},
{
"name": "Deploy contracts",
Expand All @@ -17,7 +24,14 @@
"module": "smart_contracts",
"args": ["deploy"],
"cwd": "${workspaceFolder}",
"envFile": "${workspaceFolder}/.env.localnet"
"env": {
"ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"ALGOD_SERVER": "http://localhost",
"ALGOD_PORT": "4001",
"INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"INDEXER_SERVER": "http://localhost",
"INDEXER_PORT": "8980"
}
},
{
"name": "Build contracts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ Ensure the following pre-requisites are installed and properly configured:
Run the following commands within the project folder:

- **Install Poetry**: Required for Python dependency management. [Installation Guide](https://python-poetry.org/docs/#installation). Verify with `poetry -V` to see version `1.2`+.
- **Setup Project**: Execute `algokit project bootstrap all` to:
- Install dependencies and setup a Python virtual environment in `.venv`.
- Configure '.env' files if needed (see [AlgoKit Generators](#algokit-generators)).
- **Setup Project**: Execute `algokit project bootstrap all` to install dependencies and setup a Python virtual environment in `.venv`.
- **Configure environment**: Execute `algokit generate env-file -a target_network localnet` to create a `.env.localnet` file with default configuration for `localnet`.
- **Start LocalNet**: Use `algokit localnet start` to initiate a local Algorand network.

### Development Workflow
Expand Down Expand Up @@ -74,7 +73,7 @@ By default the template creates a single `HelloWorld` contract under hello_world

### Generate '.env' files

By default the template instance would not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`.
By default the template instance does not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`.

To generate a new `.env` or `.env.{target_network}` file, run `algokit generate env-file`### Continuous Integration / Continuous Deployment (CI/CD)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
_tasks:
- "echo '==== Successfully generated new .env file 🚀 ===='"

use_generic_env:
type: bool
help: Create generic empty .env file (true) or create a network specific .env.{network_name} file (false).
placeholder: "true"
default: "true"

target_network:
type: str
help: Name of your target network.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@
"console": "integratedTerminal",
"skipFiles": ["<node_internals>/**", "node_modules/**"],
"preLaunchTask": "Build contracts (+ LocalNet)",
"envFile": "${workspaceFolder}/.env.localnet"
"env": {
"ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"ALGOD_SERVER": "http://localhost",
"ALGOD_PORT": "4001",
"INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"INDEXER_SERVER": "http://localhost",
"INDEXER_PORT": "8980"
}
},
{
"name": "Deploy contracts",
Expand All @@ -22,7 +29,14 @@
"cwd": "${workspaceFolder}/smart_contracts",
"console": "integratedTerminal",
"skipFiles": ["<node_internals>/**", "node_modules/**"],
"envFile": "${workspaceFolder}/.env.localnet"
"env": {
"ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"ALGOD_SERVER": "http://localhost",
"ALGOD_PORT": "4001",
"INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"INDEXER_SERVER": "http://localhost",
"INDEXER_PORT": "8980"
}
},
{
"name": "Build contracts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ Ensure the following pre-requisites are installed and properly configured:
Run the following commands within the project folder:

- **Install Poetry**: Required for Python dependency management. [Installation Guide](https://python-poetry.org/docs/#installation). Verify with `poetry -V` to see version `1.2`+.
- **Setup Project**: Execute `algokit project bootstrap all` to:
- Install dependencies and setup a Python virtual environment in `.venv`.
- Configure '.env' files if needed (see [AlgoKit Generators](#algokit-generators)).
- **Setup Project**: Execute `algokit project bootstrap all` to install dependencies and setup a Python virtual environment in `.venv`.
- **Configure environment**: Execute `algokit generate env-file -a target_network localnet` to create a `.env.localnet` file with default configuration for `localnet`.
- **Start LocalNet**: Use `algokit localnet start` to initiate a local Algorand network.

### Development Workflow
Expand Down Expand Up @@ -75,7 +74,7 @@ By default the template creates a single `HelloWorld` contract under hello_world

### Generate '.env' files

By default the template instance would not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`.
By default the template instance does not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`.

To generate a new `.env` or `.env.{target_network}` file, run `algokit generate env-file`### Continuous Integration / Continuous Deployment (CI/CD)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
_tasks:
- "echo '==== Successfully generated new .env file 🚀 ===='"

use_generic_env:
type: bool
help: Create generic empty .env file (true) or create a network specific .env.{network_name} file (false).
placeholder: "true"
default: "true"

target_network:
type: str
help: Name of your target network.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@
"module": "smart_contracts",
"cwd": "${workspaceFolder}",
"preLaunchTask": "Start AlgoKit LocalNet",
"envFile": "${workspaceFolder}/.env.localnet"
"env": {
"ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"ALGOD_SERVER": "http://localhost",
"ALGOD_PORT": "4001",
"INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"INDEXER_SERVER": "http://localhost",
"INDEXER_PORT": "8980"
}
},
{
"name": "Deploy contracts",
Expand All @@ -17,7 +24,14 @@
"module": "smart_contracts",
"args": ["deploy"],
"cwd": "${workspaceFolder}",
"envFile": "${workspaceFolder}/.env.localnet"
"env": {
"ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"ALGOD_SERVER": "http://localhost",
"ALGOD_PORT": "4001",
"INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"INDEXER_SERVER": "http://localhost",
"INDEXER_PORT": "8980"
}
},
{
"name": "Build contracts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ Ensure the following pre-requisites are installed and properly configured:
Run the following commands within the project folder:

- **Install Poetry**: Required for Python dependency management. [Installation Guide](https://python-poetry.org/docs/#installation). Verify with `poetry -V` to see version `1.2`+.
- **Setup Project**: Execute `algokit project bootstrap all` to:
- Install dependencies and setup a Python virtual environment in `.venv`.
- Configure '.env' files if needed (see [AlgoKit Generators](#algokit-generators)).
- **Setup Project**: Execute `algokit project bootstrap all` to install dependencies and setup a Python virtual environment in `.venv`.
- **Configure environment**: Execute `algokit generate env-file -a target_network localnet` to create a `.env.localnet` file with default configuration for `localnet`.
- **Start LocalNet**: Use `algokit localnet start` to initiate a local Algorand network.

### Development Workflow
Expand Down Expand Up @@ -74,7 +73,7 @@ By default the template creates a single `HelloWorld` contract under hello_world

### Generate '.env' files

By default the template instance would not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`.
By default the template instance does not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`.

To generate a new `.env` or `.env.{target_network}` file, run `algokit generate env-file`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
_tasks:
- "echo '==== Successfully generated new .env file 🚀 ===='"

use_generic_env:
type: bool
help: Create generic empty .env file (true) or create a network specific .env.{network_name} file (false).
placeholder: "true"
default: "true"

target_network:
type: str
help: Name of your target network.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@
"console": "integratedTerminal",
"skipFiles": ["<node_internals>/**", "node_modules/**"],
"preLaunchTask": "Build contracts (+ LocalNet)",
"envFile": "${workspaceFolder}/.env.localnet"
"env": {
"ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"ALGOD_SERVER": "http://localhost",
"ALGOD_PORT": "4001",
"INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"INDEXER_SERVER": "http://localhost",
"INDEXER_PORT": "8980"
}
},
{
"name": "Deploy contracts",
Expand All @@ -22,7 +29,14 @@
"cwd": "${workspaceFolder}/smart_contracts",
"console": "integratedTerminal",
"skipFiles": ["<node_internals>/**", "node_modules/**"],
"envFile": "${workspaceFolder}/.env.localnet"
"env": {
"ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"ALGOD_SERVER": "http://localhost",
"ALGOD_PORT": "4001",
"INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"INDEXER_SERVER": "http://localhost",
"INDEXER_PORT": "8980"
}
},
{
"name": "Build contracts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ Ensure the following pre-requisites are installed and properly configured:
Run the following commands within the project folder:

- **Install Poetry**: Required for Python dependency management. [Installation Guide](https://python-poetry.org/docs/#installation). Verify with `poetry -V` to see version `1.2`+.
- **Setup Project**: Execute `algokit project bootstrap all` to:
- Install dependencies and setup a Python virtual environment in `.venv`.
- Configure '.env' files if needed (see [AlgoKit Generators](#algokit-generators)).
- **Setup Project**: Execute `algokit project bootstrap all` to install dependencies and setup a Python virtual environment in `.venv`.
- **Configure environment**: Execute `algokit generate env-file -a target_network localnet` to create a `.env.localnet` file with default configuration for `localnet`.
- **Start LocalNet**: Use `algokit localnet start` to initiate a local Algorand network.

### Development Workflow
Expand Down Expand Up @@ -75,7 +74,7 @@ By default the template creates a single `HelloWorld` contract under hello_world

### Generate '.env' files

By default the template instance would not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`.
By default the template instance does not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`.

To generate a new `.env` or `.env.{target_network}` file, run `algokit generate env-file`

Expand Down
18 changes: 16 additions & 2 deletions examples/production_python/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@
"module": "smart_contracts",
"cwd": "${workspaceFolder}",
"preLaunchTask": "Start AlgoKit LocalNet",
"envFile": "${workspaceFolder}/.env.localnet"
"env": {
"ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"ALGOD_SERVER": "http://localhost",
"ALGOD_PORT": "4001",
"INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"INDEXER_SERVER": "http://localhost",
"INDEXER_PORT": "8980"
}
},
{
"name": "Deploy contracts",
Expand All @@ -17,7 +24,14 @@
"module": "smart_contracts",
"args": ["deploy"],
"cwd": "${workspaceFolder}",
"envFile": "${workspaceFolder}/.env.localnet"
"env": {
"ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"ALGOD_SERVER": "http://localhost",
"ALGOD_PORT": "4001",
"INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"INDEXER_SERVER": "http://localhost",
"INDEXER_PORT": "8980"
}
},
{
"name": "Build contracts",
Expand Down
7 changes: 3 additions & 4 deletions examples/production_python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ Ensure the following pre-requisites are installed and properly configured:
Run the following commands within the project folder:

- **Install Poetry**: Required for Python dependency management. [Installation Guide](https://python-poetry.org/docs/#installation). Verify with `poetry -V` to see version `1.2`+.
- **Setup Project**: Execute `algokit project bootstrap all` to:
- Install dependencies and setup a Python virtual environment in `.venv`.
- Configure '.env' files if needed (see [AlgoKit Generators](#algokit-generators)).
- **Setup Project**: Execute `algokit project bootstrap all` to install dependencies and setup a Python virtual environment in `.venv`.
- **Configure environment**: Execute `algokit generate env-file -a target_network localnet` to create a `.env.localnet` file with default configuration for `localnet`.
- **Start LocalNet**: Use `algokit localnet start` to initiate a local Algorand network.

### Development Workflow
Expand Down Expand Up @@ -74,7 +73,7 @@ By default the template creates a single `HelloWorld` contract under hello_world

### Generate '.env' files

By default the template instance would not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`.
By default the template instance does not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`.

To generate a new `.env` or `.env.{target_network}` file, run `algokit generate env-file`### Continuous Integration / Continuous Deployment (CI/CD)

Expand Down
18 changes: 16 additions & 2 deletions examples/starter_python/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@
"module": "smart_contracts",
"cwd": "${workspaceFolder}",
"preLaunchTask": "Start AlgoKit LocalNet",
"envFile": "${workspaceFolder}/.env.localnet"
"env": {
"ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"ALGOD_SERVER": "http://localhost",
"ALGOD_PORT": "4001",
"INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"INDEXER_SERVER": "http://localhost",
"INDEXER_PORT": "8980"
}
},
{
"name": "Deploy contracts",
Expand All @@ -17,7 +24,14 @@
"module": "smart_contracts",
"args": ["deploy"],
"cwd": "${workspaceFolder}",
"envFile": "${workspaceFolder}/.env.localnet"
"env": {
"ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"ALGOD_SERVER": "http://localhost",
"ALGOD_PORT": "4001",
"INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"INDEXER_SERVER": "http://localhost",
"INDEXER_PORT": "8980"
}
},
{
"name": "Build contracts",
Expand Down
7 changes: 3 additions & 4 deletions examples/starter_python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ Ensure the following pre-requisites are installed and properly configured:
Run the following commands within the project folder:

- **Install Poetry**: Required for Python dependency management. [Installation Guide](https://python-poetry.org/docs/#installation). Verify with `poetry -V` to see version `1.2`+.
- **Setup Project**: Execute `algokit project bootstrap all` to:
- Install dependencies and setup a Python virtual environment in `.venv`.
- Configure '.env' files if needed (see [AlgoKit Generators](#algokit-generators)).
- **Setup Project**: Execute `algokit project bootstrap all` to install dependencies and setup a Python virtual environment in `.venv`.
- **Configure environment**: Execute `algokit generate env-file -a target_network localnet` to create a `.env.localnet` file with default configuration for `localnet`.
- **Start LocalNet**: Use `algokit localnet start` to initiate a local Algorand network.

### Development Workflow
Expand Down Expand Up @@ -74,7 +73,7 @@ By default the template creates a single `HelloWorld` contract under hello_world

### Generate '.env' files

By default the template instance would not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`.
By default the template instance does not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`.

To generate a new `.env` or `.env.{target_network}` file, run `algokit generate env-file`

Expand Down
Loading