Repository navigation
fix: preserve multi-digit GCP region numbers - #1439
Open
nawaaaaaAaar wants to merge 2 commits into
Open
nawaaaaaAaar wants to merge 2 commits into
nawaaaaaAaar wants to merge 2 commits into
Conversation
This was referenced Oct 5, 2026
davidberenstein1957
approved these changes
Oct 9, 2026
davidberenstein1957
left a comment
Collaborator
There was a problem hiding this comment.
Looks right: [0-9] to [0-9]+ in geography.py is exactly what europe-west12-a needs, and the test covers it. Fixes #1438. The branch is behind master, a rebase before merge would be good.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1439 +/- ##
=======================================
Coverage 92.07% 92.07%
=======================================
Files 49 49
Lines 5199 5199
=======================================
Hits 4787 4787
Misses 412 412 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Fixes #1438.
Accept all digits in a GCP region number when extracting it from a zone. The current regex truncates
europe-west12toeurope-west1, even though the shipped cloud-impact table has separate entries; this can select the wrong electricity carbon intensity.Verification on Python 3.12.13:
No emissions factors were changed. Cloud metadata tests use mocked provider responses rather than a live GCP account; the package suite uses its existing hardware/API mocks. Web dashboard/API integration and the deliberately excluded visualization module were not exercised.
AI disclosure: autonomously reproduced, implemented, and tested using Perplexity Computer (GPT-6.1). No human review is claimed.
Combined with #1441 and #1443: package suite passed with 695 passes, two skips, three integration cases deselected and twelve subtests passed. PR is open and ready for review; hosted package tests, pre-commit, documentation, packaging and CodeQL require maintainer approval. The PR-size labeler passed but is not a code-verification result.