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

Automate updates #4

Closed
dcooley opened this issue Apr 12, 2023 · 8 comments
Closed

Automate updates #4

dcooley opened this issue Apr 12, 2023 · 8 comments

Comments

@dcooley
Copy link
Contributor

dcooley commented Apr 12, 2023

Some sort of Bash script to:

  • clone the latest version of uber/h3 repo
  • remove all the src/ files
  • rebuild src/init.c
  • Report on the differences between the new clone and the outgoing version
  • rebuild inst/include/h3libapi.h
@RayShao01010010
Copy link
Collaborator

I'm really sorry but I forgot the switch to branch issue4 before committing and pushing the changes.

Now working on branch issue4

@RayShao01010010
Copy link
Collaborator

This is now finished and ready for review

@RayShao01010010
Copy link
Collaborator

Did some testing on the automation script and found tons of issues. Fixed them all and now the script is working.

There is still one issue though. After the update, the result of getHexagonEdgeLengthAvgKm and getHexagonEdgeLengthAvgM have been changed.

I noticed that they have changed the data matrix in those functions, meaning that maybe we should update our unit tests.

> test_all(pkgdir = "./", testdir = "./tests/tinytest")
test_directed_edges.R.........    8 tests OK 6ms
test_hierarchy.R..............    7 tests OK 6ms
test_indexing.R...............    3 tests OK 9ms
test_inspection.R.............    7 tests OK 7ms
test_miscellaneous.R..........   20 tests 2 fails 19ms
3ms
test_traversal.R..............    7 tests OK 5ms
test_vertexes.R...............    4 tests OK 4ms
----- FAILED[data]: test_miscellaneous.R<9--9>
 call| expect_equal(getHexagonEdgeLengthAvgKm(res = c(5, 6)), c(8.544408276, 
 call| -->    3.229482772))
 diff| Mean relative difference: 0.1532826
 ----- FAILED[data]: test_miscellaneous.R<10--10>
 call| expect_equal(getHexagonEdgeLengthAvgM(res = c(5, 6)), c(8544.408276, 
 call| -->    3229.482772))
 diff| Mean relative difference: 0.1532826
 
Showing 2 out of 56 results: 2 fails, 54 passes (72ms)
> getHexagonEdgeLengthAvgKm(res = c(5L, 6L))
[1] 9.854091 3.724533
> getHexagonEdgeLengthAvgM(res = c(5L, 6L))
[1] 9854.091 3724.533

Anyway, I'm happy this is working on my end. Please test it out

@dcooley
Copy link
Contributor Author

dcooley commented May 2, 2023

Those failing tests for getHexagonEdgeLengthAvgKm/m() show the distances has changed by about 1km at res 5, which may or may not be an issue. But there's nothing in the h3 changelog about this.

So I think we have to adjust the test to use the new results

@dcooley
Copy link
Contributor Author

dcooley commented May 3, 2023

I've adjusted the tests in {h3r}

@dcooley
Copy link
Contributor Author

dcooley commented May 3, 2023

merged

@dcooley dcooley closed this as completed May 3, 2023
@dcooley
Copy link
Contributor Author

dcooley commented Aug 22, 2023

Had to make some changes to get on CRAN

  • Various functions with empty arguments need void a the parameter (e.g. DECLSPEC int H3_EXPORT(res0CellCount)(void);)
  • h3Assert.c needed a definition of something (typedef int unused;)
  • init.c has 2 non-api functions

@dcooley dcooley reopened this Aug 22, 2023
@dcooley dcooley mentioned this issue Oct 4, 2023
9 tasks
@dcooley
Copy link
Contributor Author

dcooley commented Oct 4, 2023

closing because I think #7 superseeds this now

@dcooley dcooley closed this as completed Oct 4, 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
Development

No branches or pull requests

2 participants