-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add the optional install_pkgs
keyword argument to the @load
macro
#346
Conversation
install_packages
keyword argument to the @load
macroinstall_packages
keyword argument to the @load
macro
I really like this proposal. @DilumAluthge In case |
Maybe for consistency with |
Alternatively one could show a yes/no option to the user of the package is
not installed. That would help with interactive sessions.
…On Mon, Nov 30, 2020, 00:52 Anthony Blaom, PhD ***@***.***> wrote:
Maybe for consistency with pkg=... option, we should call this new option
install_pkgs??
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#346 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZQW3M2FIIZT7U2AXHPZFDSSMJJVANCNFSM4UGJARDA>
.
|
@juliohm Not sure I understand the suggestion here. I'm certainly not keen on interactive behaviour by default, if that is what you are suggesting. We could instead have the flag |
I was thinking about something along the lines of Right now the user has to interrupt his/her flow of thought, jump in the package manager, and then later come back to what he/she was originally doing. Maybe a |
So to flush out @juliohm 's proposal, we have a single new flag
If @juliohm Is this close enough to what you have in mind? This would be more convenient and beginner-friendly than the status quo. Here are the down-sides as I see them:
This small bit of the interface has been a frequent discussion point and changes. Be great to get more feedback before proceeding. @ExpandingMan @DilumAluthge @tlienart @CameronBieganek Your thoughts? |
This is a deal-breaker for me. If we put interactive behavior into the If we really really need interactive behavior by default, that should go into a separate macro |
I agree that it would be nice to have some kind of convenience feature for actually installing the packages, especially since the current ecosystem consists of a large number of disparate interface packages. Expecting users to manage these entirely on their own seems excessive, regardless of whether users are "beginners". That said, I'm not yet sure what I think would be the best approach here. My first thought would be to have a completely separate macro for package installation. I also agree with your concern about the behavior being interactive "by default" (although the default would be So, at first glance, having a keyword argument maybe |
install_packages
keyword argument to the @load
macroinstall_pkgs
keyword argument to the @load
macro
Codecov Report
@@ Coverage Diff @@
## dev #346 +/- ##
==========================================
+ Coverage 79.36% 79.72% +0.35%
==========================================
Files 11 11
Lines 848 858 +10
==========================================
+ Hits 673 684 +11
+ Misses 175 174 -1
Continue to review full report at Codecov.
|
Now that #340 has been merged, maybe the way to go is to make |
Thanks for that feedback all. As @ExpandingMan suggests, let's sleep on 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.
Looks good to me.
Thanks all for the feedback. Although there is no consensus, the best compromise would in my view be:
@DilumAluthge Are you happy for me to merge? |
Sounds good to me! |
This pull request adds the optional
install_pkgs
keyword argument to the@load
macro.If
install_pkgs
istrue
, then any necessary packages will automatically be installed.The default value is
install_pkgs=false
.Example usage:
Motivation
@juliohm has brought up that installing all of the necessary packages is one of the pain points for Julia beginners when they first start out using MLJ.
Therefore, we can tell these beginner users to use
install_pkgs=true
, and then the necessary packages will automatically be installed for them.