问题描述
我正尝试在操作.com/Nelson-Gon/manymodelr"rel =" nofollow noreferrer>软件包.问题在于,软件包 actions 在其设置中使用 remotes
仅安装CRAN软件包.
I was trying to use actions in a package I wrote. The issue is that the package actions uses remotes
in its setup to install CRAN only packages.
由于我正在使用的软件包取决于GitHub上存在的非CRAN软件包,因此覆盖率和R CMD检查均失败.为了避免这种情况,我天真地将其降级为依赖包中的较早版本,但某些功能未导出.我想知道是否有人知道一种解决方法可能会有所帮助(由于他们的 support.md
文件不鼓励这样做,所以我无法在操作时提出问题).
Since the package I am working on depends on a non CRAN package that is present on GitHub, both coverage and R CMD checks fail. I tried to avoid this by naively downgrading to an earlier version of the package in depends but some functions are not exported. I am wondering if someone knows a workaround that might help(I cannot open an issue at actions since their support.md
file discourages this).
推荐答案
一段时间后,我发现一种变通办法,如果您要测试开发版本(如我想要的那样),目前已经足够了.您应该在 check.yaml
文件中包含一个 install_github
命令.这是一个示例:
After some time, I have found a workaround that for now is good enough if you want to test for the development version(like I wanted). You should include an install_github
command in the check.yaml
file. Here's an example:
- name: Install dependencies
run: |
install.packages(c("remotes","testthat"),dependencies=TRUE)
remotes::install_github("tidyverse/dplyr")
remotes::install_cran("covr")
shell: Rscript {0}
以上代码片段修复了我的问题,因为我想依赖将来的 dplyr
版本.您可以查看完整的 yaml
文件此处.
The above snippet fixed my issue because I wanted to depend on a future dplyr
version. You can view the full yaml
file here.
这篇关于使用GitHub包R操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!