Skip to content

Commit 4c7ba53

Browse files
authored
chore: removing hardcoded env var loading for localnet (#13)
1 parent bf07f98 commit 4c7ba53

File tree

7 files changed

+14
-7
lines changed
  • examples
    • generators
      • production_python_smart_contract_python/smart_contracts
      • production_python_smart_contract_typescript/smart_contracts
      • starter_python_smart_contract_python/smart_contracts
      • starter_python_smart_contract_typescript/smart_contracts
    • production_python/smart_contracts
    • starter_python/smart_contracts
  • template_content/smart_contracts

7 files changed

+14
-7
lines changed

examples/generators/production_python_smart_contract_python/smart_contracts/__main__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
)
2020
logger = logging.getLogger(__name__)
2121
logger.info("Loading .env")
22+
# For manual script execution (bypassing `algokit project deploy`) with a custom .env,
23+
# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`.
2224
load_dotenv()
23-
load_dotenv(".env.localnet")
2425
root_path = Path(__file__).parent
2526

2627

examples/generators/production_python_smart_contract_typescript/smart_contracts/__main__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
)
1313
logger = logging.getLogger(__name__)
1414
logger.info("Loading .env")
15+
# For manual script execution (bypassing `algokit project deploy`) with a custom .env,
16+
# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`.
1517
load_dotenv()
16-
load_dotenv(".env.localnet")
1718
root_path = Path(__file__).parent
1819

1920

examples/generators/starter_python_smart_contract_python/smart_contracts/__main__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
)
2020
logger = logging.getLogger(__name__)
2121
logger.info("Loading .env")
22+
# For manual script execution (bypassing `algokit project deploy`) with a custom .env,
23+
# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`.
2224
load_dotenv()
23-
load_dotenv(".env.localnet")
2425
root_path = Path(__file__).parent
2526

2627

examples/generators/starter_python_smart_contract_typescript/smart_contracts/__main__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
)
1313
logger = logging.getLogger(__name__)
1414
logger.info("Loading .env")
15+
# For manual script execution (bypassing `algokit project deploy`) with a custom .env,
16+
# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`.
1517
load_dotenv()
16-
load_dotenv(".env.localnet")
1718
root_path = Path(__file__).parent
1819

1920

examples/production_python/smart_contracts/__main__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
)
2020
logger = logging.getLogger(__name__)
2121
logger.info("Loading .env")
22+
# For manual script execution (bypassing `algokit project deploy`) with a custom .env,
23+
# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`.
2224
load_dotenv()
23-
load_dotenv(".env.localnet")
2425
root_path = Path(__file__).parent
2526

2627

examples/starter_python/smart_contracts/__main__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
)
2020
logger = logging.getLogger(__name__)
2121
logger.info("Loading .env")
22+
# For manual script execution (bypassing `algokit project deploy`) with a custom .env,
23+
# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`.
2224
load_dotenv()
23-
load_dotenv(".env.localnet")
2425
root_path = Path(__file__).parent
2526

2627

template_content/smart_contracts/__main__.py.jinja

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ logging.basicConfig(
2121
)
2222
logger = logging.getLogger(__name__)
2323
logger.info("Loading .env")
24+
# For manual script execution (bypassing `algokit project deploy`) with a custom .env,
25+
# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`.
2426
load_dotenv()
25-
load_dotenv(".env.localnet")
2627
root_path = Path(__file__).parent
2728

2829

0 commit comments

Comments
 (0)