knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
Where do you want to set-up checklist
?
checklist
in an existing R package.Go to vignette("getting_started_project", package = "checklist")
when you want to use checklist
on a project.
README
, .gitignore
or LICENSE
.remotes::install_github("inbo/checklist")
.checklist::create_package()
.
You'll need to provide the package name, title, description and maintainer.
Please read the documentation of create_package()
prior to running the function.
The function creates an RStudio project with a the package template in a folder with the name of the package.README.Rmd
file and update the content.
Knit the file and stage the README.Rmd
and README.md
files.x <- checklist::check_package()
.
Fix any issues that arise during the checks.
Repeat the last two steps until you end up with only a single new note about a New submission.checklist::write_checklist(x)
.
This functions can convert some 'new' warnings and notes into 'allowed' warnings and notes.x <- checklist::check_package()
again to check that only 'allowed' warnings and notes remain.
Repeat the last four steps until you get No problems found at the end of the checklist output.git remote add origin git@github.com:inbo/_your_package_name_.git
where you replace _your_package_name_
with the actual repository name.git push -u origin main
.
This will run the checklist test on GitHub for the first time.
An orange circle, green thick mark or red cross will appear next to the latest commit or PR.CODECOV_TOKEN
and the token you copied as value.Go in your package GitHub repository to Settings > Branches.
Add rule for Branch name pattern main
and select the following items and Save changes.
Require status checks to pass before merging
Require branches to be up to date before merging
check package
macOS-latest (release)
ubuntu (oldrel)
ubuntu (devel)
windows (release)
Go in your package GitHub repository to Settings > Pages.
Select Deploy for branch as source, gh-pages
as branch and save the changes.
remotes::install_github("inbo/checklist")
.checklist::setup_package()
.
This will add and/or modify files.
Inspect the modified files,
especially if you are updating to a new checklist version and made some tweaks in the past.x <- checklist::check_package()
and fix any issues.
Repeat this step until you have only issues that are not a problem.
Commit any remaining changes.checklist.yml
with checklist::write_checklist(x)
.
This function will ask you which (if any) of the current allowed warnings and notes you want to keep.
Then it asks which warnings and notes you want to allow.
You'll need to motivate each of them.x <- checklist::check_package()
.
This should run without returning an error.CODECOV_TOKEN
and the token you copied as value.main
and select the following items and Save changes.Require status checks to pass before merging
Require branches to be up to date before merging
check package
macOS (release)
ubuntu (oldrel)
ubuntu (devel)
windows (release)
gh-pages
as branch and save the changes.check package
Sometimes the check package GitHub Action (GHA
) may fail for other reasons than failure of one or more of the checks executed by checklist::check_package()
.
This is likely due to a missing dependency when the action tries to install R packages.
In that case, the GHAs
, check_on_branch.yml
and check_on_main.yml
files need to be modified so the missing dependency can be installed.
To diagnose if this is the case when an action failed, you can follow these steps:
GHA
with a red cross (indicating failure) and click on the details
link.
You will be directed to an overview of all steps that were taken in the action.
The page will scroll automatically to where the final error occurs.ERROR: dependency 'sf' is not available for package 'inborutils'
ERROR: package installation failed
View raw logs
.installing *source* package '<packagename>'
.
Also try searching for error:
, failed
and deb:
.It is likely that you detect that it is actually a dependency R package that failed to install and that this failing installation was due to a missing system dependency.
units
- which is a dependency of sf
- failed to install, because it depended on the system dependency libudunits2-dev
deb:
.
Here is a snippet of what you might see:Configuration failed because libudunits2.so was not found. Try installing:
* deb: libudunits2-dev (Debian, Ubuntu, ...)
* rpm: udunits2-devel (Fedora, EPEL, ...)
* brew: udunits (OSX)
To fix this problem in the check_on_branch.yml
and check_on_main.yml
files, install it with the aptget
command:
``` steps: - uses: inbo/actions/check_pkg@master with: aptget: libudunits2-dev ```
In case you need multiple aptget
dependencies, add them to a single aptget
item separated with a space.
``` steps: - uses: inbo/actions/check_pkg@master with: aptget: libudunits2-dev libpoppler-cpp-dev ```
Add, commit and push these changes so they take effect in the GHAs
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.