Skip to content

Commit 2cb4b48

Browse files
authored
Merge pull request #182 from ThinkR-open/24-rebase3-clean-yourself
24 rebase3 clean yourself
2 parents 58d72f8 + cf8b87a commit 2cb4b48

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+3608
-799
lines changed

.github/workflows/R-CMD-check-HTML5.yaml

-42
This file was deleted.

.github/workflows/R-CMD-check.yaml

+22-66
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
2-
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
44
push:
5-
branches:
6-
- main
7-
- master
8-
- tmate
5+
branches: [main, master]
96
pull_request:
10-
branches:
11-
- main
12-
- master
7+
branches: [main, master]
138

149
name: R-CMD-check
1510

@@ -23,73 +18,34 @@ jobs:
2318
fail-fast: false
2419
matrix:
2520
config:
26-
- {os: macOS-latest, r: 'release'}
21+
- {os: macos-latest, r: 'release'}
2722
- {os: windows-latest, r: 'release'}
28-
- {os: windows-latest, r: 'devel'}
29-
# - {os: windows-latest, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/latest"}
30-
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest", http-user-agent: "R/4.0.0 (ubuntu-20.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
31-
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
32-
- {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
33-
- {os: ubuntu-20.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
34-
- {os: ubuntu-20.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
35-
# - {os: ubuntu-20.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
23+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
24+
- {os: ubuntu-latest, r: 'release'}
25+
- {os: ubuntu-latest, r: 'oldrel-1'}
26+
- {os: ubuntu-20.04, r: '3.6'}
27+
- {os: ubuntu-20.04, r: '3.5'}
3628

3729
env:
38-
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
39-
RSPM: ${{ matrix.config.rspm }}
4030
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
31+
R_KEEP_PKG_SOURCE: yes
4132

4233
steps:
43-
- uses: actions/checkout@v2
34+
- uses: actions/checkout@v3
4435

45-
- uses: r-lib/actions/setup-r@v1
36+
- uses: r-lib/actions/setup-pandoc@v2
37+
38+
- uses: r-lib/actions/setup-r@v2
4639
with:
4740
r-version: ${{ matrix.config.r }}
41+
http-user-agent: ${{ matrix.config.http-user-agent }}
42+
use-public-rspm: true
4843

49-
- uses: r-lib/actions/setup-pandoc@v1
50-
51-
- name: Query dependencies
52-
run: |
53-
install.packages('remotes')
54-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
55-
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
56-
shell: Rscript {0}
57-
58-
- name: Cache R packages
59-
if: runner.os != 'Windows'
60-
uses: actions/cache@v2
44+
- uses: r-lib/actions/setup-r-dependencies@v2
6145
with:
62-
path: ${{ env.R_LIBS_USER }}
63-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
64-
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
65-
66-
- name: Install system dependencies
67-
if: runner.os == 'Linux'
68-
run: |
69-
while read -r cmd
70-
do
71-
eval sudo $cmd
72-
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
73-
74-
- name: Install dependencies
75-
run: |
76-
remotes::install_deps(dependencies = TRUE)
77-
remotes::install_cran("rcmdcheck")
78-
shell: Rscript {0}
79-
80-
# - name: Setup tmate session
81-
# if: runner.os == 'Windows'
82-
# uses: mxschmitt/action-tmate@v3
83-
84-
- name: Check
85-
env:
86-
_R_CHECK_CRAN_INCOMING_REMOTE_: false
87-
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
88-
shell: Rscript {0}
46+
extra-packages: any::rcmdcheck
47+
needs: check
8948

90-
- name: Upload check results
91-
if: failure()
92-
uses: actions/upload-artifact@main
49+
- uses: r-lib/actions/check-r-package@v2
9350
with:
94-
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
95-
path: check
51+
upload-snapshots: true

DESCRIPTION

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: fusen
22
Title: Build a Package from Rmarkdown Files
3-
Version: 0.4.1.9000
3+
Version: 0.5.0.9000
44
Authors@R: c(
55
person("Sebastien", "Rochette", , "[email protected]", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0002-1565-9313")),
@@ -34,7 +34,8 @@ Imports:
3434
tidyr,
3535
tools,
3636
usethis (>= 2.0.0),
37-
utils
37+
utils,
38+
yaml
3839
Suggests:
3940
knitr,
4041
pkgload,
@@ -45,9 +46,9 @@ Suggests:
4546
withr
4647
VignetteBuilder:
4748
knitr
48-
Config/fusen/version: 0.4.1
49-
Config/testthat/edition: 3
49+
Config/fusen/version: 0.5.0.9000
5050
Config/Needs/website: ThinkR-open/thinkrtemplate
51+
Config/testthat/edition: 3
5152
Encoding: UTF-8
5253
Language: en-US
5354
LazyData: true

NAMESPACE

+7
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ export(add_flat_template)
77
export(add_full)
88
export(add_fusen_chunks)
99
export(add_minimal)
10+
export(check_not_registered_files)
11+
export(clean_fusen_files)
1012
export(create_fusen)
13+
export(df_to_config)
1114
export(fill_description)
1215
export(inflate)
1316
export(init_share_on_github)
1417
export(load_flat_functions)
18+
export(register_all_to_config)
1519
importFrom(cli,cat_rule)
1620
importFrom(cli,cli_alert_danger)
1721
importFrom(cli,cli_alert_success)
@@ -23,6 +27,9 @@ importFrom(parsermd,parse_rmd)
2327
importFrom(parsermd,rmd_get_chunk)
2428
importFrom(parsermd,rmd_node_code)
2529
importFrom(stats,na.omit)
30+
importFrom(stats,setNames)
2631
importFrom(stringi,stri_trans_general)
2732
importFrom(tools,file_path_sans_ext)
2833
importFrom(utils,getFromNamespace)
34+
importFrom(utils,read.csv)
35+
importFrom(utils,write.csv)

NEWS.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
1-
# fusen (development version)
1+
# fusen 0.5.0.9000
22

33
## New features
44

5+
### Publish your package website on GitHub
6+
57
- Publish your {fusen} project on a GitHub website with one command: `init_share_on_github()`
68

9+
### List all files created with an `inflate()` in a config file
10+
11+
- `inflate()` creates a "dev/config_fusen.yaml" file to register all files created while inflating the corresponding flat file (First steps in #24)
12+
- Migrate from a non-fusen package or a previous version of {fusen} use with `register_all_to_config()`
13+
- Create or update the config file from a data.frame to list legitimate scripts (even if not associated with a flat file)
14+
15+
### Others
16+
17+
- Allow multiple examples for the same function (#149)
18+
719
## Bug fixes
820

9-
- Fix using `function(` in documentation (#174, @FlorenceMounier)
21+
- Fix for when using word "`function(`" in documentation (#174, @FlorenceMounier)
1022

1123
# fusen 0.4.1
1224

0 commit comments

Comments
 (0)