简体   繁体   English

在 github 上的 README.md 包中允许徽章但在 CRAN 版本中不允许徽章的解决方法

[英]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.

相关问题 如何从 R 包的 README.Rmd 生成 README.md? - How to generate README.md from README.Rmd for R package? 请注意R CRAN检查 - *检查顶级文件...注意如果没有安装'pandoc',则无法检查文件README.md - Note in R CRAN check — * checking top-level files … NOTE File README.md cannot be checked without ‘pandoc’ being installed README.md包含图像时,从程序包检查“注意”或“警告” - NOTE or WARNING from package check when README.md includes images R package - 强制依赖 GitHub 版本而不是 CRAN 版本 - R package - force a dependency on a GitHub version over a CRAN version 自述文件链接到操作系统的软件包二进制文件不存在 (CRAN) - ReadMe link to OS that package binary does not exist for (CRAN) 从 CRAN 安装系统字体 package 和 GitHub 失败 - Installing systemfonts package from CRAN and GitHub fails RStudio README.Rmd 和 README.md 都应该使用 'git commit --no-verify' 来覆盖这个检查 - RStudio README.Rmd and README.md should be both staged use 'git commit --no-verify' to override this check 请注意,将新版本的 package 发送到 cran “检查 CRAN 传入可行性...... Note_to_CRAN_maintainers”不会让我将其发送到 CRAN - note when sending new version of package to cran "checking CRAN incoming feasibility ... Note_to_CRAN_maintainers" wont let me send it to CRAN Make CRAN R package suggest GitHub R package - Make CRAN R package suggest GitHub R package 如何通过 GitHub Actions 向 CRAN 提交 R package? - How to submit an R package to CRAN via GitHub Actions?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM