Skip to content

Fix CI failures from PR #17: undefined api_key and missing vignette cache directory#18

Merged
wcurrangroome merged 2 commits into
mainfrom
fix-ci-vignette-failures
Jul 10, 2026
Merged

Fix CI failures from PR #17: undefined api_key and missing vignette cache directory#18
wcurrangroome merged 2 commits into
mainfrom
fix-ci-vignette-failures

Conversation

@wcurrangroome

Copy link
Copy Markdown
Collaborator

The merge of #17 broke both the R-CMD-check and pkgdown workflows on main. Two errors:

  1. object 'api_key' not found: code review and documentation updates #17 rewrote the API-key lookup in get_nhgis_crosswalk() as if (is.null(api_key) || api_key == "") as though api_key were a function parameter, but no such parameter was added (and no caller passes one). This restores the direct Sys.getenv("IPUMS_API_KEY") lookup, which broke both county-crosswalks.Rmd and pkgdown builds.

  2. Cache directory does not exist: crosswalk.Rmd passes file.path(tempdir(), "crosswalk-cache") to get_crosswalk() without creating it, and validate_cache_dir() (added in 39b4429) intentionally errors rather than creating directories. The vignette now creates the directory first.

🤖 Generated with Claude Code

wcurrangroome and others added 2 commits July 10, 2026 12:49
- 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>
@wcurrangroome wcurrangroome merged commit 9f41386 into main Jul 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant