-
Notifications
You must be signed in to change notification settings - Fork 12
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
Update slice_sample
in dplyr_methods.R
#72
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing!
Usually when we add a functionality, or fix an error/warning, we add a unit test, to test the changes.
For exmple if we solve an error, we would
- first add a unit test (that would fail) to test that the error happens
- we then fix the error
- rerun the unit test expecting no error
- we commit the fix and the unit test
Thank you for your guidance! In this case, I added the unit test for Edit: I apologize for the recurrent commit, but I thought I should have included |
Hello @wvictor14 @noriakis In the Seurat master, the slice functions produce errors in the tests. Could you please have a look? Thanks! |
Hello @stemangiola @wvictor14, expect_equal(
pbmc_small |> as_tibble() |> arrange(nFeature_RNA) |> head(n = 5) %>% pull(.cell),
pbmc_small |> slice_min(nFeature_RNA, n = 5) |> colnames()
) The errors seem to come from above tests in expect_equal(
pbmc_small |> as_tibble() |> arrange(nFeature_RNA) |> head(n = 5) %>% pull(.cell) |> sort(),
pbmc_small |> slice_min(nFeature_RNA, n = 5) |> colnames() |> sort()
) The |
Agree, if you had the chance to do it, would be amazing. |
Hello, this PR clears the warning in
slice_sample
. I would be grateful if you could review the code.Related to: stemangiola/tidySingleCellExperiment#90