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

Feature request: determine order of channels #26

Open
clintval opened this issue Jan 5, 2019 · 0 comments
Open

Feature request: determine order of channels #26

clintval opened this issue Jan 5, 2019 · 0 comments

Comments

@clintval
Copy link

clintval commented Jan 5, 2019

I love this plugin, so first off, thanks for the time you took to create and publish it!


Currently the channels parameter allows one to append channels to the channel list when using conda. The code for this is here and although the language suggests addition, the action is an append:

ansible-conda/conda.py

Lines 175 to 189 in f26ac9f

def add_channels_to_command(command, channels):
"""
Add extra channels to a conda command by splitting the channels
and putting "--channel" before each one.
"""
if channels:
channels = channels.strip().split()
dashc = []
for channel in channels:
dashc.append('--channel')
dashc.append(channel)
return command[:2] + dashc + command[2:]
else:
return command

Using the Bioconda channel requires addition of channels in a known order so installation is predictable and dependencies are matched correctly:

❯ conda config --add channels defaults
❯ conda config --add channels bioconda
❯ conda config --add channels conda-forge

So the channels order become:

❯ conda config --show channels

channels:
  - conda-forge
  - bioconda
  - defaults

Would you be willing to support overriding of the channel order via configuration? If you have a good idea on how to achieve this I would be willing to submit a PR!

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

No branches or pull requests

1 participant