Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

Can't build vignettes #44

Closed
FilipeamTeixeira opened this issue Feb 25, 2018 · 11 comments
Closed

Can't build vignettes #44

FilipeamTeixeira opened this issue Feb 25, 2018 · 11 comments

Comments

@FilipeamTeixeira
Copy link

When running devtools::install_github('ropensci/gtfsr', build_vignettes = TRUE), I get the following error.

Quitting from lines 59-64 (gtfsr-vignette.Rmd) Error: processing vignette 'gtfsr-vignette.Rmd' failed with diagnostics: API Key not found. Please set your API key using function 'set_api_key()'. Execution halted Installation failed: Command failed (1)

It seems obvious that I need to set my API key, however this error shouldn't popup during installation as the set_api_key function is not active prior to installation as it is part of the package.
After installing the package it's also not really clear how to get the vignettes.

Is there any in dept documentation for this package? It has a lot of potential, but it really lacks some extra info.

@dantonnoriega
Copy link
Collaborator

Hmmm, you make a great point. The vignette shouldn't require an outside dependency but at the same time, the purpose of the package, and what is shown in the vignette, depends on having access to the API.

I didn't consider this when I wrote the vignette. You can see a lot of it already just by going to the md file on GitHub, but I'll have to think about a work around. Perhaps I'll have to get an API linked to some phantom email and let the world have access to it.

Any issues installing it without the vignette?

@FilipeamTeixeira
Copy link
Author

Thanks. I had no issues installing it without the vignette, however, I would really like to have more documentation on this package. It's a pity that a lot of functions are a bit unclear, but I'm happy to help if you need to as I'll be using your package for the next few months.
About the vignette, it should be possible to generate it without running the set_api_key function. I can look into it, if you want.

Anyway feel free to close the issue and mark it as solved and drop me an e-mail if you would like some help with this.

@mdsumner
Copy link
Contributor

mdsumner commented Feb 27, 2018

Could you download the data and installed it in the package as a built-in? Whenever examples use the data set, it could include the commented out code that would be required to get it live.

I.e. analogously for the gtfs_obj example, in data-raw/ would be script to record something like this

url <- "http://data.trilliumtransit.com/gtfs/duke-nc-us/duke-nc-us.zip"
gtfs_obj <- url %>% import_gtfs(quiet=TRUE)
usethis::use_data(gtfs_obj)

@dantonnoriega
Copy link
Collaborator

dantonnoriega commented Feb 27, 2018 via email

@dantonnoriega
Copy link
Collaborator

Closed by merge or pull request #46.

@dantonnoriega
Copy link
Collaborator

closed prematurely. made some more added adjustments to what @mdsumner started. was able to compile from a github_install tarball as shown in readme. give a go!

@znmeb
Copy link

znmeb commented May 30, 2018

Can I reopen this? I want to install the vignettes. Is the workaround to fork the repo and build a pkgdown site?

@dantonnoriega
Copy link
Collaborator

dantonnoriega commented May 31, 2018 via email

@znmeb
Copy link

znmeb commented Jun 2, 2018

I think I found the problem. I forked the repo and tried the build and got the error. It turns out that the failure is happening at line 75 of https://github.com/ropensci/gtfsr/edit/master/vignettes/gtfsr-vignette.Rmd

load("~/GitHub/gtfsr/data/gtfs_obj.rda")

That's a path that doesn't exist on my machine. When I changed it to a path that did exist, the vignette built, as did a pkgdown::build_site.

I'm not sure where that file lands during the vignette build process, so I don't know how to code a fix. But the workaround is to clone the repo and change that line to point to the right path.

@dantonnoriega
Copy link
Collaborator

dantonnoriega commented Jun 2, 2018 via email

@znmeb
Copy link

znmeb commented Jun 2, 2018

Yep - installs fine! Thanks!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants