Skip to content

refactoring load_dotenv#182

Open
bmerkle wants to merge 2 commits intomicrosoft:mainfrom
bmerkle:load_dotenv
Open

refactoring load_dotenv#182
bmerkle wants to merge 2 commits intomicrosoft:mainfrom
bmerkle:load_dotenv

Conversation

@bmerkle
Copy link
Contributor

@bmerkle bmerkle commented Feb 3, 2026

  • removed typeagent.aitools.utils.load_dotenv() as duplicated code (s…ee dotenv lib)
  • use dotenv.load_dotenv() instead
  • updated call sites
  • updated .md files

this is the follow up PR to PR#181
it fixes all the remaining places

…ee dotenv lib)

- use dotenv.load_dotenv() instead
- updated call sites
- updated .md files
Copilot AI review requested due to automatic review settings February 3, 2026 23:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the codebase to remove a custom duplicate implementation of load_dotenv() and replace it with the standard python-dotenv library's load_dotenv() function throughout the codebase.

Changes:

  • Removed the custom typeagent.aitools.utils.load_dotenv() function that was duplicating functionality from the dotenv package
  • Updated all call sites across tools, tests, examples, and source code to use from dotenv import load_dotenv and call load_dotenv() directly
  • Updated documentation files to reflect the new usage pattern

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/typeagent/aitools/utils.py Removed the custom load_dotenv() function and its dotenv import
tools/test_email.py Added dotenv import and changed call to standard load_dotenv()
tools/query.py Added dotenv import and changed call to standard load_dotenv()
tools/load_json.py Added dotenv import and changed call to standard load_dotenv()
tools/ingest_vtt.py Added dotenv import, changed call, removed unused utils import
tools/ingest_podcast.py Changed import from typeagent.aitools.utils to dotenv
tools/ingest_email.py Added dotenv import and changed call to standard load_dotenv()
tests/test_utils.py Added dotenv import and changed call to standard load_dotenv()
tests/test_related_terms_index_population.py Changed import from typeagent.aitools.utils to dotenv
tests/test_property_index_population.py Changed import from typeagent.aitools.utils to dotenv
tests/test_message_text_index_population.py Changed import from typeagent.aitools.utils to dotenv
tests/conftest.py Added dotenv import, changed calls, removed unused utils import
src/typeagent/transcripts/README.md Updated documentation to show importing from dotenv package
src/typeagent/mcp/server.py Added dotenv import and changed call to standard load_dotenv()
examples/simple_query_demo.py Changed import from typeagent.aitools.utils to dotenv
docs/env-vars.md Updated reference from typeagent.aitools.utils.load_dotenv() to load_dotenv()
AGENTS.md Updated reference from typeagent.aitools.utils.load_dotenv() to load_dotenv()

@bmerkle
Copy link
Contributor Author

bmerkle commented Feb 4, 2026

@gvanrossum should be ready :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant