From aa054cbb3dfcf37966ce68767ce1ac7a69891af0 Mon Sep 17 00:00:00 2001 From: Hind Montassif Date: Mon, 28 Oct 2024 15:04:20 +0100 Subject: [PATCH] Fix doc --- docs/source/usage/solver.rst | 4 +++- docs/source/usage/specs.rst | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/source/usage/solver.rst b/docs/source/usage/solver.rst index 91a045655e..3c3f6866d8 100644 --- a/docs/source/usage/solver.rst +++ b/docs/source/usage/solver.rst @@ -41,8 +41,10 @@ The first way to add a repository is from a list of |PackageInfo| using import libmambapy + channel_alias = libmambapy.specs.CondaURL.parse("https://conda.anaconda.org") + db = libmambapy.solver.libsolv.Database( - libmambapy.specs.ChannelResolveParams(channel_alias="https://conda.anaconda.org") + libmambapy.specs.ChannelResolveParams(channel_alias=channel_alias) ) repo1 = db.add_repo_from_packages( diff --git a/docs/source/usage/specs.rst b/docs/source/usage/specs.rst index c154da9bae..83580d3815 100644 --- a/docs/source/usage/specs.rst +++ b/docs/source/usage/specs.rst @@ -151,11 +151,12 @@ All parameters that influence this resolution must be provided explicitly. .. code:: python import libmambapy.specs as specs + import libmambapy.specs.CondaURL as CondaURL uc = specs.UnresolvedChannel.parse("conda-forge[prius-avx42]") chan, *_ = specs.Channel.resolve( uc, - channel_alias="https://repo.mamba.pm" + channel_alias=CondaURL.parse("https://repo.mamba.pm") # ... ) @@ -168,11 +169,12 @@ There are no hard-coded names: .. code:: python import libmambapy.specs as specs + import libmambapy.specs.CondaURL as CondaURL uc = specs.UnresolvedChannel.parse("defaults") chan, *_ = specs.Channel.resolve( uc, - channel_alias="https://repo.mamba.pm" + channel_alias=CondaURL.parse("https://repo.mamba.pm") # ... )