carpentries-incubator / carpentries-incubator/lesson-R-packaging

Execute code chunks

Open
#127 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
5
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Currently all the code chunks in the lesson are set to not evaluate. I assume this is because most of these functions such as `usethis::*` are not idempotent, and will throw errors if you execute them a second time.

However, I think this could be resolved with some thought, for example by generating a new temporary directory for the growing package each time the lesson is built.

The advantage of this would be:
* Better "testing" of the lesson. We will know when a chunk's code is wrong because it will be run and fail
* Better outputs. We can have the chunks print results that match what the user will see when they run the code themselves

Contributor guide

Open the contributing guide

Research direction

No specific file, test, or entry point is named. Begin by locating the lesson's unevaluated code chunks and the process that builds the lesson, then determine how a fresh temporary package directory can be used for each build. Done means the chunks execute successfully, failures expose incorrect lesson code, and outputs match what users see.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
documentation, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.