[英]Workaround to allow badges in package README.md on github but not in CRAN version
R CMD check packagename_0.1.1.tar.gz --as-cran
produces a WARNING
if badges are present in README.md
. R CMD check packagename_0.1.1.tar.gz --as-cran
如果README.md
中存在徽章,则会产生WARNING
。 This causes consequences like travis CI to fail (since it treats warnings as errors)这会导致像 travis CI 这样的结果失败(因为它将警告视为错误)
Is there a workaround to get the check to pass without removing the badges?是否有解决方法可以在不移除徽章的情况下通过检查?
Here is an example of the WARNING
I see这是我看到的
WARNING
一个例子
* checking top-level files ... WARNING
Conversion of ‘README.md’ failed:
pandoc: Could not fetch https://www.r-pkg.org/badges/version/bigrquery
TlsExceptionHostPort (HandshakeFailed (Error_Misc "user error (unexpected type received. expecting handshake and got: Alert [(AlertLevel_Fatal,HandshakeFailure)])")) "www.r-pkg.org" 443
Related: pandoc: Could not fetch http://www.r-pkg.org/badges/version/package TlsExceptionHostPort (HandshakeFailed相关: pandoc:无法获取 http://www.r-pkg.org/badges/version/package TlsExceptionHostPort (HandshakeFailed
This is a workaround to embed (static) badges in pages.这是在页面中嵌入(静态)徽章的解决方法。 They do not auto-update.
它们不会自动更新。 The purpose is to avoid offline derived errors.
目的是避免离线导出错误。
Take a look at readme files in: https://gitlab.com/ferroao/idiogramFISH .查看以下自述文件: https://gitlab.com/ferroao/idiogramFISH 。 This also handles errors while installing with devtools in windows, a process that does not have online connectivity (see vignette index.Rmd).
这也可以处理在 Windows 中使用 devtools 安装时的错误,这是一个没有在线连接的过程(请参阅小插图 index.Rmd)。 Look at DESCRIPTION also if you want to see dependencies and vignette builders.
如果您想查看依赖项和小插图构建器,请查看描述。
Generate the .md from the .Rmd (Rmarkdown).从 .Rmd (Rmarkdown) 生成 .md。
Months on, I discovered the problem.几个月过去了,我发现了这个问题。 When I installed anaconda, it changed the version of pandoc my system used -
which pandoc
should return something like /usr/local/bin/pandoc
(and not like /Users/st/anaconda3/bin/pandoc
).当我安装 anaconda 时,它更改了我系统使用的 pandoc 版本 -
which pandoc
应该返回类似于/usr/local/bin/pandoc
(而不是/Users/st/anaconda3/bin/pandoc
)的内容。
In my case, I edited by .bash_profile
to exclude ananconda, closed and reopened the terminal and everything worked.就我而言,我通过
.bash_profile
编辑以排除 ananconda,关闭并重新打开终端,一切正常。 (I also reinstalled pandoc from here , but I don't think that had anything to do with fixing it - it did show me the default installation location though) (我也从这里重新安装了 pandoc ,但我认为这与修复它没有任何关系 - 不过它确实向我显示了默认安装位置)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.