Skip to content

PoC: read inputs from GitHub Releases (issue #136) - #137

Draft
lbm364dl wants to merge 1 commit into
mainfrom
poc/github-release-inputs
Draft

PoC: read inputs from GitHub Releases (issue #136)#137
lbm364dl wants to merge 1 commit into
mainfrom
poc/github-release-inputs

Conversation

@lbm364dl

Copy link
Copy Markdown
Collaborator

Draft / proof of concept — not for merge. Demonstrates the GitHub-Releases file-store idea from #136 end to end.

What it does

Adds an opt-in input source that fetches <alias>.parquet from a GitHub release into a local cache, wired into the single .download_pin_paths() choke point (R/github_inputs.R + a 4-line hook in R/read_raw_inputs.R). Default behaviour is unchanged — still the Nextcloud pins board. Enable with:

options(whep.input_source = "github")   # repo/tag also configurable via options or env vars

Data

The 10 inputs build_primary_production() needs were mirrored from the current Nextcloud board to a release in eduaguilera/whep_inputs:

Proof it runs

build_primary_production(start_year = 2015, end_year = 2016) with whep.input_source = "github", cold cache:

  • All 10 inputs fetched from the release assets (216 MB pulled into the whep cache).
  • Output: 91,363 rows, 12 columns, years 2015–2016, sources FAOSTAT_prod (90,680) + LUH2_grassland (683). Ran in ~82 s over the network.

Deliberately out of scope (PoC)

  • Only the parquet download path is routed to GitHub (enough for build_primary_production; whep_read_file's other branches untouched).
  • Fixed release tag instead of the per-alias versioning whep_inputs currently tracks — the versioning-scheme decision from Reconsider input-data hosting: move whep_inputs off the Nextcloud pins board #136 still needs settling.
  • No tests; reads via base download.file rather than piggyback (kept dependency-free for the demo).

Relates to #136.

🤖 Generated with Claude Code

Proof of concept for issue #136. Adds an opt-in input source that
fetches <alias>.parquet from a GitHub release (default repo
eduaguilera/whep_inputs, tag "poc") into a local cache, wired into the
single .download_pin_paths() choke point. Default behaviour is
unchanged (still the Nextcloud pins board); enable with
options(whep.input_source = "github").

Verified end-to-end: build_primary_production(2015, 2016) runs entirely
off the GitHub release (all 10 inputs fetched cold from the release
assets), producing 91,363 rows with the expected schema and source
breakdown.

Not for merge as-is: patches only the parquet download path, uses a
fixed tag rather than per-alias versioning, and has no tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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