EarthView: read key from GOOGLE_MAPS_API_KEY to avoid clash with Gemini's GOOGLE_API_KEY
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
Review Sources.py and EarthView.__init__, then run the TestEarthViewKey tests in tests/test_image_sources.py. The issue says the change is already implemented on fix/earthview-maps-key-env; rebase on main if needed, open a PR, and check the RVC3 text and notebooks for instructions that still recommend GOOGLE_API_KEY. Done means the PR is opened and those instructions are updated where necessary.
索引モデルが issue の本文から書いたものです。
説明
EarthView reads its Google Maps key only from the GOOGLE_API_KEY environment variable (Sources.py, EarthView.__init__). That is also the first name Google's Gemini libraries (google-genai) check, so anyone with both a Maps key and a Gemini key can only satisfy one of them: whichever key is in GOOGLE_API_KEY, the other tool gets the wrong one.
Proposed fix
Read GOOGLE_MAPS_API_KEY first, falling back to GOOGLE_API_KEY so existing setups keep working:
self.key = os.getenv("GOOGLE_MAPS_API_KEY") or os.getenv("GOOGLE_API_KEY")
and update the docstring to explain the lookup order, recommend GOOGLE_MAPS_API_KEY, and advise restricting the key to the Maps Static API with a daily quota (an unrestricted Maps key that leaks can run up charges).
Status
Implemented and tested on branch fix/earthview-maps-key-env (commit 4e12d1b), not yet opened as a PR:
EarthView.__init__lookup changed as above, docstring updated- 4 new tests in
tests/test_image_sources.py(TestEarthViewKey): Maps key preferred,GOOGLE_API_KEYfallback, explicitkey=wins, no key givesNone; no network access needed tests/test_image_sources.pypasses (13 passed, 20 skipped for optional extras) in a clean venv
Possible follow-up
With no key at all, self.key is None and the failure only shows up later as an HTTP error from Google. A clear error at construction time (or on first grab) naming both environment variables would be friendlier.
To finish
Open a PR from the branch (rebase on main first if it has moved), and update the RVC3 text/notebooks if they tell readers to set GOOGLE_API_KEY.
- 主要言語
- Python
- スター
- 223
- フォーク
- 30
- 平均マージ
- 1時間 4分
- マージ済み PR(30日)
- 9
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
petercorke/machinevision-toolbox-python のほかの issue
-
tech-debt
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
petercorke/machinevision-toolbox-python#122 ·
メンテナーはふだん 1 日以内に返信
-
tech-debt
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
petercorke/machinevision-toolbox-python#119 ·
メンテナーはふだん 1 日以内に返信
-
tech-debt
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
petercorke/machinevision-toolbox-python#117 ·
メンテナーはふだん 1 日以内に返信
-
tech-debt
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
petercorke/machinevision-toolbox-python#115 ·
メンテナーはふだん 1 日以内に返信
-
tech-debt
難易度 4/5 3〜5日 初心者へのやさしさ 62/100
petercorke/machinevision-toolbox-python#113 ·
メンテナーはふだん 1 日以内に返信
petercorke/machinevision-toolbox-python の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Deepak3699/Ai_Mentor#244 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
btclib-org/btclib-node#1880 ·
メンテナーはふだん 1 日以内に返信
-
CONTRIBUTING.md: say how ticketless bug fixes and feature PRs are handled対応中かも @khuisman が今日担当しました。 オープンv0.9.2
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
khuisman/mcp-gee-sweet#941 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
pyjanitor-devs/pyjanitor#1758 ·
メンテナーはふだん 1 日以内に返信
-
bug ready for review
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
odysseus-dev/odysseus#6641 ·
メンテナーはふだん 1 日以内に返信