Salvage from PR #52: cache path in error message + docstring fixes#91
Merged
Conversation
Salvaged from Matt's PR #52 (the rest of which was either superseded by PR #84's download_xlsx rename, or already on master). - Both 'The raw_data_location provided does not exist' errors now interpolate the actual path so the caller sees exactly what they passed — helps diagnose typos and cwd mistakes. - Clarified the rebuild= docstring with the parenthetical '(redownload, re-unzip, re-convert)'. - Fixed the download_csv docstring that incorrectly described it as downloading a 'zipped csv'. - Fixed a 'is' → 'if' typo in _write_to_format's docstring. Added two regression tests in tests/test_errors.py that assert the offending path appears in the error message for both dynamic_data_compiler and static_table. Co-Authored-By: Claude Opus 4.7 (1M context) <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
Cherry-picks the salvageable bits from Matt's PR #52 that hadn't been picked up by any of the other PRs in the PR-#67 breakdown. Matt's authorship is preserved on the commit.
What landed:
"The raw_data_location provided does not exist"errors now interpolate the actual path — helps diagnose typos and cwd mistakes.rebuild=docstring clarified with(redownload, re-unzip, re-convert).download_csvdocstring no longer incorrectly describes it as downloading a "zipped csv".is→iftypo in_write_to_format's docstring.What was NOT salvaged from PR #52
PR #52 also renamed
download_xl→download_xml. That bit landed differently asdownload_xlsxvia PR #84 (the file is.xlsx, not XML), so the original direction would have been a step backward.Tests
Two new regression tests in
tests/test_errors.pythat assert the offending path appears in the error message — one fordynamic_data_compiler, one forstatic_table.Test plan
uv run pytest tests/test_errors.py— 18/18 passuv run pytest— full suite 409 passed / 1 skipped (no regressions)Closes PR #52 once merged.
🤖 Generated with Claude Code