Skip to content

Conversation

@amrit110
Copy link
Member

@amrit110 amrit110 commented Nov 4, 2025

This pull request refactors the generation of .env files to be more modular and maintainable by introducing helper functions for building each configuration section and categorizing keys by prefix. It also updates the validation logic and corresponding tests to ensure all required keys are present, including the new WEB_SEARCH_BASE_URL.

Key improvements and changes:

.env file generation refactor:

  • Introduced helper functions (_add_embedding_section, _add_langfuse_section, _add_web_search_section, _add_weaviate_section, _add_other_keys_section) to modularize and organize the construction of different configuration sections in the .env file. These helpers categorize keys by their prefix for cleaner output. [1] [2]
  • The main create_env_file function now filters out metadata fields, categorizes global keys, and uses the new helper functions to assemble the .env file, improving readability and maintainability.

Validation logic update:

  • Updated validate_env_file to include WEB_SEARCH_BASE_URL as a required key, ensuring stricter and more accurate validation of generated .env files.

Test updates:

  • Updated test fixtures in test_cli.py and test_utils.py to include the new required key WEB_SEARCH_BASE_URL, keeping tests in sync with validation requirements. [1] [2]

@amrit110 amrit110 self-assigned this Nov 4, 2025
@amrit110 amrit110 added enhancement New feature or request version Update and bump the version tests Unit or Integration tests labels Nov 4, 2025
@codecov
Copy link

codecov bot commented Nov 4, 2025

Codecov Report

❌ Patch coverage is 81.53846% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.05%. Comparing base (5c0f3fc) to head (f9f10ae).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/aieng_platform_onboard/utils.py 81.53% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #27      +/-   ##
==========================================
- Coverage   82.88%   82.05%   -0.83%     
==========================================
  Files           3        3              
  Lines         409      457      +48     
==========================================
+ Hits          339      375      +36     
- Misses         70       82      +12     

☔ 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.

@amrit110 amrit110 merged commit c4d09b6 into main Nov 4, 2025
4 of 6 checks passed
@amrit110 amrit110 deleted the add_web_search_base_url branch November 4, 2025 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request tests Unit or Integration tests version Update and bump the version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants