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

Fix to issue #104-#105, removed maptools dependency, new testing suite #117

Merged
merged 17 commits into from
Aug 7, 2023

Conversation

ryannguyen6392
Copy link
Collaborator

Minor changes to getEdges and get_roosts_df to fix issues and address direct dependencies.
spatsoc seems to be dealing with the issue ropensci/spatsoc#50, so hopefully the error should go away soon.

This testing branch pulled the latest version of the testing suite, so I think it should come with, but I'll have to see if there are any extra files that I didn't want in the main package.

Hopefully first of many PRs to address the issues and such!

(from now on future mainFunction changes will be separate)
testing.
Todo: clean up testing files so that they are only stored in _snaps
Errors: few errors in testing larger supporting functions
suncalc::getSunlightTimes, times seem to differ by about a minute,
Todo: run testing suite on new sunrise and sunset times
DESCRIPTION file changed to remove direct imports,
TODO: remove sp dependencies in other packages
Upper for feeding and flight but using the right distThresh)

Seems to have greatly increased the number of data points in consecEdges
for feeding and decreased for flight (to be expected)

However, the greatest change is that calcSRI for feeding now returns
higher values, but the values for calcSRI in flight are quite small
(need confirmation) Test files have both versions (broken and fixed)
Seemed to have been from making an artificial data.table from dataset
SEE: points_to_edgelist_helper line 91

"timestamps <- dataset[,c(timestampCol, idCol, "timegroup")]"
Tests now use temporary files to store data
Data frame files are now correctly named after the data frame they store
Data is stored in tests/testthat/_snaps
Files which differ from tests will have .new attatched and be stored
in tests/testthat/_snaps
Removed ground_speed requirement in getEdges
by only requiring column if either speedThresh is set.
Changed ground_speed to be a explicit declared parameter named speedCol
speedCol defaults to "ground_speed" and is passed to filterLocs
roostPolygons now defaults to NULL
@ryannguyen6392 ryannguyen6392 linked an issue Aug 6, 2023 that may be closed by this pull request
roostBuffer in getEdges now accepts NULL
convertAndBuffer may throw an error if passed NULL as a distance,
so roostPolygons are only buffered if roostbuffer is not NULL
@ryannguyen6392 ryannguyen6392 linked an issue Aug 6, 2023 that may be closed by this pull request
@ryannguyen6392 ryannguyen6392 changed the title Fix to issue #104, removed maptools dependency, new testing suite Fix to issue #104-#105, removed maptools dependency, new testing suite Aug 6, 2023
@ryannguyen6392 ryannguyen6392 linked an issue Aug 6, 2023 that may be closed by this pull request
@kaijagahm kaijagahm merged commit 6126edd into main Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants