Open
Conversation
…ee dotenv lib) - use dotenv.load_dotenv() instead - updated call sites - updated .md files
There was a problem hiding this comment.
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 thedotenvpackage - Updated all call sites across tools, tests, examples, and source code to use
from dotenv import load_dotenvand callload_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() |
Contributor
Author
|
@gvanrossum should be ready :-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this is the follow up PR to PR#181
it fixes all the remaining places