From 60f080ecf6de70f838727a36ca91cde6880f31c5 Mon Sep 17 00:00:00 2001 From: Hind Montassif Date: Fri, 31 May 2024 11:50:59 +0200 Subject: [PATCH] Remove traces --- .github/workflows/unix_impl.yml | 2 +- libmamba/src/api/channel_loader.cpp | 11 ----------- libmamba/src/download/downloader.cpp | 4 ---- libmamba/src/download/mirror_impl.cpp | 6 ------ micromamba/tests/helpers.py | 1 - micromamba/tests/test_create.py | 3 +-- 6 files changed, 2 insertions(+), 25 deletions(-) diff --git a/.github/workflows/unix_impl.yml b/.github/workflows/unix_impl.yml index 406d5dc71b..7d04dde8e3 100644 --- a/.github/workflows/unix_impl.yml +++ b/.github/workflows/unix_impl.yml @@ -161,7 +161,7 @@ jobs: run: | export TEST_MAMBA_EXE=$(pwd)/build/micromamba/mamba unset CONDARC # Interferes with tests - python -m pytest micromamba/tests/test_create.py::test_create_with_oci_mirrored_channels \ + python -m pytest micromamba/tests/ \ ${{ runner.debug == 'true' && '-v --capture=tee-sys' || '--exitfirst' }} verify_pkg_tests: diff --git a/libmamba/src/api/channel_loader.cpp b/libmamba/src/api/channel_loader.cpp index 9635f019a8..299780a509 100644 --- a/libmamba/src/api/channel_loader.cpp +++ b/libmamba/src/api/channel_loader.cpp @@ -4,8 +4,6 @@ // // The full license is in the file LICENSE, distributed with this software. -#include - #include "mamba/api/channel_loader.hpp" #include "mamba/core/channel_context.hpp" #include "mamba/core/download_progress_bar.hpp" @@ -129,17 +127,8 @@ namespace mamba std::vector error_list; - // if (ctx.mirrored_channels.size()) - // { - // std::cout << "ctx.mirrored_channels size: " << - // ctx.mirrored_channels.size() - // << std::endl; - // } for (const auto& mirror : ctx.mirrored_channels) { - // std::cout << "mirror first: " << mirror.first - // << " , mirror.second: " << mirror.second[0] << - // std::endl; for (auto channel : channel_context.make_channel(mirror.first, mirror.second)) { create_mirrors(channel, ctx.mirrors); diff --git a/libmamba/src/download/downloader.cpp b/libmamba/src/download/downloader.cpp index a4b6fdadd8..b6c6bf5c3d 100644 --- a/libmamba/src/download/downloader.cpp +++ b/libmamba/src/download/downloader.cpp @@ -4,9 +4,6 @@ // // The full license is in the file LICENSE, distributed with this software. -#include -#include - #include "mamba/core/invoke.hpp" #include "mamba/core/thread_utils.hpp" #include "mamba/core/util.hpp" @@ -595,7 +592,6 @@ namespace mamba::download : p_mirror(&mirror) , m_request_generators(p_mirror->get_request_generators(url_path, spec_sha256)) { - // std::cout << "typeid: " << typeid(*p_mirror).name() << std::endl; } expected_t MirrorAttempt::invoke_on_success(const Success& res) const diff --git a/libmamba/src/download/mirror_impl.cpp b/libmamba/src/download/mirror_impl.cpp index f78202c24f..d10f8807c6 100644 --- a/libmamba/src/download/mirror_impl.cpp +++ b/libmamba/src/download/mirror_impl.cpp @@ -4,8 +4,6 @@ // // The full license is in the file LICENSE, distributed with this software. -#include - #include #include "mamba/core/output.hpp" @@ -218,7 +216,6 @@ namespace mamba::download const std::string& split_path ) const { - // std::cout << "build_authentication_request " /*<< split_path*/ << std::endl; ArtifactData* data = get_artifact_data(split_path); std::string auth_url = get_authentication_url(split_path); MirrorRequest req(initial_request.name, auth_url); @@ -252,7 +249,6 @@ namespace mamba::download const std::string& split_tag ) const { - // std::cout << "build_manifest_request " /*<< split_path*/ << std::endl; ArtifactData* data = get_artifact_data(split_path); std::string manifest_url = get_manifest_url(split_path, split_tag); std::vector headers = { get_authentication_header(data->token), @@ -297,7 +293,6 @@ namespace mamba::download MirrorRequest OCIMirror::build_blob_request(const Request& initial_request, const std::string& split_path) const { - // std::cout << "build_blob_request " /*<< split_path*/ << std::endl; const ArtifactData* data = get_artifact_data(split_path); std::string url = get_blob_url(split_path, data->sha256sum); std::vector headers = { get_authentication_header(data->token) }; @@ -381,7 +376,6 @@ namespace mamba::download } else if (util::starts_with(url, "oci://")) { - // std::cout << "OCI MIRROR" << std::endl; const auto parsed_url = util::URL::parse(url).value(); return std::make_unique( util::concat("https://", parsed_url.host()), // we use "https" as scheme instead diff --git a/micromamba/tests/helpers.py b/micromamba/tests/helpers.py index 5adb55db0a..51621345bf 100644 --- a/micromamba/tests/helpers.py +++ b/micromamba/tests/helpers.py @@ -177,7 +177,6 @@ def create( if (dry_run_tests == DryRun.DRY) and "--dry-run" not in args and not no_dry_run: cmd += ["--dry-run"] - print("create cmd: ", cmd) try: res = subprocess_run(*cmd, **kwargs) if "--json" in args: diff --git a/micromamba/tests/test_create.py b/micromamba/tests/test_create.py index e4bea2509f..965738d847 100644 --- a/micromamba/tests/test_create.py +++ b/micromamba/tests/test_create.py @@ -1204,8 +1204,7 @@ def test_create_with_oci_mirrored_channels(tmp_home, tmp_root_prefix, tmp_path, default_channel=False, no_rc=False, ) - print(res) - # assert(False) + assert res["actions"]["PREFIX"] == str(env_prefix) for pkg in res["actions"]["LINK"]: assert pkg["url"].startswith(