-
Notifications
You must be signed in to change notification settings - Fork 0
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
R server #10
base: main
Are you sure you want to change the base?
R server #10
Conversation
Merged eWaterCycle/bmi-r#3 |
Cool, I'm looking forward to trying it out! 🚀 |
|
||
``` r | ||
# install.packages("pak") | ||
pak::pak("github::eWaterCycle/remotebmi/R/remotebmi") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command does not work,
> pak::pak("github::eWaterCycle/remotebmi/R/remotebmi")
! Using bundled GitHub PAT. Please add your own PAT using `gitcreds::gitcreds_set()`.
Error:
! error in pak subprocess
Caused by error:
! Could not solve package dependencies:
* github::eWaterCycle/remotebmi/R/remotebmi: ! pkgdepends resolution error for
github::eWaterCycle/remotebmi/R/remotebmi.
Caused by error:
! Can't find R package in GitHub repo eWaterCycle/remotebmi in directory 'R/remotebmi'
Is that because of this:?
rename package from R/remotebmi to /remotebmir
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, the path is according to https://pak.r-lib.org/reference/pak_package_sources.html#github-packages-github-
I was using
cd R/remotebmi
R
devtools::load_all()
# and/or
devtools::install_local()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah that uses main branch, try pak::pak("github::eWaterCycle/remotebmi/R/remotebmi#10")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I git cloned the repo and installed it from a local path. That worked fine
## basic example code | ||
|
||
pak::pak("github::ClaudiaBrauer/WALRUS") | ||
pak::pak("github::eWaterCycle/bmi-r") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get stuck on building the stringi
package. install.package("stringi")
fails to build, and R binaries are only available for Windows and MacOS, not linux 🙄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Managed to finally build it with install.packages("stringi", configure.args="--disable-pkg-config")
array([0.0044]) | ||
client.get_var_nbytes('Q') | ||
'mm/h' | ||
# TODO get_var_nbytes should return int not str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting error! Seems like a mismapping of a function (get_var_units vs. get_var_nbytes)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, seems I fixed it in https://github.com/eWaterCycle/grpc4bmi-examples/pull/10/files, but never completed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't fully follow the readme, but got past the errors and have WALRUS running 🥳
Something still seems to be going wrong. I can do the first update, but after the second .update() I can't use get_value anymore:
The running R server shows no errors |
What does R server say and what does curl do
|
Before the first update it returns nothing. After one update it returns So that looks OK. Running the curl command and then using get_value also works fine 😕 .
|
TODO