<commit_before>namespace eval ::mug::install {
    namespace export install install_directory

    proc local_repo_exists {repo_name} {
        # Check if we've got a local repo already
        set path "mug_packages/$repo_name"
        if {[file exists $path]} {
            if {[file isdirectory $path]} {
                return 1
            } else {
                return -code error "Non-directory found in $path"
            }
        }
        return 0
    }

    # We've got a repo directory - is it the same as the current?
    proc is_current_repo {repo_name repo_tag repo_url} {
        set repo_details [::mug::utils::get_installed_package_details "mug_packages/$repo_name"]
        if {$repo_details != "$repo_name-$repo_tag-$repo_url\n"} {
            return 0
        }
        return 1
    }

    proc ensure_mug_packages_directory {} {
        set path [install_directory]
        if {[file exists $path]} {
            if {[file isdirectory $path] == 0} {
                return -code error "Non-directory found in $path"
            }
        } else {
            file mkdir $path
        }
    }

    proc install_item {item} {
        # TODO: This should probably do something more elegant than blitzing the auto_include
        if {[::mug::git::is_git_url $item] == 1} {
            ::mug::git::install $item
            ::mug::autoloader::provide_autoloader [pwd]
        } else {
            ::mug::teapot::install $item
            ::mug::autoloader::provide_autoloader [pwd]
        }
    }

    proc install_directory {} {
        return "mug_packages"
    }

    proc clean_repo {repo_name repo_tag repo_url} {
        if {[local_repo_exists $repo_name]} {
            if {[is_current_repo $repo_name $repo_tag $repo_url] != 1} {
                # Remove the repo already there
                file delete -force ./mug_packages/$repo_name
            }
        } 
    }

    proc install {items} {
        # Do we have any items?
        if {[llength $items] > 0} {
            ensure_mug_packages_directory
            foreach item $items {
                puts [install_item $item]
            }
        } else {
            # Otherwise install from a file
            if {[file exists "mug_requirements.txt"]} {
                set items [split [::mug::utils::slurp_file "mug_requirements.txt"] "\n"]
                foreach item $items {
                    set item [string trim $item]<commit_msg>Fixed non-printing of Mug install items<commit_after>namespace eval ::mug::install {
    namespace export install install_directory

    proc local_repo_exists {repo_name} {
        # Check if we've got a local repo already
        set path "mug_packages/$repo_name"
        if {[file exists $path]} {
            if {[file isdirectory $path]} {
                return 1
            } else {
                return -code error "Non-directory found in $path"
            }
        }
        return 0
    }

    # We've got a repo directory - is it the same as the current?
    proc is_current_repo {repo_name repo_tag repo_url} {
        set repo_details [::mug::utils::get_installed_package_details "mug_packages/$repo_name"]
        if {$repo_details != "$repo_name-$repo_tag-$repo_url\n"} {
            return 0
        }
        return 1
    }

    proc ensure_mug_packages_directory {} {
        set path [install_directory]
        if {[file exists $path]} {
            if {[file isdirectory $path] == 0} {
                return -code error "Non-directory found in $path"
            }
        } else {
            file mkdir $path
        }
    }

    proc install_item {item} {
        # TODO: This should probably do something more elegant than blitzing the auto_include
        if {[::mug::git::is_git_url $item] == 1} {
            set output [::mug::git::install $item]
            ::mug::autoloader::provide_autoloader [pwd]
        } else {
            set output [::mug::teapot::install $item]
            ::mug::autoloader::provide_autoloader [pwd]
        }
        return $output
    }

    proc install_directory {} {
        return "mug_packages"
    }

    proc clean_repo {repo_name repo_tag repo_url} {
        if {[local_repo_exists $repo_name]} {
            if {[is_current_repo $repo_name $repo_tag $repo_url] != 1} {
                # Remove the repo already there
                file delete -force ./mug_packages/$repo_name
            }
        } 
    }

    proc install {items} {
        # Do we have any items?
        if {[llength $items] > 0} {
            ensure_mug_packages_directory
            foreach item $items {
                puts [install_item $item]
            }
        } else {
            # Otherwise install from a file
            if {[file exists "mug_requirements.txt"]} {
                ensure_mug_packages_directory
                set items [split [::mug::utils::slurp_file "mug_requirements.txt"] "\n"]
                foreach item $items {
                    set item [string trim $item]
{'fraction_non_alphanumeric': 0.09793297210515754, 'fraction_numerical': 0.0032109171182018864, 'mean_word_length': 1.768888888888889, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4068663', 'n_tokens_mistral': 1485, 'n_tokens_neox': 1424, 'n_words': 395}