Skip to content

Enhancement: Configurable Environment Settings in utils.sh #52

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Vaibhav701161
Copy link

@Vaibhav701161 Vaibhav701161 commented Mar 19, 2025

fixes: #46

Description:

This PR introduces configurable environment settings in utils.sh by leveraging .env.defaults.example to provide a structured and adaptable configuration approach.

Key Changes:

  • Introduced .env.defaults.example to serve as a reference configuration file
  • Ensured utils.sh dynamically loads environment variables from .env.defaults and .env
  • Improved error handling for missing or malformed environment variables

Why This Change?

Previously, environment variables were hardcoded, leading to inconsistencies when deploying across different environments. With this update, developers can:
✅ Customize environment settings easily
✅ Avoid accidental overwrites of critical variables
✅ Ensure better maintainability and clarity


Testing Performed:

1️⃣ Syntax Validation

bash -n utils.sh

✅ No syntax errors detected

2️⃣ Executable Permission Check

chmod +x utils.sh
ls -l utils.sh

✅ Verified the script has execution permissions

3️⃣ Running the Script

./utils.sh

✅ Expected Output:

[INFO] Loading configuration from .env.defaults
[INFO] Loading configuration overrides from .env

Confirmed successful loading of configuration files

4️⃣ Data Fetching Verification

wget https://cbioportal-datahub.s3.amazonaws.com/lgg_ucsf_2014.tar.gz -O test.tar.gz

✅ Successfully downloaded test data, verifying the script runs as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants