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

Checks fail with duckplyr #6

Closed
krlmlr opened this issue Oct 28, 2024 · 5 comments · Fixed by #7
Closed

Checks fail with duckplyr #6

krlmlr opened this issue Oct 28, 2024 · 5 comments · Fixed by #7

Comments

@krlmlr
Copy link
Contributor

krlmlr commented Oct 28, 2024

The duckplyr package is aimed to be a drop-in replacement for dplyr, with full behavior compatibility. To assert that, I'm running checks with a rigged version of dplyr. This package fails its checks in this scenario.

Details: https://github.com/krlmlr/dplyr/blob/f-revdep-duckplyr/revdep/problems.md .

Learn more about duckplyr: https://duckplyr.tidyverse.org/ .

From the error message, I can't tell immediately what the cause of the failure is. I'd appreciate your help: can you please help digest a reproducible example that shows how duckplyr is behaving differently from dplyr in your use case?

The modified dplyr version can be installed with any of:

pak::pak("krlmlr/dplyr@f-revdep-duckplyr")
# remotes::install_github("krlmlr/dplyr@f-revdep-duckplyr")
# devtools::install_github("krlmlr/dplyr@f-revdep-duckplyr")

Thanks a lot for your help! Please let me know if you have any questions.

Tracker: tidyverse/duckplyr#297.

@jacobimarsh
Copy link
Owner

Will try roll into next set of changes, thanks!

@krlmlr
Copy link
Contributor Author

krlmlr commented Oct 29, 2024

Thanks, Jacob! There's no need to change your package because it works with dplyr; I'd like to understand why duckplyr doesn't work with your package.

@jacobimarsh
Copy link
Owner

Hmm okay I just installed the modified dplyr and tried to run it. So the error is in a test for a non-core component of the crosshap package, and the results it gives with both dplyrs (1.4.1.999 and 1.4.1) are precisely same - and are correct from looking at the output plot, although the test is based on the NA count in the tibble of the plotted data and is giving slightly different output to what it expects.

The difference seems to be somewhere in the clustering and data processing, and it seems arbitrary, I'll update the test expected values in the next version of crosshap, but rest assured, duckplyr looks like its working as intended, the (superficial) problem seems to be due to something else!

@krlmlr
Copy link
Contributor Author

krlmlr commented Oct 31, 2024

Thanks. If it behaves differently, it's not a drop-in replacement... Could be that some other package used in this process gives different results, I'd be very much interested in details here. Also, I recently updated this branch because I fixed a problem with if_else() -- could be that the results are different now, although I still see the same results with crosshap.

@jacobimarsh
Copy link
Owner

jacobimarsh commented Nov 1, 2024

Okay I had another look this morning, I think I know what's going on, it's one of two things:

  1. The test that was failing didn't have a function explicitly defined, fixed now
  2. The error message from your test seems to be due to the way in which crosshap's tests are set up. As in, there are functions called outside of the test's scope, i.e. it is called before the test is called. It could likely be fixed by calling the function within the test but as it's how I wrote all the tests and it isn't an issue when I run checks or push to github, I'm going to leave it for now.

result <- function
test_that( {result} )

as opposed to:
test_that( {result <- function; result} )

Probably different versions of testing software

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

Successfully merging a pull request may close this issue.

2 participants