Command to generate the frontmatter?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Domain
- cli, developer-experience
Research direction
Start by reviewing the existing ir run workflow and the frontmatter documentation linked from the issue; no implementation files or tests are named. Define how an ir add-template command should create the shown template, including package and R-version handling, and how ir run should report missing frontmatter; the feature is done when both workflows are specified and tested.
Written by the indexing model from the issue text.
Description
I might be missing something about the usual workflow when using ir (tbh, I have just quickly tried it), but shouldn't there be a command to automatically generate the frontmatter? I don't think uv has this but they have some kind of automation with uv add --script example.py 'requests<3' 'rich'.
I don't want to type the entire frontmatter or to copy it from the docs every time. It would be nice to have ir add-template script.R (probably with a better command name) that would automatically add this:
#!/usr/bin/env -S ir run
#| packages:
#| - <to fill with packages loaded in the script and their used versions>
#| r-version: ">= <my current R version>"
#| isolated: true
I can then choose to tweak this frontmatter or not. That way, I can take any existing standalone script and instantly add the info used by ir.
I can also imagine ir run giving a message No frontmatter found in <script.R>. Use ir add-template to add one.
- Dominant language
- Rust
- Stars
- 65
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from r-lib/ir
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100