Repository navigation
fix: EarthView reads GOOGLE_MAPS_API_KEY first - #149
Open
petercorke wants to merge 1 commit into
Open
petercorke wants to merge 1 commit into
petercorke wants to merge 1 commit into
Conversation
EarthView read its key only from GOOGLE_API_KEY, which is also the first name Google's Gemini libraries check, so a user with both a Maps key and a Gemini key could only satisfy one of them. Now GOOGLE_MAPS_API_KEY is checked first, with GOOGLE_API_KEY kept as a fallback so existing setups keep working. The docstring explains the lookup order and recommends restricting the key to the Maps Static API and setting a daily quota. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
19 tasks
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 7 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
4 of 5 tasks
This branch has not been deployed
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
EarthViewread its Google Maps key only fromGOOGLE_API_KEY, which is also the first name Google's Gemini libraries check. A user with both a Maps key and a Gemini key could only satisfy one of them.EarthViewnow checksGOOGLE_MAPS_API_KEYfirst and falls back toGOOGLE_API_KEY, so existing setups keep working. The docstring explains the lookup order and recommends restricting the key to the Maps Static API and setting a daily quota.Related issue
Fixes #125
Checklist
tests/test_image_sources.py -k EarthView, 4 passed against this branch'ssrcTestEarthViewKeycovers preferred key, fallback, explicit key winning, and no key (no network needed)Not run: the full suite (CI does that). This only touches key lookup in
EarthView.__init__and its docstring, so no behaviour changes other than the new first-choice environment variable.🤖 Generated with Claude Code