Repository navigation
Discover sheet names instead of assuming the English default - #2
Closed
pragmabits wants to merge 2 commits into
Closed
pragmabits wants to merge 2 commits into
pragmabits wants to merge 2 commits into
Conversation
The suite assumed the first sheet of a new spreadsheet is called "Sheet1", which only holds for accounts in English. Google names it after the language of the owning account, so the test failed with "Unable to parse range" on any other locale before reaching a single assertion. Read the name from list_sheets instead, which keeps the test passing in English and everywhere else.
The tool docstrings and the README offered "Sheet1" as the example sheet name, which reads as a default and is wrong for every account not in English. Point callers at list_sheets instead, and say plainly on list_sheets itself why the name has to be read rather than guessed.
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.
Problem
The live integration suite assumed the first sheet of a new spreadsheet is called
Sheet1, which only holds for accounts in English. Google names it after the language of the owning account, so on a Portuguese account the sheet isPágina1and the test fails before reaching a single assertion:The tool docstrings and the README offered
"Sheet1"as the example sheet name, which reads as a default. That misleads any LLM driving the server into guessing a name that does not exist outside English accounts.Change
Two commits:
list_sheetsinstead of hardcoding it (12 occurrences). Keeps passing in English, wherelist_sheetssimply returnsSheet1.sheetparameter now points atlist_sheets, andlist_sheetsitself explains why the name has to be read rather than guessed.Notes
create_test_spreadsheet, keeping the diff narrow.test_server_unit.pyalone —"Sheet1"there is synthetic data in fakes, never reaches Google, and works in any locale.