Skip to content
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

Improve error message formatting #303

Merged
merged 1 commit into from Jun 4, 2018
Merged

Improve error message formatting #303

merged 1 commit into from Jun 4, 2018

Conversation

michaelweylandt
Copy link
Contributor

@michaelweylandt michaelweylandt commented Apr 20, 2018

For objects with multiple S3 classes, only
print the first in errors/warnings thrown
by the default methods of tidy, augment, & glance

Previous behavior:

# my_fit is the output of glmnet(X, y)
> augment(my_fit)
Error: augment doesn't know how to deal with data of class elnetglmnet

New behavior:

> augment(my_fit)
Error: augment doesn't know how to deal with data of class elnet

For objects with multiple S3 classes, only
print the first in errors/warnings thrown
by the default methods of tidy, augment, & glance

Previous behavior:

# my_fit is the output of glmnet(X, y)
> augment(my_fit)
Error: augment doesn't know how to deal with data of class elnetglmnet

New behavior:
> augment(my_fit)
Error: augment doesn't know how to deal with data of class elnet
@michaelweylandt
Copy link
Contributor Author

Both Travis and AppVeyor failed this PR, but I think those are not because of my changes:

  • AppVeyor is complaining about something related to the survival package:
Running the tests in 'tests/test-all.R' failed.
Last 13 lines of output:
  1/1 mismatches
  [1] 8 - 9 == -1
  
  -- 2. Failure: glance.survreg works (@test-survival.R#145)  --------------------
  ncol(o) not equal to `exp.col`.
  1/1 mismatches
  [1] 8 - 9 == -1
  
  == testthat results  ===========================================================
  OK: 1424 SKIPPED: 0 FAILED: 2
  1. Failure: survreg tidiers work (@test-survival.R#128) 
  2. Failure: glance.survreg works (@test-survival.R#145) 
  
  Error: testthat unit tests failed
  Execution halted
* DONE
  • Travis timed out in the build stage before it could even start testing

@alexpghayes alexpghayes merged commit 79757c9 into tidymodels:master Jun 4, 2018
@alexpghayes
Copy link
Collaborator

Thanks!

@github-actions
Copy link

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants