Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joethorley committed Oct 29, 2024
1 parent 1cfa53a commit 91bbcbf
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 25 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ URL: https://poissonconsulting.github.io/fwatlasbc/
Depends:
R (>= 4.1)
Imports:
chk (>= 0.8.1.9001),
chk,
digest,
dplyr,
fwapgr (>= 0.1.0.9013),
Expand All @@ -27,7 +27,8 @@ Imports:
stringr,
tibble,
tidyplus,
tidyselect
tidyselect,
units
Suggests:
covr,
googleway,
Expand All @@ -37,7 +38,6 @@ Suggests:
rlang,
testthat (>= 3.0.0)
Remotes:
poissonconsulting/chk,
poissonconsulting/fwapgr
Config/testthat/edition: 3
Encoding: UTF-8
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
blk,stream_measure,proportion
356308001,0,0
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
blk,stream_measure,proportion
356308001,0,0
356308001,100,0.005199028066473258
356308001,10000,0.5199028066473258
356308001,20000,1.0398056132946516
356308001,40000,2.079611226589303
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
blk,stream_measure,proportion
356308001,0,0
355992254,1,0.006747530069601267
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
blk,stream_measure,proportion
356308001,0,0
356308001,100,0.005199028066473258
356308001,10000,0.5199028066473258
356308001,20000,1.0398056132946516
356308001,40000,2.079611226589303
21 changes: 21 additions & 0 deletions tests/testthat/_snaps/add-point-to-stream-measure/apsm.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
blk,stream_measure,proportion
356308001,0,0
356308001,1000.003607,0.051990468193674935
356308001,2000.017171,0.10398145405457444
356308001,3000.011434,0.15597143645106684
356308001,4000.014659,0.20796188478445457
356308001,5000.00998,0.2599519221866639
356308001,6000.008678,0.3119421351600511
356308001,7000.024298,0.3639332279129676
356308001,8000.020311,0.4159233012924512
356308001,9000.01751,0.4679134363324076
356308001,10000.030555,0.5199043952103515
356308001,11000.041108,0.5718952245285159
356308001,12000.051979,0.6238860703795895
356308001,13000.075469,0.675877572296015
356308001,14000.103248,0.7278692971987542
356308001,15000.131712,0.7798610577148356
356308001,16000.133767,0.8318514452195949
356308001,17000.12526,0.88384128360301
356308001,18000.138751,0.9358322656686188
356308001,19000.150674,0.9878231662134679

This file was deleted.

2 changes: 1 addition & 1 deletion tests/testthat/test-add-point-to-stream-measure.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ test_that("example add point to stream measure", {
points <- fwa_snap_stream_measure_to_point(points, streams)
points <- points[c("blk", "stream_measure")]
points <- fwa_add_point_to_stream_measure(points, streams)
expect_snapshot_data(points, "fwa_add_point_to_stream_measure_example")
expect_snapshot_data(points, "apsm")
})

0 comments on commit 91bbcbf

Please sign in to comment.