-
Notifications
You must be signed in to change notification settings - Fork 353
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 ability to define conda channels in plugins via tljh_extra_user_conda_channels
#829
Conversation
Thanks for submitting your first pull request! You are awesome! 🤗 |
Hmm, the integration tests seem to be failing for reasons outside of my changes but the unit-tests I added pass fine. Any thoughts? |
tljh_extra_user_conda_channels
Apologies for the really late response, @JudoWill. I think this is a good and useful hook to add. I don't seem to have the rights to update this PR, but I've updated this to work with the latest master in #942 (while preserving credit for your commits). I will work on merging that if the tests pass. |
if conda_packages: | ||
logger.info( | ||
"Installing {} user conda packages collected from plugins: {}".format( | ||
len(conda_packages), " ".join(conda_packages) | ||
) | ||
) | ||
conda.ensure_conda_packages(USER_ENV_PREFIX, conda_packages) | ||
conda.ensure_conda_packages(USER_ENV_PREFIX, conda_packages, conda_channels=conda_channels) |
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.
This is the cause of the failing tests - it's passed as conda_channels
here but is defined as channels
This PR addresses issue #828. It adds a
tljh_extra_user_conda_channels
hook to allow plugin developers to change the conda channels during user environment install. Adding an extra hook seems to be the most elegant solution as it allows install logic to be encapsulated in the plugin as opposed to requiring the end-user to add it during the install command.I've added unit-tests, integration tests, and a note to the documentation. If there are any stylistic changes you'd like, I'd be happy to adjust them.