fix: restore coverage workflow and README badges - #4
Conversation
Restore the missing coverage gate with a covr-based GitHub Actions workflow and coverage badges, without weakening existing R CMD check or pkgdown jobs. Co-authored-by: bbuchsbaum <bbuchsbaum@users.noreply.github.com>
|
@cursor please revise this before marking it ready for review. The coverage computation is useful, but the current upload step can report a green workflow when the public Codecov evidence is broken, and it mixes an old Codecov action with deprecated singular inputs. Please:
Do not add low-signal tests or weaken any existing gate merely to improve the percentage. |
|
Revised the coverage workflow per your review comments and pushed to the draft PR. Changes in
PR: #4 (still draft) Waiting on CI for head |
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
|
Hosted baseline evidence is now available: 70.18% overall coverage, 250 passes, one legitimate reader-dependent skip, and Codecov upload succeeded. File coverage is download.R 36.14%, datalad.R 38.71%, readers.R 62.96%, and cli.R 64.08%. After making the requested workflow corrections, please add a focused batch of meaningful public-interface tests toward at least 75% overall coverage. Prioritize download error, retry, and atomic-write behavior with mocked external boundaries, then valuable CLI branches. Do not make real network calls, test implementation trivia, add empty assertions, or use skips/nocov to inflate the metric. If 75% cannot be reached cleanly in this PR, report the exact blocker and final percentage rather than gaming it. |
Use checkout@v6, pinned codecov-action v7, upload-artifact@v7, plural Codecov inputs, and strict OIDC upload (fail_ci_if_error) without a token. Report overall covr percent in the job log. Co-authored-by: bbuchsbaum <bbuchsbaum@users.noreply.github.com>
|
@cursor please also act on the measured-coverage follow-up immediately above: add a focused, meaningful test batch toward at least 75% overall, using mocked external boundaries and no metric gaming. Keep the workflow corrections already pushed. Report the final hosted percentage and any honest blocker. |
|
Added a focused, offline test batch and pushed it to the draft PR. New tests
Coverage
PR: #4 (still draft) Waiting on hosted CI ( |
Add mocked HTTPS download tests for atomic write, HTTP/transport failures, retry-then-success, and DataLad-to-S3 fallback, plus CLI coverage for get/cite/meta/doctor/autoupdate without live network I/O. Co-authored-by: bbuchsbaum <bbuchsbaum@users.noreply.github.com>
|
@cursor independent macOS review found a portability failure in the new fixtures. Focused result: 41 passes, one failure at test_download.R line 30. tempfile() returned /var/folders/... while tf_default_config canonicalized cfg root to /private/var/folders/..., so tf_s3_url could not strip the root and the expected relative URL failed. Please construct every filepath in test_download.R from cfg root after tf_default_config returns, not from the pre-normalized root variable. This matches the package cache invariant and avoids changing production code merely for a test alias. Re-run the focused download and cli_coverage tests on macOS if available, keep the tests offline, and report the result. |
|
Fixed the macOS path-alias failure in Change: every fixture filepath is now built from Verification
PR: #4 (still draft) · head |
Avoid macOS /var vs /private/var tempfile alias mismatches by deriving every cache filepath from tf_default_config()$root after normalization. Co-authored-by: bbuchsbaum <bbuchsbaum@users.noreply.github.com>
|
@cursor final hosted evidence on head bb979e1 is green: 80.00% overall coverage, 292 passes, zero failures/warnings, one legitimate reader-dependent skip; strict Codecov OIDC upload succeeded; pkgdown and the full required R-CMD-check matrix passed on macOS, devel, release, and oldrel. Please update the PR body with this exact evidence and mark the PR ready for review. Do not merge it. Note separately that the legacy R workflow fails only because its obsolete R 3.6.3 download returns 404; that is outside this coverage repair. |
|
PR body updated with the hosted evidence for Evidence recorded: 80.00% coverage · 292 passes · 0 failures/warnings · 1 reader-dependent skip · Codecov OIDC upload succeeded · pkgdown + full R-CMD-check matrix green Noted separately: legacy PR: #4 |



Summary
Repairs the portfolio
coverage-badgegate for #3 by restoring missing coverage evidence without changing package APIs or existing scientific/test gates..github/workflows/test-coverage.yamlusing the current portfolio template:actions/checkout@v6, pinnedcodecov/codecov-action@fb8b358…(v7),actions/upload-artifact@v7id-token: write,use_oidc: true, noCODECOV_TOKEN);fail_ci_if_error: trueso a broken public Codecov link fails the gatefiles,plugins); covr coverage + Cobertura retained; overall percent printed in the job logtest-coverageand Codecovhttr2) and valuable CLI branches; download fixtures use canonicalcfg$root(macOS path-alias safe)R-CMD-check/pkgdown/ package semantics unchangedMotivation
Issue #3 reports coverage workflow state
missingon default-branch SHA68a835c. Hosted evidence must turn green after merge.Cache / data implications
None. Coverage runs against the existing offline
inst/extdatatest skeletons; download tests mock HTTPS and never call the public S3 bucket.Hosted evidence (head
bb979e1)pkgdown: passedR-CMD-checkmatrix: passed on macOS, devel, release, and oldrelOut of scope
Legacy workflow
R/build (3.6.3)fails only because its obsolete R 3.6.3 download returns HTTP 404. That is outside this coverage repair (packageDepends: R (>= 4.1.0)).Notes
Issue #3 intentionally left open until the portfolio monitor verifies the merged default-branch SHA and hosted badge/workflow evidence. This PR is ready for review and should not be merged by the agent.