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

read_glatos_detections coerces to data.table #200

Closed
mhpob opened this issue Jan 13, 2024 · 7 comments
Closed

read_glatos_detections coerces to data.table #200

mhpob opened this issue Jan 13, 2024 · 7 comments

Comments

@mhpob
Copy link
Contributor

mhpob commented Jan 13, 2024

Tests for read_glatos_detections currently fail as the "correct" objects (data(walleye_detections) and data(lamprey_detections)) are of the class glatos_detections/data.frame, while importing a csv via read_glatos_detections returns a glatos_detections/data.table/data.frame regardless of input (data.frame, data.table, tibble).

Considering other functions attempt to conserve input class, is this the desired behavior?

@mhpob
Copy link
Contributor Author

mhpob commented Jan 13, 2024

Tests for read_glatos_receivers also fail for a similar reason: data(sample_receivers) is not a data.table.

@chrisholbrook
Copy link
Collaborator

This is not the desired behavior; was introduced in v0.8.0.9000 as an unintended consequences of changes to as_glatos_detections and as_glatos_receivers. Fix will be pushed momentarily. Thanks @mhpob for the very helpful poke.

chrisholbrook added a commit that referenced this issue Jan 13, 2024
@chrisholbrook
Copy link
Collaborator

chrisholbrook commented Jan 13, 2024

Fixed in v 0.8.0.9001 (7912d90).

All tests for read_glatos_detections and read_glatos_receivers are now passing; but are still warning that "context() was deprecated in the 3rd edition." see #201

@chrisholbrook
Copy link
Collaborator

@mhpob @jdpye Take a quick scan of 7912d90... I only changed a few lines in R/load-read_glatos_detections.r and R/load-read_glatos_receivers.r but git thinks every line was changed. But not in the other two files. Any idea why?

@chrisholbrook
Copy link
Collaborator

@mhpob @jdpye After I committed 7912d90, I then did a git pull and see this new "Style code (GHA)" commit (not made locally by me; authored by me on github?

image

@mhpob
Copy link
Contributor Author

mhpob commented Jan 13, 2024

That's the "style" GH Action that was added with the R CMD check. Takes code and adds spacing, etc. for a consistent style.

It can be turned off by deleting the file at .github/workflows/style.yml

@mhpob
Copy link
Contributor Author

mhpob commented Jan 13, 2024

Just looked -- the stylr action happens after your original commit with a separate commit and so shouldn't affect the original. No idea why git thought you changed everything.

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

No branches or pull requests

2 participants