ropensci / visdat

Preliminary Exploratory Visualisation of Data
https://docs.ropensci.org/visdat/
Other
450 stars 47 forks source link

vdiffr tests #118

Closed maelle closed 5 years ago

maelle commented 5 years ago

:wave: @njtierney! I've run tests locally and also get vdiffr failures. When using vdiffr::manage_cases() to visualize the difference I see they are quite small. I'm not sure whether it's due to the OS the cases were initially collected on (I'm on Ubuntu, Travis is Linux too) or with a ggplot2 update of some sort. Locally, on your machine, do the tests pass?

njtierney commented 5 years ago

Hi MaΓ«lle! I've had another look and tried to use set.seed to ensure that the plots don't change too much across builds - there were some plots that used sample or rnorm, so I thought that might have helped fix things.

Unfortunately, it appears not! I am not really sure how to fix this problem on travis etc, it seems like a puzzle!

maelle commented 5 years ago

The difference I was seeing was a different vertical space in the legend.

So the tests pass locally?

I think you should ask on Rstudio community forum (since vdiffr is an RStudio package), there must be a solution!

I used vdiffr in a package with cases generated on Windows and it worked on Travis, but I had only 2 tests.

njtierney commented 5 years ago

Hmmm, Ok so some developments!

Error: No deploy key found, please setup with `travis::use_travis_deploy()`
Execution halted
Script failed with status 1
failed to deploy

I've tried to use travis::use_travis_deploy(), but I get this:

> travis::use_travis_deploy()
Authenticating with GitHub
Waiting for authentication in browser...
Press Esc/Ctrl + C to abort
Authentication complete.
Authenticating with GitHub
Waiting for authentication in browser...
Press Esc/Ctrl + C to abort
Authentication complete.
Error: Must have role admin to edit organization ropensci, not member
> 

Sorry if I have overcomplicated things!

maelle commented 5 years ago

Yay! Can you re-install the travis package? I think this bug is a bug that was fixed very recently.

njtierney commented 5 years ago

OK done! I'll try and trigger a new build and see how we go!

njtierney commented 5 years ago

OK so now it passes on devel (:tada:) but not release - I get this error:

══ Deploying site ══════════════════════════════════════════════════════════════
── Installing package ──────────────────────────────────────────────────────────
── Setting up SSH id ───────────────────────────────────────────────────────────
Copying private key to: ~/.ssh/id_rsa
Setting private key permissions to 0600
── Cloning existing site ───────────────────────────────────────────────────────
Running git clone --single-branch -b gh-pages --depth 1 \
  'git@github.com:ropensci/visdat.git' /tmp/RtmpiPFZaz/file83e46a3a805
Cloning into '/tmp/RtmpiPFZaz/file83e46a3a805'...
Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.
══ Building pkgdown site ═══════════════════════════════════════════════════════
Reading from: '/home/travis/build/ropensci/visdat'
Writing to:   '/tmp/RtmpiPFZaz/file83e46a3a805'
── Initialising site ───────────────────────────────────────────────────────────
Copying '../../../R/Library/pkgdown/assets/docsearch.css' to 'docsearch.css'
Copying '../../../R/Library/pkgdown/assets/docsearch.js' to 'docsearch.js'
Copying '../../../R/Library/pkgdown/assets/link.svg' to 'link.svg'
Copying '../../../R/Library/pkgdown/assets/pkgdown.css' to 'pkgdown.css'
Copying '../../../R/Library/pkgdown/assets/pkgdown.js' to 'pkgdown.js'
Error : rotemplate is not installed
Error: rotemplate is not installed
Execution halted
Script failed with status 1

https://travis-ci.org/ropensci/visdat/jobs/514947943

But I figured that this line: https://github.com/ropensci/visdat/blob/master/.travis.yml#L11

Should have installed rotemplate - any thoughts on this?

njtierney commented 5 years ago

hopefully this commit https://github.com/ropensci/visdat/commit/094bbc6a789147e13234c0fcb6d8cdd580c512cf will help resolve it

maelle commented 5 years ago

Seeing the latest log I think you need a GITHUB_PAT, you can run travis::github_create_pat() to create a GITHUB_PAT for visdat Travis project (needed because of rate limiting on GitHub installations).

maelle commented 5 years ago

I'd remove the before_script because https://github.com/ropensci/visdat/blob/094bbc6a789147e13234c0fcb6d8cdd580c512cf/.travis.yml#L15 should take care of it?

njtierney commented 5 years ago

OK excellent, just added a GITHUB_PAT for visdat, and removed that line of the script. Hopefully this works! :) Thanks again for all your help with this, MaΓ«lle, πŸ™

maelle commented 5 years ago

The error you now get is new to me πŸ€”

njtierney commented 5 years ago

Strangely enough now the error seems to indicate that rotemplate is not installed, but only for the "release" part? Despite it specifically installing it in release here

Deploying application
══ Deploying site ══════════════════════════════════════════════════════════════
── Installing package ──────────────────────────────────────────────────────────
── Setting up SSH id ───────────────────────────────────────────────────────────
Copying private key to: ~/.ssh/id_rsa
Setting private key permissions to 0600
── Cloning existing site ───────────────────────────────────────────────────────
Running git clone --single-branch -b gh-pages --depth 1 \
  'git@github.com:ropensci/visdat.git' /tmp/Rtmprqqub6/file5a13636f0461
Cloning into '/tmp/Rtmprqqub6/file5a13636f0461'...
Warning: Permanently added the RSA host key for IP address '192.30.253.112' to the list of known hosts.
══ Building pkgdown site ═══════════════════════════════════════════════════════
Reading from: '/home/travis/build/ropensci/visdat'
Writing to:   '/tmp/Rtmprqqub6/file5a13636f0461'
── Initialising site ───────────────────────────────────────────────────────────
Copying '../../../R/Library/pkgdown/assets/docsearch.css' to 'docsearch.css'
Copying '../../../R/Library/pkgdown/assets/docsearch.js' to 'docsearch.js'
Copying '../../../R/Library/pkgdown/assets/link.svg' to 'link.svg'
Copying '../../../R/Library/pkgdown/assets/pkgdown.css' to 'pkgdown.css'
Copying '../../../R/Library/pkgdown/assets/pkgdown.js' to 'pkgdown.js'
Error : rotemplate is not installed
Error: rotemplate is not installed
Execution halted
Script failed with status 1
failed to deploy

https://travis-ci.org/ropensci/visdat

maelle commented 5 years ago

Weird. Maybe try using the same syntax as in magick? https://github.com/ropensci/magick/blob/master/.travis.yml#L11

maelle commented 5 years ago

if that works I'll need to update rotemplate README!

njtierney commented 5 years ago

So I think that this is all sorted now!