fairagro / M4.4_UC6_ARC

UC6 workflow in ARC proof-of-concept
0 stars 0 forks source link

Transform Ben's "library" - code into R-package. #4

Open hvwaldow opened 5 days ago

aleidel commented 2 days ago
hvwaldow commented 2 days ago

Yes, I guess CRAN package wasn't intended anyway.

But that we have UC only in a private repo is super annoying, in particular since we want to cooperate with other measures / TAs. Not sure whether you got a "no" from Ben regarding making his repo public. Discussing this and making the UC-repo public is different issue (#6). @patrick-koenig

Whether alternative 1 or 2 is more practical, should be decided by you and @JensKrumsieck.

JensKrumsieck commented 2 days ago

I did not think about putting it to CRAN. That's a thing benjamin can do if he likes. We just enable him to do so with this issue. Furthermore i think alternative 1 is the way to go, he/we is/are doing this already with the crop calendars package in the Dockerfile.

https://github.com/fairagro/m4.4_UC6_cwl_test_1/blob/62174a2d9c97b3a940a0fd0913b69e2bef7834d4/Dockerfile#L23

This needs to be possible with csmTools so you can use its modules without loading the contents of the source files.

https://github.com/fairagro/m4.4_UC6_cwl_test_1/blob/7051616c5823b61bb03e3eb94ad9e92a56c164e2/scripts/transform.R#L1

side note: does anyone know why the line's contents aren't rendered like here https://github.com/fairagro/m4.4_UC6_cwl_test_1?tab=readme-ov-file#24062024-1700-jk ???

aleidel commented 2 days ago

It would be great to have a repository for this if we get his permission and find out what license he prefers (maybe he would also like to make some changes first). Overall, Benjamin has built his project using the recommended package structure and is already using roxygen2 comments, which is great. I'm not sure if he wants to export all of his functions, that could be a default option. I have made some minor changes to a few imports and commented out a function call in get_soil_data.R. There are still some warnings and notes that I need to resolve before it should be available anywhere, but I think I can install the package csmTools locally on my system with install.packages("path/to/compressed/package", source = TRUE, repos=NULL). For a github repo you would have to execute use_github and use_read_me_rmd with devtools, but it shouldn't be that complicated (I could test it for a private repo?). Then it would be possible to use it like cropCalendars (if it is public). It would maybe make sense to add tests for the functions at some point

JensKrumsieck commented 2 days ago

As far as i can see his repo is public now: https://github.com/fairagro/uc6_csmTools 🎉 image