-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
qenv is not reproducible - library calls #93
Comments
@Polkas yes I agree that packages from the session info is too much to show and many of the packages in the session are not related to execution within qenv. I think this is more
Any other ideas? |
TL;DR I do not relate this issue in any way to teal or teal apps. qenv should always provide reproducible code or a proper warnings if not. The internal qenv libraries are NEUTRAL for a qenv search. Because of the default new_env <- rlang::env_clone(env, parent = parent.env(.GlobalEnv)) we are on purpose offering all loaded in the session packages for the qenv. So we open the door for lack of reproducibility as later are not considered when get_code is used. Then it is a clear qenv problem for me. More than that we could not use libraries inside the qenv. ranger is not loaded as the primary
to make it working we need such trick:
|
@Polkas yes true. If |
PROBLEM 1 lack of library calls in get_code The simplest solution is to ask end users to add all proper library calls in the one separated eval_code but then they will not be on the top of the code. library calls have to be separated from code which using them, both need to be in different eval_code. Please check examples. IDEAS to think about:
NOT WORK
WORK
NOT WORK
|
Also related insightsengineering/teal#593 |
Possible to include `library` call in `eval_code` #93
qenv
is not reproducible as not taking into account libraries from its environment.It will be the best to not take blindly all loaded packages in the Session.
Possible we should not use the parent of Globalenv for default environment, and always demand library calls in the code.
The text was updated successfully, but these errors were encountered: