Skip to content

Bump to 4.5.0, add reverseDirectedEdge#230

Merged
nrabinowitz merged 5 commits into
uber:masterfrom
isaacbrodsky:bump-4.5.0
Jun 13, 2026
Merged

Bump to 4.5.0, add reverseDirectedEdge#230
nrabinowitz merged 5 commits into
uber:masterfrom
isaacbrodsky:bump-4.5.0

Conversation

@isaacbrodsky

@isaacbrodsky isaacbrodsky commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Updates to H3 v4.5.0, adds reverseDirectedEdge, and applies related test fixes.


Note: we will need to fix the following tests:

⨯ cellsToMultiPolygon - Non-contiguous 2
  not ok 338 Found start index in loop
    ---
      operator: ok
      expected: true
      actual:   false
      at: assertLoop (/Users/isaac/oss/h3-js/dist/test.js:2357:12)
      stack: |-
        Error: Found start index in loop
            at Test.assert [as _assert] (/Users/isaac/oss/h3-js/node_modules/tape/lib/test.js:492:48)
            at Test.assert (/Users/isaac/oss/h3-js/node_modules/tape/lib/test.js:625:7)
            at assertLoop (/Users/isaac/oss/h3-js/dist/test.js:2357:12)
            at assertPolygon (/Users/isaac/oss/h3-js/dist/test.js:2370:9)
            at assertMultiPolygon (/Users/isaac/oss/h3-js/dist/test.js:2377:9)
            at Test.<anonymous> (/Users/isaac/oss/h3-js/dist/test.js:3716:5)
            at Test.run (/Users/isaac/oss/h3-js/node_modules/tape/lib/test.js:126:28)
            at Immediate.next [as _onImmediate] (/Users/isaac/oss/h3-js/node_modules/tape/lib/results.js:158:7)
            at process.processImmediate (node:internal/timers:476:21)
    ...
  not ok 339 Got expected loop (independent of starting vertex)
    ---
      operator: deepEqual
      expected: |-
        [ [ 37.77598951883773, -122.42778275313199 ], [ 37.77767221484919, -122.42671162907999 ], [ 37.77917659464624, -122.42797132395157 ], [ 37.77899825510356, -122.43030214180571 ], [ 37.777315558988036, -122.43137319648291 ], [ 37.77581120251897, -122.43011350268344 ] ]
      actual: |-
        [ [ 37.77838500493093, -122.41738797617619 ], [ 37.77820687262238, -122.41971895414811 ], [ 37.776524206993216, -122.4207902454188 ], [ 37.77501967379262, -122.41953062807342 ], [ 37.775197782893386, -122.41719971841658 ], [ 37.77688044840227, -122.41612835779269 ] ]
      at: assertLoop (/Users/isaac/oss/h3-js/dist/test.js:2364:12)
      stack: |-
        Error: Got expected loop (independent of starting vertex)
            at Test.assert [as _assert] (/Users/isaac/oss/h3-js/node_modules/tape/lib/test.js:492:48)
            at Test.tapeDeepEqual (/Users/isaac/oss/h3-js/node_modules/tape/lib/test.js:747:7)
            at assertLoop (/Users/isaac/oss/h3-js/dist/test.js:2364:12)
            at assertPolygon (/Users/isaac/oss/h3-js/dist/test.js:2370:9)
            at assertMultiPolygon (/Users/isaac/oss/h3-js/dist/test.js:2377:9)
            at Test.<anonymous> (/Users/isaac/oss/h3-js/dist/test.js:3716:5)
            at Test.run (/Users/isaac/oss/h3-js/node_modules/tape/lib/test.js:126:28)
            at Immediate.next [as _onImmediate] (/Users/isaac/oss/h3-js/node_modules/tape/lib/results.js:158:7)
            at process.processImmediate (node:internal/timers:476:21)
    ...
  not ok 341 Found start index in loop
    ---
      operator: ok
      expected: true
      actual:   false
      at: assertLoop (/Users/isaac/oss/h3-js/dist/test.js:2357:12)
      stack: |-
        Error: Found start index in loop
            at Test.assert [as _assert] (/Users/isaac/oss/h3-js/node_modules/tape/lib/test.js:492:48)
            at Test.assert (/Users/isaac/oss/h3-js/node_modules/tape/lib/test.js:625:7)
            at assertLoop (/Users/isaac/oss/h3-js/dist/test.js:2357:12)
            at assertPolygon (/Users/isaac/oss/h3-js/dist/test.js:2370:9)
            at assertMultiPolygon (/Users/isaac/oss/h3-js/dist/test.js:2377:9)
            at Test.<anonymous> (/Users/isaac/oss/h3-js/dist/test.js:3716:5)
            at Test.run (/Users/isaac/oss/h3-js/node_modules/tape/lib/test.js:126:28)
            at Immediate.next [as _onImmediate] (/Users/isaac/oss/h3-js/node_modules/tape/lib/results.js:158:7)
            at process.processImmediate (node:internal/timers:476:21)
    ...
  not ok 342 Got expected loop (independent of starting vertex)
    ---
      operator: deepEqual
      expected: |-
        [ [ 37.775197782893386, -122.41719971841658 ], [ 37.77688044840227, -122.41612835779269 ], [ 37.77838500493093, -122.41738797617619 ], [ 37.77820687262238, -122.41971895414811 ], [ 37.776524206993216, -122.4207902454188 ], [ 37.77501967379262, -122.41953062807342 ] ]
      actual: |-
        [ [ 37.77917659464624, -122.42797132395157 ], [ 37.77899825510356, -122.43030214180571 ], [ 37.777315558988036, -122.43137319648291 ], [ 37.77581120251897, -122.43011350268344 ], [ 37.77598951883773, -122.42778275313199 ], [ 37.77767221484919, -122.42671162907999 ] ]
      at: assertLoop (/Users/isaac/oss/h3-js/dist/test.js:2364:12)
      stack: |-
        Error: Got expected loop (independent of starting vertex)
            at Test.assert [as _assert] (/Users/isaac/oss/h3-js/node_modules/tape/lib/test.js:492:48)
            at Test.tapeDeepEqual (/Users/isaac/oss/h3-js/node_modules/tape/lib/test.js:747:7)
            at assertLoop (/Users/isaac/oss/h3-js/dist/test.js:2364:12)
            at assertPolygon (/Users/isaac/oss/h3-js/dist/test.js:2370:9)
            at assertMultiPolygon (/Users/isaac/oss/h3-js/dist/test.js:2377:9)
            at Test.<anonymous> (/Users/isaac/oss/h3-js/dist/test.js:3716:5)
            at Test.run (/Users/isaac/oss/h3-js/node_modules/tape/lib/test.js:126:28)
            at Immediate.next [as _onImmediate] (/Users/isaac/oss/h3-js/node_modules/tape/lib/results.js:158:7)
            at process.processImmediate (node:internal/timers:476:21)
    ...

@coveralls

coveralls commented Jun 7, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 27454616134

Warning

No base build found for commit 2bbcbf1 on master.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 100.0%

Details

  • Patch coverage: 6 of 6 lines across 1 file are fully covered (100%).

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 620
Covered Lines: 620
Line Coverage: 100.0%
Relevant Branches: 136
Covered Branches: 136
Branch Coverage: 100.0%
Branches in Coverage %: Yes
Coverage Strength: 4963.0 hits per line

💛 - Coveralls

@isaacbrodsky
isaacbrodsky marked this pull request as ready for review June 8, 2026 20:06
Comment thread test/legacy.spec.js
const vertices0 = h3.h3ToGeoBoundary(h3Indexes[0]);
const vertices1 = h3.h3ToGeoBoundary(h3Indexes[1]);
const expected = [[vertices0], [vertices1]];
const expected = [[vertices1], [vertices0]];

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes a kind of sense to me; what we actually wanted to test was that the Set of vertices in multiPolygon matches the expected set, but the order has now changed due to a different algorithm.

Comment thread test/legacy.spec.js Outdated

@nrabinowitz nrabinowitz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks good to me, but I do think @dfellis's question on accuracy is valid - do we know why this has regressed?

Comment thread test/h3core.spec.js Outdated
@nrabinowitz
nrabinowitz merged commit 47767bd into uber:master Jun 13, 2026
8 checks passed
@isaacbrodsky
isaacbrodsky deleted the bump-4.5.0 branch June 15, 2026 04:24
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

Successfully merging this pull request may close these issues.

4 participants