Skip to content

Commit

Permalink
Merge pull request #18859 from bernt-matthias/topic/conda-defaults-24.1
Browse files Browse the repository at this point in the history
[24.1] Remove defaults channel for conda usage
  • Loading branch information
nsoranzo authored Oct 22, 2024
2 parents 1a6b7fe + 56fae9b commit 2cedc9a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 26 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/osx_startup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ jobs:
with:
path: .tox
key: tox-cache-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-osx
- name: Install miniconda # use this job to test using Python from a conda environment
- name: Install miniforge # use this job to test using Python from a conda environment
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: ''
- name: Restore client cache
uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion doc/source/admin/dependency_resolvers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ debug
ensure_channels
Conda channels to enable by default. See https://conda.io/docs/user-guide/tasks/manage-channels.html for more
information about channels. This defaults to the value of the global ``conda_ensure_channels`` option or
``iuc,conda-forge,bioconda,defaults`` otherwise. This order should be consistent with the `Bioconda prescribed
``conda-forge,bioconda`` otherwise. This order should be consistent with the `Bioconda prescribed
order <https://github.com/bioconda/bioconda-recipes/blob/master/config.yml>`__ if it includes ``bioconda``.

auto_install
Expand Down
2 changes: 1 addition & 1 deletion doc/source/admin/galaxy_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@
:Description:
conda channels to enable by default
(https://conda.io/docs/user-guide/tasks/manage-channels.html)
:Default: ``conda-forge,bioconda,defaults``
:Default: ``conda-forge,bioconda``
:Type: str


Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/config/sample/galaxy.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ galaxy:

# conda channels to enable by default
# (https://conda.io/docs/user-guide/tasks/manage-channels.html)
#conda_ensure_channels: conda-forge,bioconda,defaults
#conda_ensure_channels: conda-forge,bioconda

# Use locally-built conda packages.
#conda_use_local: false
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/config/schemas/config_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ mapping:
conda_ensure_channels:
type: str
default: conda-forge,bioconda,defaults
default: conda-forge,bioconda
required: false
desc: |
conda channels to enable by default
Expand Down
30 changes: 9 additions & 21 deletions lib/galaxy/tool_util/deps/conda_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,10 @@ def conda_link() -> str:
else:
url = "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-x86_64.sh"
else:
if sys.maxsize > 2**32:
if "arm64" in platform.platform():
url = "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh"
else:
url = "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh"
if "arm64" in platform.platform():
url = "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh"
else:
url = "https://repo.anaconda.com/miniconda/Miniconda3-4.5.12-Linux-x86.sh"
url = "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh"
return url


Expand All @@ -75,21 +72,12 @@ def find_conda_prefix() -> str:
for Miniconda installs.
"""
home = os.path.expanduser("~")
miniconda_2_dest = os.path.join(home, "miniconda2")
miniconda_3_dest = os.path.join(home, "miniconda3")
anaconda_2_dest = os.path.join(home, "anaconda2")
anaconda_3_dest = os.path.join(home, "anaconda3")
# Prefer miniconda3 install if both available
if os.path.exists(miniconda_3_dest):
return miniconda_3_dest
elif os.path.exists(miniconda_2_dest):
return miniconda_2_dest
elif os.path.exists(anaconda_3_dest):
return anaconda_3_dest
elif os.path.exists(anaconda_2_dest):
return anaconda_2_dest
else:
return miniconda_3_dest
destinations = ["miniforge3", "miniconda3", "miniconda2", "anaconda3", "anaconda2"]
for destination in destinations:
destination = os.path.join(home, destination)
if os.path.exists(destination):
return destination
return os.path.join(home, "miniforge3")


class CondaContext(installable.InstallableContext):
Expand Down

0 comments on commit 2cedc9a

Please sign in to comment.