Fix CI failures from PR #17: undefined api_key and missing vignette cache directory#18
Merged
Merged
Conversation
- get_nhgis_crosswalk() referenced an api_key parameter that was never added to its signature; restore reading the key from IPUMS_API_KEY - crosswalk.Rmd now creates its tempdir cache directory before passing it to get_crosswalk(), which validate_cache_dir() requires to exist Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…I_KEY skip - get_available_crosswalks(): the aiannh target rows were missing a crosswalk_source value, leaving NA and failing the column-type test - test-geoid_lengths.R: the CTData county 2020->2022 path fetches county GEOIDs via tidycensus, which requires CENSUS_API_KEY; split that case into its own test that skips when the key is unset (CI passes the secret but it is currently blank) Co-Authored-By: Claude Fable 5 <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.
The merge of #17 broke both the R-CMD-check and pkgdown workflows on main. Two errors:
object 'api_key' not found: code review and documentation updates #17 rewrote the API-key lookup inget_nhgis_crosswalk()asif (is.null(api_key) || api_key == "")as thoughapi_keywere a function parameter, but no such parameter was added (and no caller passes one). This restores the directSys.getenv("IPUMS_API_KEY")lookup, which broke bothcounty-crosswalks.Rmdand pkgdown builds.Cache directory does not exist:
crosswalk.Rmdpassesfile.path(tempdir(), "crosswalk-cache")toget_crosswalk()without creating it, andvalidate_cache_dir()(added in 39b4429) intentionally errors rather than creating directories. The vignette now creates the directory first.🤖 Generated with Claude Code