-
Notifications
You must be signed in to change notification settings - Fork 76
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
Plugin install: use micromamba to make sure git is available #1733
Conversation
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.
Thanks @emlys , I just had a few questions and suggestions.
['clone', '--depth', '1', '--no-checkout', pluginURL, tmpPluginDir] | ||
micromamba, | ||
['run', '--prefix', `"${baseEnvPrefix}"`, | ||
'git', 'clone', '--depth', '1', '--no-checkout', pluginURL, tmpPluginDir] |
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.
I haven't really tested this out myself on a bare bones VM, but do you think we'll need to set any basic git configuration, like username, to avoid any git prompts when calling git clone
?
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.
Would that be the same as #1712? I tried to reproduce the issue by temporarily renaming my .gitconfig
and confirming that my user.name
was no longer set in the output of git config --list
. I didn't get any prompts during plugin installation. Maybe it only affects windows?
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.
Okay, thanks for trying to test that out. For this PR I think it's okay to see if we come across it in the wild and can take it up from there.
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.
Thanks @emlys , looks good!
Description
Fixes #1713
Creates an
invest_base
environment that contains git, and runs the subsequent git commands in that env, so we don't have to assume that git is available on the system.Also specifies a prefix (path) for the base and plugin environments, rather than using the
--name
. This resolves a warning I was seeing about no root prefix specified - and keeps the invest-specific environments contained in the workbench resources directory, rather than mixing with other envs the user might have in the default location. Also removes the need to look up the env location inmamba info
.Also throwing in a fix for #1652, since it's so small - just read in the conda dependencies from a pyproject.toml configuration, rather than hard-coding.
Checklist