Skip to content

Fix "planemo conda_search".#826

Merged
jmchilton merged 2 commits intogalaxyproject:masterfrom
jmchilton:conda_search
May 16, 2018
Merged

Fix "planemo conda_search".#826
jmchilton merged 2 commits intogalaxyproject:masterfrom
jmchilton:conda_search

Conversation

@jmchilton
Copy link
Member

There was a change in the galaxy-lib interface it used that broke it, and the underlying CLI seems to require * to do a more SQL-like search now so I've updated that as well.

Fixes #824.

There was a change in the galaxy-lib interface it used that broke it, and the underlying CLI seems to require * to do a more SQL-like search now so I've updated that as well.

Fixes galaxyproject#824.
"""
conda_context = build_conda_context(ctx, handle_auto_init=True, **kwds)
conda_context.exec_command("search", [term])
args = conda_context._override_channels_args + ["*%s*" % term]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not going to work on older Conda:

$ ~/miniconda3/bin/conda --version
conda 4.3.33
$ ~/miniconda3/bin/conda search '*samt*'

CommandArgumentError: Failed to compile regex pattern for search: *samt*
regex error: error('nothing to repeat at position 0',)

Last released version of Planemo would work only with Conda 4.3.* or older but my previous fix would only work with 4.4 or newer (thanks to @nsoranzo for the catch). This should now work with any Conda 3 or 4 version I assume - at least the couple I have tried.
@jmchilton jmchilton merged commit bbb60f9 into galaxyproject:master May 16, 2018
@jmchilton
Copy link
Member Author

Thanks for the review and the catch @nsoranzo.

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

Successfully merging this pull request may close these issues.

2 participants