Skip to content
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

Closed
wants to merge 4 commits into from

Conversation

JudoWill
Copy link

@JudoWill JudoWill commented Sep 2, 2022

  • Add / update documentation
  • Add tests

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.

@welcome
Copy link

welcome bot commented Sep 2, 2022

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@JudoWill
Copy link
Author

JudoWill commented Sep 2, 2022

Hmm, the integration tests seem to be failing for reasons outside of my changes but the unit-tests I added pass fine.

Any thoughts?

@consideRatio consideRatio reopened this May 13, 2023
@consideRatio consideRatio changed the title Add the ability to define conda channels in plugins Add the ability to define conda channels in plugins (tljh_extra_user_conda_channels) May 13, 2023
@consideRatio consideRatio changed the title Add the ability to define conda channels in plugins (tljh_extra_user_conda_channels) Add the ability to define conda channels in plugins via tljh_extra_user_conda_channels May 13, 2023
@yuvipanda
Copy link
Collaborator

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)
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants