New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the toc function with the test failure. #154
Conversation
Both stringi and knitr have source versions that are more recent than their corresponding binary versions. When the remotes package tries to install them from source, it attempts to install knitr first. Since knitr depends on stringi (via stringr), the installation fails. r-lib/remotes#296 install.packages() installs the source packages in the correct order.
Here is my session information. "Session Information"
#> [1] "Session Information" Created on 2019-03-25 by the reprex package (v0.2.1) Session infodevtools::session_info()
#> - Session info ----------------------------------------------------------
#> setting value
#> version R version 3.5.3 (2019-03-11)
#> os Windows 7 x64 SP 1
#> system x86_64, mingw32
#> ui RTerm
#> language (EN)
#> collate Chinese (Simplified)_People's Republic of China.936
#> ctype Chinese (Simplified)_People's Republic of China.936
#> tz Asia/Taipei
#> date 2019-03-25
#>
#> - Packages --------------------------------------------------------------
#> package * version date lib source
#> assertthat 0.2.0 2017-04-11 [1] CRAN (R 3.5.2)
#> backports 1.1.3 2018-12-14 [1] CRAN (R 3.5.2)
#> callr 3.1.1 2018-12-21 [1] CRAN (R 3.5.2)
#> cli 1.0.1 2018-09-25 [1] CRAN (R 3.5.2)
#> crayon 1.3.4 2017-09-16 [1] CRAN (R 3.5.2)
#> desc 1.2.0 2018-05-01 [1] CRAN (R 3.5.2)
#> devtools 2.0.1 2018-10-26 [1] CRAN (R 3.5.2)
#> digest 0.6.18 2018-10-10 [1] CRAN (R 3.5.2)
#> evaluate 0.12 2018-10-09 [1] CRAN (R 3.5.2)
#> fs 1.2.6 2018-08-23 [1] CRAN (R 3.5.2)
#> glue 1.3.0 2018-07-17 [1] CRAN (R 3.5.2)
#> highr 0.7 2018-06-09 [1] CRAN (R 3.5.2)
#> htmltools 0.3.6 2017-04-28 [1] CRAN (R 3.5.2)
#> knitr 1.21 2018-12-10 [1] CRAN (R 3.5.2)
#> magrittr 1.5 2014-11-22 [1] CRAN (R 3.5.2)
#> memoise 1.1.0 2017-04-21 [1] CRAN (R 3.5.2)
#> pkgbuild 1.0.2 2018-10-16 [1] CRAN (R 3.5.2)
#> pkgload 1.0.2 2018-10-29 [1] CRAN (R 3.5.2)
#> prettyunits 1.0.2 2015-07-13 [1] CRAN (R 3.5.2)
#> processx 3.2.1 2018-12-05 [1] CRAN (R 3.5.2)
#> ps 1.3.0 2018-12-21 [1] CRAN (R 3.5.2)
#> R6 2.3.0 2018-10-04 [1] CRAN (R 3.5.2)
#> Rcpp 1.0.0 2018-11-07 [1] CRAN (R 3.5.2)
#> remotes 2.0.2 2018-10-30 [1] CRAN (R 3.5.2)
#> rlang 0.3.1 2019-01-08 [1] CRAN (R 3.5.2)
#> rmarkdown 1.11 2018-12-08 [1] CRAN (R 3.5.3)
#> rprojroot 1.3-2 2018-01-03 [1] CRAN (R 3.5.2)
#> sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 3.5.2)
#> stringi 1.2.4 2018-07-20 [1] CRAN (R 3.5.2)
#> stringr 1.3.1 2018-05-10 [1] CRAN (R 3.5.2)
#> testthat 2.0.1 2018-10-13 [1] CRAN (R 3.5.2)
#> usethis 1.4.0 2018-08-14 [1] CRAN (R 3.5.2)
#> withr 2.1.2 2018-03-15 [1] CRAN (R 3.5.2)
#> xfun 0.4 2018-10-23 [1] CRAN (R 3.5.2)
#> yaml 2.2.0 2018-07-25 [1] CRAN (R 3.5.2)
#>
#> [1] C:/Users/lijiaxiang/Documents/R/win-library/3.5
#> [2] C:/Program Files/R/R-3.5.3/library |
@JiaxiangBU Don't worry about those test failures for now. I'm curious how they are happening since I don't see those on my Windows machine or on AppVeyor. But for your purposes, they are unrelated to your new function. |
For quicker feedback on your function, you can run the following:
This ignores the vignettes and the unit tests. These require running Pandoc, which can be quite slow, especially on Windows. |
OK, I am not very familiar with this field. I trust you, haha. And I am trying the function you give.
|
@jdblischak After this quick check, I find there are one warning and one error here.
I will change the two namings to avoid the conflict between the local function and global environment. |
…nction and global environment.
@JiaxiangBU This is a great start! I was able to get
No worries! This is how you learn :-) Before you start working on addressing those specific warnings/errors, we need to step back and address some larger issues. The first issue to fix is that your commit is on the master branch, not the dev branch. If you look at the top of the Pull Request, it says that it is merging your master branch into my dev branch: We need to merge your dev branch into my dev branch. How comfortable are you with Git? Have you ever used Git branches before? Do you run your Git commands in a terminal (e.g. Git Bash) or do you use a GUI? |
Another piece of advice. The links should be relative. This will ensure they will work on GitHub Pages, locally, or anywhere they may be hosted. In other words, instead of
It should be
Also, I'd recommend pull the title from the YAML header of the R Markdown file (code example below). This is more straightforward than a regex of the HTML file:
|
My bad. I misunderstand the point on the contribution.md. So what I need to do is to pull my |
I think your recommendation, the function By the way, I agree with you, the relative URL is a better choice, I will fix this. |
Here's my recommendation for how to update your branches. The commands below are meant to be run in the RStudio Terminal unless otherwise stated:
|
Also, here is an easier strategy for getting the list of published analyses to create the toc:
|
Seemingly if I want to pull my |
Hi @jdblischak, feedback the issue #151, I write a quick function
wflow_toc
. It helps users like me to add a table of content.However, something blocks me.
Before I add the new function, I do a pre-test using
devtools::test()
. This test takes a long time. And I get this error.Test failture.
The function is very simple (
R/wflow_toc.R
). I am still working on this test failture, just let you know.