-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
69 lines (47 loc) · 2.42 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# usemh
<!-- badges: start -->
<!-- badges: end -->
The goal of usemh is to ...
## Installation
You can install the development version of `usemh` like so:
``` r
## Don't install this if you don't know how to do so.
```
## Method
Hopefully, it will generate all the boilerplate files for the MH submission of your R package.
```r
library(usemh)
use_mh_method()
```
By default, it will open up the file `methodshub.qmd` automatically (use `use_mh(open = FALSE)` otherwise). Under the hood, `use_mh()` generates all the boilerplate files, namely:
1. `CITATION.cff` - [Citation File Format](https://citation-file-format.github.io/)
2. All the files for (my)Binder integration, e.g. `postBuild`, `install.R`, `apt.txt`, and `runtime.txt`, `install.R`, see the [tutorial preparation guide on this](https://github.com/gesiscss/mh_tutorial?tab=readme-ov-file#binder-compatibility).
3. Initialize a Quarto project (`_quarto.yml`) and `methodshub.qmd` to act as the "README" for the submission
In general, if the R package is already on CRAN, editing `methodshub.qmd` suffices. However, if your package has additional system dependencies, you might need to edit `apt.txt` to add the additional ubuntu packages. Similarly, if the rendering of `methodshub.qmd` needs further R packages, add them in `install.R`.
When submitting the R package to MH, please put `methodshub.qmd` in the "File" field of the submission form.
### Additional information
* For the initial `methodshub.qmd`, information is collected from `DESCRIPTION`. Don't ask me / us the why question about those headings in `methodshub.qmd` for an existing CRAN package.
* For `CITATION.cff`, information is collected from `inst/CITATION` (If available, otherwise generated from `DESCRIPTION`).
* This package is designed to make the boilerplate files affecting neither the existing `README.md` nor the usual `R CMD check`. All of boilerplate files added are tracked in `.RBuildignore`.
* Dig into the source code to study how to undo `usemh::use_mh_method()`.
## Tutorial
To bootstrap a tutorial
```r
use_mh_tutorial_template(title = "A Tutorial on doing everything with LLMs")
```
To add files for Binder compatibility
```r
use_mh_tutorial_utils()
```