From fca0def5d5f5dc333fe1bae2153a4a0df849e06d Mon Sep 17 00:00:00 2001 From: Altynbek Orumbayev Date: Tue, 9 Apr 2024 12:41:08 +0200 Subject: [PATCH] chore: removing hardcoded env var loading for localnet --- .../smart_contracts/__main__.py | 3 ++- .../smart_contracts/__main__.py | 3 ++- .../smart_contracts/__main__.py | 3 ++- .../smart_contracts/__main__.py | 3 ++- examples/production_python/smart_contracts/__main__.py | 3 ++- examples/starter_python/smart_contracts/__main__.py | 3 ++- template_content/smart_contracts/__main__.py.jinja | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/examples/generators/production_python_smart_contract_python/smart_contracts/__main__.py b/examples/generators/production_python_smart_contract_python/smart_contracts/__main__.py index 7fab7c9..f14eb5d 100644 --- a/examples/generators/production_python_smart_contract_python/smart_contracts/__main__.py +++ b/examples/generators/production_python_smart_contract_python/smart_contracts/__main__.py @@ -19,8 +19,9 @@ ) logger = logging.getLogger(__name__) logger.info("Loading .env") +# For manual script execution (bypassing `algokit project deploy`) with a custom .env, +# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`. load_dotenv() -load_dotenv(".env.localnet") root_path = Path(__file__).parent diff --git a/examples/generators/production_python_smart_contract_typescript/smart_contracts/__main__.py b/examples/generators/production_python_smart_contract_typescript/smart_contracts/__main__.py index b20300a..cf91c3a 100644 --- a/examples/generators/production_python_smart_contract_typescript/smart_contracts/__main__.py +++ b/examples/generators/production_python_smart_contract_typescript/smart_contracts/__main__.py @@ -12,8 +12,9 @@ ) logger = logging.getLogger(__name__) logger.info("Loading .env") +# For manual script execution (bypassing `algokit project deploy`) with a custom .env, +# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`. load_dotenv() -load_dotenv(".env.localnet") root_path = Path(__file__).parent diff --git a/examples/generators/starter_python_smart_contract_python/smart_contracts/__main__.py b/examples/generators/starter_python_smart_contract_python/smart_contracts/__main__.py index 7fab7c9..f14eb5d 100644 --- a/examples/generators/starter_python_smart_contract_python/smart_contracts/__main__.py +++ b/examples/generators/starter_python_smart_contract_python/smart_contracts/__main__.py @@ -19,8 +19,9 @@ ) logger = logging.getLogger(__name__) logger.info("Loading .env") +# For manual script execution (bypassing `algokit project deploy`) with a custom .env, +# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`. load_dotenv() -load_dotenv(".env.localnet") root_path = Path(__file__).parent diff --git a/examples/generators/starter_python_smart_contract_typescript/smart_contracts/__main__.py b/examples/generators/starter_python_smart_contract_typescript/smart_contracts/__main__.py index b20300a..cf91c3a 100644 --- a/examples/generators/starter_python_smart_contract_typescript/smart_contracts/__main__.py +++ b/examples/generators/starter_python_smart_contract_typescript/smart_contracts/__main__.py @@ -12,8 +12,9 @@ ) logger = logging.getLogger(__name__) logger.info("Loading .env") +# For manual script execution (bypassing `algokit project deploy`) with a custom .env, +# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`. load_dotenv() -load_dotenv(".env.localnet") root_path = Path(__file__).parent diff --git a/examples/production_python/smart_contracts/__main__.py b/examples/production_python/smart_contracts/__main__.py index 7fab7c9..f14eb5d 100644 --- a/examples/production_python/smart_contracts/__main__.py +++ b/examples/production_python/smart_contracts/__main__.py @@ -19,8 +19,9 @@ ) logger = logging.getLogger(__name__) logger.info("Loading .env") +# For manual script execution (bypassing `algokit project deploy`) with a custom .env, +# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`. load_dotenv() -load_dotenv(".env.localnet") root_path = Path(__file__).parent diff --git a/examples/starter_python/smart_contracts/__main__.py b/examples/starter_python/smart_contracts/__main__.py index 7fab7c9..f14eb5d 100644 --- a/examples/starter_python/smart_contracts/__main__.py +++ b/examples/starter_python/smart_contracts/__main__.py @@ -19,8 +19,9 @@ ) logger = logging.getLogger(__name__) logger.info("Loading .env") +# For manual script execution (bypassing `algokit project deploy`) with a custom .env, +# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`. load_dotenv() -load_dotenv(".env.localnet") root_path = Path(__file__).parent diff --git a/template_content/smart_contracts/__main__.py.jinja b/template_content/smart_contracts/__main__.py.jinja index 7ceb007..f40cb95 100644 --- a/template_content/smart_contracts/__main__.py.jinja +++ b/template_content/smart_contracts/__main__.py.jinja @@ -21,8 +21,9 @@ logging.basicConfig( ) logger = logging.getLogger(__name__) logger.info("Loading .env") +# For manual script execution (bypassing `algokit project deploy`) with a custom .env, +# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`. load_dotenv() -load_dotenv(".env.localnet") root_path = Path(__file__).parent