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

Release/v0.2.3 #50

Merged
merged 8 commits into from
Apr 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: flexpolyline
Type: Package
Title: Flexible Polyline Encoding
Version: 0.2.2
Version: 0.2.3
Authors@R:
c(person(given = "Merlin",
family = "Unterfinger",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# flexpolyline 0.2.3

* Skip encoding and decoding validation tests on CRAN due to minor deviations in the results due to rounding (half up vs. half even) on different platforms (e.g. Apple M1) at high precision values (closes [#49](https://github.com/munterfinger/flexpolyline/issues/49))

# flexpolyline 0.2.2

* Fix wrong integer shift resulting in lost bits for precision values greater than 7 (see [heremaps/flexible-polyline#36](https://github.com/heremaps/flexible-polyline/issues/36), closes [#44](https://github.com/munterfinger/flexpolyline/issues/44)).
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ The flexible polyline encoding is a variant of the [Encoded Polyline Algorithm F

## Installation

You can install the released version of **flexpolyline** from [CRAN](https://CRAN.R-project.org/package=flexpolyline) with:
Install the released version of **flexpolyline** from [CRAN](https://CRAN.R-project.org/package=flexpolyline):

``` r
install.packages("flexpolyline")
```

Install the development version from [GitHub](https://github.com/munterfinger/flexpolyline) with:
Or get the development version from [GitHub](https://github.com/munterfinger/flexpolyline):

``` r
remotes::install_github("munterfinger/flexpolyline@develop")
Expand Down
4 changes: 3 additions & 1 deletion tests/testthat/test-cpp_binding.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
test_that("Cpp binding to 'flexpolyline.h' en- and decodes correctly", {

# Skip tests on CRAN due to platform specific rounding at high precision
skip_on_cran()

# Get and set third dimension
expect_equal(get_third_dimension("BlBoz5xJ67i1BU1B7PUzIhaUxL7YU"), "ALTITUDE")
expect_equal(get_third_dimension(set_third_dimension("BlBoz5xJ67i1BU1B7PUzIhaUxL7YU", "ELEVATION")), "ELEVATION")
Expand Down Expand Up @@ -129,7 +132,6 @@ test_that("Cpp binding to 'flexpolyline.h' en- and decodes correctly", {
)

# Input checks
skip_on_cran()
expect_error(encode(matrix(1, 2, 4)), "Invalid input dimensions", class = "std::invalid_argument")
expect_error(encode(matrix(1, 2, 3), precision = -1), "precision out of range", class = "std::out_of_range")
expect_error(encode(matrix(1, 2, 3), third_dim = -1), "third_dim out of range", class = "std::out_of_range")
Expand Down