fix: add python-dotenv so .env works without export or sourcing#10
Merged
Conversation
Pinned tags cause the ACA job to run stale code after updates. Using :latest ensures every push is picked up automatically. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Students running `uv run python -m src.pipeline` locally now get env vars loaded automatically from .env — no export prefix needed, no `source .env` workaround, works on macOS/Linux/Windows Git Bash. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Works with source .env, python-dotenv, and docker --env-file. Removes the need to manually export vars before running locally. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
Students on Windows (Git Bash) or running
uv run python -m src.pipelinedirectly hit a confusing issue: env vars in.envaren't visible to Python unless they manuallysource .env(withexportprefix) first. Docker--env-fileworked fine but direct runs didn't.Fix: add
python-dotenvand callload_dotenv()at the top ofpipeline.py. The.envfile format is unchanged — plainVAR=value, noexportneeded.Test plan
uv run python -m src.pipelineloads.envwithout any shell sourcingdocker run --env-file .envstill works (dotenv is a no-op when vars are already set)🤖 Generated with Claude Code