Open utterances-bot opened 2 years ago
Thanks for this article! I can relate to a lot of this. The non-encapsulation of dependencies is another thing - how would you handle 5 package-projects as local packages that are interdependent? What's your take on recent packages like box
that enables python-like imports and avoids package::prefixes? I'm wondering why testthat
does not permit non-package structures (test_dir
only tests files on the same level, a package like box
would encourage by-functionality subfolders). The sheer existence of renv
seems like admitting that the package structure is or cannot be used in reality in a lot of cases (and they seem mutually exclusive). But then I don't understand why other basic needs for code quality like linting and testing are made so hard outside of the package structure. Other best practices like encapsulation and expliciteness instead of impliciteness are not even possible within the package structure.
I really like what box
seems to be trying to do. I think the main problem I had with it is that you can make life a lot harder for yourself if you want to manage your dependencies with renv
. I can see myself using it on a large and complicated pipeline to 'inline' a library though.
Do you mean in terms of automatic dependency discovery? This seems to work well since a while:
https://github.com/rstudio/renv/commit/fedf6cacfbf19d8fe5d82ba072a177dcbe0555a1 https://github.com/rstudio/renv/commit/45cf93edb72f2d82e6b72372f447d2512a8927ef
However, it does not yet play well with drake
and targets
, since they can't drill down the box::use
statements and discover changes yet, unfortunately.
Before I Sleep: Project as an R package: An okay idea
https://milesmcbain.com/posts/an-okay-idea/