-
Please describe your feature requestI have a module in a root of a repo which is loaded by scripts in root but also in various subfolders of the repo. Is there a way of pointing |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
I’m not exactly sure what you mean by “move the scripts around”, and how In general, Besides this there’s also the option |
Beta Was this translation helpful? Give feedback.
-
Apologies for being too terse in the initial description. I'm using box in a project and have top level folder Now, my point refers to loading the module from the scripts in that I need to make sure |
Beta Was this translation helpful? Give feedback.
-
I see! In this case, setting the options(box.path = c(here::here(), getOptions('box.path'))) This would need to be e.g. in a project-specific In general, though, the idea of ‘box’ is indeed for submodules within a project to use relative imports — that is, relative to the current module rather than relative to some encompassing project. In particular, relative imports (which start either with But your use-case looks more like something where |
Beta Was this translation helpful? Give feedback.
-
Awesome, thanks! |
Beta Was this translation helpful? Give feedback.
I see! In this case, setting the
box.path
option should work:This would need to be e.g. in a project-specific
.Rprofile
file. Then,box::use(codebox/whatever)
should work everywhere in the project.In general, though, the idea of ‘box’ is indeed for submodules within a project to use relative imports — that is, relative to the current module rather than relative to some encompassing project. In particular, relative imports (which start either with
./
or with../
) will always work, even in situations wherehere::here
doesn’t.But your use-case looks more like something where
codebox
is a global helper module, and in that case usi…