Skip to content

Generalize the env vars handling#71

Merged
amrit110 merged 2 commits intomainfrom
improve_env_vars_handling
Feb 20, 2026
Merged

Generalize the env vars handling#71
amrit110 merged 2 commits intomainfrom
improve_env_vars_handling

Conversation

@amrit110
Copy link
Member

This pull request introduces significant improvements to the onboarding CLI tool, focusing on making environment file generation and validation dynamic and template-driven. The changes ensure that the .env file is created and validated based on a provided .env.example template, improving flexibility and reducing hardcoded configuration. The CLI now requires the user to specify the .env.example path, and all relevant logic and tests have been updated accordingly.

Key changes include:

Environment file generation and validation

  • The .env file is now generated by reading the provided .env.example template, preserving its order, comments, and structure, and filling in values from team and global configuration data. This replaces the previous hardcoded section-based approach. [1] [2]
  • Validation of the .env file is now performed against the keys defined in the .env.example template, instead of a hardcoded list, making the process adaptable to different bootcamps or configurations. [1] [2]

CLI interface and argument handling

  • The CLI now requires a new --env-example argument specifying the path to the .env.example template. Argument validation has been updated to enforce this requirement, and related logic ensures the template is used throughout onboarding. [1] [2] [3] [4] [5] [6] [7]

Firestore/global configuration

  • The retrieval of global keys from Firestore is now parameterized by bootcamp_name, allowing for bootcamp-specific global configuration documents rather than a single shared one. [1] [2] [3] [4]

Testing updates

  • Tests have been updated to create and use .env.example files, and to pass the new --env-example argument, ensuring that test coverage matches the new dynamic environment file logic. [1] [2] [3] [4]

Miscellaneous

  • The project version has been bumped from 0.5.4 to 0.6.0 to reflect these breaking and feature changes.

@amrit110 amrit110 self-assigned this Feb 20, 2026
@amrit110 amrit110 added bug Something isn't working enhancement New feature or request tests Unit or Integration tests labels Feb 20, 2026
@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

❌ Patch coverage is 95.45455% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.61%. Comparing base (f1d136a) to head (e6b527f).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/aieng_platform_onboard/utils.py 93.54% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
+ Coverage   89.87%   90.61%   +0.74%     
==========================================
  Files          10       10              
  Lines        1442     1407      -35     
==========================================
- Hits         1296     1275      -21     
+ Misses        146      132      -14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@amrit110 amrit110 merged commit 38bcd2f into main Feb 20, 2026
7 checks passed
@amrit110 amrit110 deleted the improve_env_vars_handling branch February 20, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request tests Unit or Integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant