-
Notifications
You must be signed in to change notification settings - Fork 14
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
Put in a warning, and a nrow check on loading ACE data #52
Put in a warning, and a nrow check on loading ACE data #52
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.
These changes look good overall! Thank you for catching that edge case.
I have a couple requests and one small suggested code change:
- Code change: around line 175 of load-ace.R, consider directly returning
dat
inside thatif (nrow(dat) == 0)
statement to make explicit that no additional processing is called ondat
if it is empty - Request part 1: Can you upload an example of an all-practice failing raw data file to inst/extdata/nexus? (assuming it is Nexus data, you can make a new folder at that path and add it there) You can then access it in tests using
file.path(aceR_sample_data_path("nexus"), "file-name.csv")
. - Request part 2: In tests/testthat/test-load-csv.R, can you write a test in testthat syntax to expect that calling
load_ace_file()
on the all-practice data file will return a 0-rows dataframe, and throws the expected warning? - Request part 3: Can you write a test in tests/testthat/test-ace-pipeline.R (you can put it in where line 26 is now) that tests that calling
load_ace_bulk()
on the all-practice data file returns an appropriate aceR dataframe but with the data column empty?
Let me know once those tests are written and passing, or if you have other questions! (The example tests should guide you but mind you I wrote them a long while ago and the styling may be a little hacky, so don't follow them to a T.)
That sounds good - I can make those changes! Thanks @monicathieu. Do you know if Travis CI is set up on this repository? I tried accessing the link in CONTRIBUTING.md (+ changing the repo name) but I don't think anything runs. |
Another question @monicathieu : It looks like you have some unmerged changes on the |
To your questions:
|
Hi Monica,
Can you please take me off of this email chain?
Thanks
Reta Riedinger
(Flynt)
(208) 309-1286
…On Mon, Jun 10, 2024 at 10:29 AM Monica Thieu ***@***.***> wrote:
To your questions:
1. Once upon a LONG time ago I think Travis CI was set up to run, but
no longer... I need to put that in an enhancement milestone. So many
quality-of-life improvements, so little time! For the time being, if you
can run the testthat tests locally and confirm they pass, that'll do.
2. Let's leave the development branch unmerged for now, as it's got a
bunch of other Nexus updates that (while mostly ready to go) are not 100%
tested through yet. We can merge the contents of inst/extdata/nexus across
branches later!
—
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEYKLO7ATDRRLYHGOISCR63ZGXO7ZAVCNFSM6AAAAABJAMYIR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJYHEZDIOJXGQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi Reta @rrflynt , GitHub doesn't allow me to remove you from the repository, but you can stop receiving notifications about repository updates by going to the repository page https://github.com/joaquinanguera/aceR/ , clicking "Unwatch" in the top right-hand corner, and then choosing the notification setting you prefer. |
Hi @monicathieu - I've addressed your comments here. Let me know what you think! |
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.
Reviewed changes look good overall, thank you for working on this! Will approve merging if you think my small line edits make sense (see inline comments).
Co-authored-by: Monica Thieu <mthieu@emory.edu>
Co-authored-by: Monica Thieu <mthieu@emory.edu>
Awesome thanks for the suggestions - committed them. Verified tests pass locally too |
Hooray! Confirming merge ok! |
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.
Accepting!
I noticed a bug where in modules where there were only practice trials we end up erasing the entire data frame because of this filter. The result is that when we attempt any future operations on the empty dataframe, the
load_ace_bulk
function will error out.This PR adds a warning and some
nrow
checks to verify that the tibble we're operating on has non-zero rows.