Skip to content

Add vignette and skill ref to reproduce analyses; add user to logged trajectories - #457

Merged
skaltman merged 8 commits into
mainfrom
reproducibility
Oct 28, 2026
Merged

skaltman merged 8 commits into
mainfrom
reproducibility

Conversation

@skaltman

@skaltman skaltman commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Partially addresses #428, although this is probably all we actually need from a reproducibility stance.

Assumes a setup where you have a commons object as in #414, so that PR should merge before this one.

Instead of creating a reproducible R script independent of commons code, this PR assumes that the author reproducing an analysis has access to the commons layers already.

Adds a vignette and skill reference to guide users and their coding agents through the process of pulling in trajectories, extracting their code, and turning it into executable R scripts.

It also assumes there will be a commons$sql() method (or similar) to go along with #414's commons$measure, etc. Ordinary SQL could just be wrapped in a DBI call, but queries could include dictionary references like {{revenue}}, which would need to be resolved. This isn't strictly necessary because the coding agent could just replace references itself.

Also adds a user field to the logged trajectories.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployed to Connect (dogfood.team.pct.posit.it): https://dogfood.team.pct.posit.it/connect/#/apps/d7a36cae-8f27-448b-a478-61b81fbe3942/draft/384092

Deployed from commit f7c41d1.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployed to Connect (connect.staging.pct.posit.it): https://connect.staging.pct.posit.it/connect/#/apps/ad662e1b-5048-4acc-9ad7-f9478c92274e/draft/3949

Deployed from commit f7c41d1.

@skaltman
skaltman marked this pull request as ready for review October 27, 2026 22:04
@skaltman
skaltman requested a review from simonpcouch October 27, 2026 22:05
@skaltman

Copy link
Copy Markdown
Collaborator Author

I didn't rebase on #414 in case it continues to change, but there are a few things to change here once that settles and is merged:

  • Move the session-user capture to wherever stream_async() lives after Split commons() into two #414.
  • Move the docs sentence about recording the session user to wherever the log argument is documented after Split commons() into two #414.
  • Update any vignette links that point to log's docs on the commons() reference page.

# Conflicts:
#	pkg-r/R/commons.R
#	pkg-r/inst/skills/commons/SKILL.md
#	pkg-r/man/commons.Rd
#	pkg-r/tests/testthat/test-commons.R
@simonpcouch simonpcouch linked an issue Oct 28, 2026 that may be closed by this pull request

@simonpcouch simonpcouch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Comment thread pkg-r/R/trajectory-read.R Outdated
Comment thread pkg-r/vignettes/reproducibility.Rmd Outdated
skaltman and others added 2 commits October 28, 2026 10:11
Co-authored-by: Simon P. Couch <simonpatrickcouch@gmail.com>
Co-authored-by: Simon P. Couch <simonpatrickcouch@gmail.com>
@skaltman
skaltman merged commit ed65673 into main Oct 28, 2026
10 checks passed
@skaltman
skaltman deleted the reproducibility branch October 28, 2026 17:40
@github-actions

Copy link
Copy Markdown
Contributor

Cleaned up 7 preview bundle(s) on https://dogfood.team.pct.posit.it: 383337, 383367, 383714, 383736, 384058, 384091, 384092

@github-actions

Copy link
Copy Markdown
Contributor

Cleaned up 7 preview bundle(s) on https://connect.staging.pct.posit.it: 3815, 3823, 3876, 3894, 3932, 3948, 3949

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.

Make calculations transparent and reproducible

2 participants