We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
All modules with the same prefix being found with nf-core modules update
### Description of the bug

Not sure whether this affects any other `nf-core modules` commands but if I want to update `minia` in my pipeline then it is correctly updated but another module with the same prefix `miniasm` is being installed too as you can see at the end of the console output below. I suspect there is a regex or glob that needs to be updated somewhere in the tools codebase to only find and update the required module.

### Command used and terminal output

```console
$ git clone https://github.com/nf-core/viralrecon.git 
Cloning into 'viralrecon'...
remote: Enumerating objects: 10345, done.
remote: Counting objects: 100% (100/100), done.
remote: Compressing objects: 100% (88/88), done.
remote: Total 10345 (delta 22), reused 42 (delta 4), pack-reused 10245
Receiving objects: 100% (10345/10345), 7.96 MiB | 5.16 MiB/s, done.
Resolving deltas: 100% (6536/6536), done.

$ cd viralrecon 

$ nf-core modules update minia

                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'

    nf-core/tools version 2.2



INFO     Updating 'nf-core/modules/minia'                                                                                                                                update.py:239
INFO     Downloaded 4 files to ./modules/nf-core/modules/minia                                                                                                  modules_command.py:273

$ git status 
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   modules.json
	deleted:    modules/nf-core/modules/minia/functions.nf
	modified:   modules/nf-core/modules/minia/main.nf
	modified:   modules/nf-core/modules/minia/meta.yml

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	modules/nf-core/modules/miniasm/

no changes added to commit (use "git add" and/or "git commit -a")
```


### System information

_No response_

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `nf_core/modules/modules_repo.py`
Content:
```
1 import os
2 import requests
3 import base64
4 import sys
5 import logging
6 import nf_core.utils
7 
8 log = logging.getLogger(__name__)
9 
10 
11 class ModulesRepo(object):
12     """
13     An object to store details about the repository being used for modules.
14 
15     Used by the `nf-core modules` top-level command with -r and -b flags,
16     so that this can be used in the same way by all sub-commands.
17     """
18 
19     def __init__(self, repo="nf-core/modules", branch=None):
20         self.name = repo
21         self.branch = branch
22 
23         # Don't bother fetching default branch if we're using nf-core
24         if not self.branch and self.name == "nf-core/modules":
25             self.branch = "master"
26 
27         # Verify that the repo seems to be correctly configured
28         if self.name != "nf-core/modules" or self.branch:
29 
30             # Get the default branch if not set
31             if not self.branch:
32                 self.get_default_branch()
33 
34             try:
35                 self.verify_modules_repo()
36             except LookupError:
37                 raise
38 
39         self.owner, self.repo = self.name.split("/")
40         self.modules_file_tree = {}
41         self.modules_avail_module_names = []
42 
43     def get_default_branch(self):
44         """Get the default branch for a GitHub repo"""
45         api_url = f"https://api.github.com/repos/{self.name}"
46         response = requests.get(api_url, auth=nf_core.utils.github_api_auto_auth())
47         if response.status_code == 200:
48             self.branch = response.json()["default_branch"]
49             log.debug(f"Found default branch to be '{self.branch}'")
50         else:
51             raise LookupError(f"Could not find repository '{self.name}' on GitHub")
52 
53     def verify_modules_repo(self):
54 
55         # Check if name seems to be well formed
56         if self.name.count("/") != 1:
57             raise LookupError(f"Repository name '{self.name}' should be of the format '<github_user_name>/<repo_name>'")
58 
59         # Check if repository exist
60         api_url = f"https://api.github.com/repos/{self.name}/branches"
61         response = requests.get(api_url, auth=nf_core.utils.github_api_auto_auth())
62         if response.status_code == 200:
63             branches = [branch["name"] for branch in response.json()]
64             if self.branch not in branches:
65                 raise LookupError(f"Branch '{self.branch}' not found in '{self.name}'")
66         else:
67             raise LookupError(f"Repository '{self.name}' is not available on GitHub")
68 
69         api_url = f"https://api.github.com/repos/{self.name}/contents?ref={self.branch}"
70         response = requests.get(api_url, auth=nf_core.utils.github_api_auto_auth())
71         if response.status_code == 200:
72             dir_names = [entry["name"] for entry in response.json() if entry["type"] == "dir"]
73             if "modules" not in dir_names:
74                 err_str = f"Repository '{self.name}' ({self.branch}) does not contain a 'modules/' directory"
75                 if "software" in dir_names:
76                     err_str += ".\nAs of version 2.0, the 'software/' directory should be renamed to 'modules/'"
77                 raise LookupError(err_str)
78         else:
79             raise LookupError(f"Unable to fetch repository information from '{self.name}' ({self.branch})")
80 
81     def get_modules_file_tree(self):
82         """
83         Fetch the file list from the repo, using the GitHub API
84 
85         Sets self.modules_file_tree
86              self.modules_avail_module_names
87         """
88         api_url = "https://api.github.com/repos/{}/git/trees/{}?recursive=1".format(self.name, self.branch)
89         r = requests.get(api_url, auth=nf_core.utils.github_api_auto_auth())
90         if r.status_code == 404:
91             raise LookupError("Repository / branch not found: {} ({})\n{}".format(self.name, self.branch, api_url))
92         elif r.status_code != 200:
93             raise LookupError(
94                 "Could not fetch {} ({}) tree: {}\n{}".format(self.name, self.branch, r.status_code, api_url)
95             )
96 
97         result = r.json()
98         assert result["truncated"] == False
99 
100         self.modules_file_tree = result["tree"]
101         for f in result["tree"]:
102             if f["path"].startswith(f"modules/") and f["path"].endswith("/main.nf") and "/test/" not in f["path"]:
103                 # remove modules/ and /main.nf
104                 self.modules_avail_module_names.append(f["path"].replace("modules/", "").replace("/main.nf", ""))
105         if len(self.modules_avail_module_names) == 0:
106             raise LookupError(f"Found no modules in '{self.name}'")
107 
108     def get_module_file_urls(self, module, commit=""):
109         """Fetch list of URLs for a specific module
110 
111         Takes the name of a module and iterates over the GitHub repo file tree.
112         Loops over items that are prefixed with the path 'modules/<module_name>' and ignores
113         anything that's not a blob. Also ignores the test/ subfolder.
114 
115         Returns a dictionary with keys as filenames and values as GitHub API URLs.
116         These can be used to then download file contents.
117 
118         Args:
119             module (string): Name of module for which to fetch a set of URLs
120 
121         Returns:
122             dict: Set of files and associated URLs as follows:
123 
124             {
125                 'modules/fastqc/main.nf': 'https://api.github.com/repos/nf-core/modules/git/blobs/65ba598119206a2b851b86a9b5880b5476e263c3',
126                 'modules/fastqc/meta.yml': 'https://api.github.com/repos/nf-core/modules/git/blobs/0d5afc23ba44d44a805c35902febc0a382b17651'
127             }
128         """
129         results = {}
130         for f in self.modules_file_tree:
131             if not f["path"].startswith("modules/{}".format(module)):
132                 continue
133             if f["type"] != "blob":
134                 continue
135             if "/test/" in f["path"]:
136                 continue
137             results[f["path"]] = f["url"]
138         if commit != "":
139             for path in results:
140                 results[path] = f"https://api.github.com/repos/{self.name}/contents/{path}?ref={commit}"
141         return results
142 
143     def download_gh_file(self, dl_filename, api_url):
144         """Download a file from GitHub using the GitHub API
145 
146         Args:
147             dl_filename (string): Path to save file to
148             api_url (string): GitHub API URL for file
149 
150         Raises:
151             If a problem, raises an error
152         """
153 
154         # Make target directory if it doesn't already exist
155         dl_directory = os.path.dirname(dl_filename)
156         if not os.path.exists(dl_directory):
157             os.makedirs(dl_directory)
158 
159         # Call the GitHub API
160         r = requests.get(api_url, auth=nf_core.utils.github_api_auto_auth())
161         if r.status_code != 200:
162             raise LookupError("Could not fetch {} file: {}\n {}".format(self.name, r.status_code, api_url))
163         result = r.json()
164         file_contents = base64.b64decode(result["content"])
165 
166         # Write the file contents
167         with open(dl_filename, "wb") as fh:
168             fh.write(file_contents)
169
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/nf_core/modules/modules_repo.py b/nf_core/modules/modules_repo.py
--- a/nf_core/modules/modules_repo.py
+++ b/nf_core/modules/modules_repo.py
@@ -128,7 +128,7 @@
         """
         results = {}
         for f in self.modules_file_tree:
-            if not f["path"].startswith("modules/{}".format(module)):
+            if not f["path"].startswith("modules/{}/".format(module)):
                 continue
             if f["type"] != "blob":
                 continue

{"golden_diff": "diff --git a/nf_core/modules/modules_repo.py b/nf_core/modules/modules_repo.py\n--- a/nf_core/modules/modules_repo.py\n+++ b/nf_core/modules/modules_repo.py\n@@ -128,7 +128,7 @@\n         \"\"\"\n         results = {}\n         for f in self.modules_file_tree:\n-            if not f[\"path\"].startswith(\"modules/{}\".format(module)):\n+            if not f[\"path\"].startswith(\"modules/{}/\".format(module)):\n                 continue\n             if f[\"type\"] != \"blob\":\n                 continue\n", "issue": "All modules with the same prefix being found with nf-core modules update\n### Description of the bug\n\nNot sure whether this affects any other `nf-core modules` commands but if I want to update `minia` in my pipeline then it is correctly updated but another module with the same prefix `miniasm` is being installed too as you can see at the end of the console output below. I suspect there is a regex or glob that needs to be updated somewhere in the tools codebase to only find and update the required module.\n\n### Command used and terminal output\n\n```console\n$ git clone https://github.com/nf-core/viralrecon.git \r\nCloning into 'viralrecon'...\r\nremote: Enumerating objects: 10345, done.\r\nremote: Counting objects: 100% (100/100), done.\r\nremote: Compressing objects: 100% (88/88), done.\r\nremote: Total 10345 (delta 22), reused 42 (delta 4), pack-reused 10245\r\nReceiving objects: 100% (10345/10345), 7.96 MiB | 5.16 MiB/s, done.\r\nResolving deltas: 100% (6536/6536), done.\r\n\r\n$ cd viralrecon \r\n\r\n$ nf-core modules update minia\r\n\r\n                                          ,--./,-.\r\n          ___     __   __   __   ___     /,-._.--~\\\r\n    |\\ | |__  __ /  ` /  \\ |__) |__         }  {\r\n    | \\| |       \\__, \\__/ |  \\ |___     \\`-._,-`-,\r\n                                          `._,._,'\r\n\r\n    nf-core/tools version 2.2\r\n\r\n\r\n\r\nINFO     Updating 'nf-core/modules/minia'                                                                                                                                update.py:239\r\nINFO     Downloaded 4 files to ./modules/nf-core/modules/minia                                                                                                  modules_command.py:273\r\n\r\n$ git status \r\nOn branch master\r\nYour branch is up-to-date with 'origin/master'.\r\n\r\nChanges not staged for commit:\r\n  (use \"git add/rm <file>...\" to update what will be committed)\r\n  (use \"git restore <file>...\" to discard changes in working directory)\r\n\tmodified:   modules.json\r\n\tdeleted:    modules/nf-core/modules/minia/functions.nf\r\n\tmodified:   modules/nf-core/modules/minia/main.nf\r\n\tmodified:   modules/nf-core/modules/minia/meta.yml\r\n\r\nUntracked files:\r\n  (use \"git add <file>...\" to include in what will be committed)\r\n\tmodules/nf-core/modules/miniasm/\r\n\r\nno changes added to commit (use \"git add\" and/or \"git commit -a\")\n```\n\n\n### System information\n\n_No response_\n", "before_files": [{"content": "import os\nimport requests\nimport base64\nimport sys\nimport logging\nimport nf_core.utils\n\nlog = logging.getLogger(__name__)\n\n\nclass ModulesRepo(object):\n    \"\"\"\n    An object to store details about the repository being used for modules.\n\n    Used by the `nf-core modules` top-level command with -r and -b flags,\n    so that this can be used in the same way by all sub-commands.\n    \"\"\"\n\n    def __init__(self, repo=\"nf-core/modules\", branch=None):\n        self.name = repo\n        self.branch = branch\n\n        # Don't bother fetching default branch if we're using nf-core\n        if not self.branch and self.name == \"nf-core/modules\":\n            self.branch = \"master\"\n\n        # Verify that the repo seems to be correctly configured\n        if self.name != \"nf-core/modules\" or self.branch:\n\n            # Get the default branch if not set\n            if not self.branch:\n                self.get_default_branch()\n\n            try:\n                self.verify_modules_repo()\n            except LookupError:\n                raise\n\n        self.owner, self.repo = self.name.split(\"/\")\n        self.modules_file_tree = {}\n        self.modules_avail_module_names = []\n\n    def get_default_branch(self):\n        \"\"\"Get the default branch for a GitHub repo\"\"\"\n        api_url = f\"https://api.github.com/repos/{self.name}\"\n        response = requests.get(api_url, auth=nf_core.utils.github_api_auto_auth())\n        if response.status_code == 200:\n            self.branch = response.json()[\"default_branch\"]\n            log.debug(f\"Found default branch to be '{self.branch}'\")\n        else:\n            raise LookupError(f\"Could not find repository '{self.name}' on GitHub\")\n\n    def verify_modules_repo(self):\n\n        # Check if name seems to be well formed\n        if self.name.count(\"/\") != 1:\n            raise LookupError(f\"Repository name '{self.name}' should be of the format '<github_user_name>/<repo_name>'\")\n\n        # Check if repository exist\n        api_url = f\"https://api.github.com/repos/{self.name}/branches\"\n        response = requests.get(api_url, auth=nf_core.utils.github_api_auto_auth())\n        if response.status_code == 200:\n            branches = [branch[\"name\"] for branch in response.json()]\n            if self.branch not in branches:\n                raise LookupError(f\"Branch '{self.branch}' not found in '{self.name}'\")\n        else:\n            raise LookupError(f\"Repository '{self.name}' is not available on GitHub\")\n\n        api_url = f\"https://api.github.com/repos/{self.name}/contents?ref={self.branch}\"\n        response = requests.get(api_url, auth=nf_core.utils.github_api_auto_auth())\n        if response.status_code == 200:\n            dir_names = [entry[\"name\"] for entry in response.json() if entry[\"type\"] == \"dir\"]\n            if \"modules\" not in dir_names:\n                err_str = f\"Repository '{self.name}' ({self.branch}) does not contain a 'modules/' directory\"\n                if \"software\" in dir_names:\n                    err_str += \".\\nAs of version 2.0, the 'software/' directory should be renamed to 'modules/'\"\n                raise LookupError(err_str)\n        else:\n            raise LookupError(f\"Unable to fetch repository information from '{self.name}' ({self.branch})\")\n\n    def get_modules_file_tree(self):\n        \"\"\"\n        Fetch the file list from the repo, using the GitHub API\n\n        Sets self.modules_file_tree\n             self.modules_avail_module_names\n        \"\"\"\n        api_url = \"https://api.github.com/repos/{}/git/trees/{}?recursive=1\".format(self.name, self.branch)\n        r = requests.get(api_url, auth=nf_core.utils.github_api_auto_auth())\n        if r.status_code == 404:\n            raise LookupError(\"Repository / branch not found: {} ({})\\n{}\".format(self.name, self.branch, api_url))\n        elif r.status_code != 200:\n            raise LookupError(\n                \"Could not fetch {} ({}) tree: {}\\n{}\".format(self.name, self.branch, r.status_code, api_url)\n            )\n\n        result = r.json()\n        assert result[\"truncated\"] == False\n\n        self.modules_file_tree = result[\"tree\"]\n        for f in result[\"tree\"]:\n            if f[\"path\"].startswith(f\"modules/\") and f[\"path\"].endswith(\"/main.nf\") and \"/test/\" not in f[\"path\"]:\n                # remove modules/ and /main.nf\n                self.modules_avail_module_names.append(f[\"path\"].replace(\"modules/\", \"\").replace(\"/main.nf\", \"\"))\n        if len(self.modules_avail_module_names) == 0:\n            raise LookupError(f\"Found no modules in '{self.name}'\")\n\n    def get_module_file_urls(self, module, commit=\"\"):\n        \"\"\"Fetch list of URLs for a specific module\n\n        Takes the name of a module and iterates over the GitHub repo file tree.\n        Loops over items that are prefixed with the path 'modules/<module_name>' and ignores\n        anything that's not a blob. Also ignores the test/ subfolder.\n\n        Returns a dictionary with keys as filenames and values as GitHub API URLs.\n        These can be used to then download file contents.\n\n        Args:\n            module (string): Name of module for which to fetch a set of URLs\n\n        Returns:\n            dict: Set of files and associated URLs as follows:\n\n            {\n                'modules/fastqc/main.nf': 'https://api.github.com/repos/nf-core/modules/git/blobs/65ba598119206a2b851b86a9b5880b5476e263c3',\n                'modules/fastqc/meta.yml': 'https://api.github.com/repos/nf-core/modules/git/blobs/0d5afc23ba44d44a805c35902febc0a382b17651'\n            }\n        \"\"\"\n        results = {}\n        for f in self.modules_file_tree:\n            if not f[\"path\"].startswith(\"modules/{}\".format(module)):\n                continue\n            if f[\"type\"] != \"blob\":\n                continue\n            if \"/test/\" in f[\"path\"]:\n                continue\n            results[f[\"path\"]] = f[\"url\"]\n        if commit != \"\":\n            for path in results:\n                results[path] = f\"https://api.github.com/repos/{self.name}/contents/{path}?ref={commit}\"\n        return results\n\n    def download_gh_file(self, dl_filename, api_url):\n        \"\"\"Download a file from GitHub using the GitHub API\n\n        Args:\n            dl_filename (string): Path to save file to\n            api_url (string): GitHub API URL for file\n\n        Raises:\n            If a problem, raises an error\n        \"\"\"\n\n        # Make target directory if it doesn't already exist\n        dl_directory = os.path.dirname(dl_filename)\n        if not os.path.exists(dl_directory):\n            os.makedirs(dl_directory)\n\n        # Call the GitHub API\n        r = requests.get(api_url, auth=nf_core.utils.github_api_auto_auth())\n        if r.status_code != 200:\n            raise LookupError(\"Could not fetch {} file: {}\\n {}\".format(self.name, r.status_code, api_url))\n        result = r.json()\n        file_contents = base64.b64decode(result[\"content\"])\n\n        # Write the file contents\n        with open(dl_filename, \"wb\") as fh:\n            fh.write(file_contents)\n", "path": "nf_core/modules/modules_repo.py"}], "after_files": [{"content": "import os\nimport requests\nimport base64\nimport sys\nimport logging\nimport nf_core.utils\n\nlog = logging.getLogger(__name__)\n\n\nclass ModulesRepo(object):\n    \"\"\"\n    An object to store details about the repository being used for modules.\n\n    Used by the `nf-core modules` top-level command with -r and -b flags,\n    so that this can be used in the same way by all sub-commands.\n    \"\"\"\n\n    def __init__(self, repo=\"nf-core/modules\", branch=None):\n        self.name = repo\n        self.branch = branch\n\n        # Don't bother fetching default branch if we're using nf-core\n        if not self.branch and self.name == \"nf-core/modules\":\n            self.branch = \"master\"\n\n        # Verify that the repo seems to be correctly configured\n        if self.name != \"nf-core/modules\" or self.branch:\n\n            # Get the default branch if not set\n            if not self.branch:\n                self.get_default_branch()\n\n            try:\n                self.verify_modules_repo()\n            except LookupError:\n                raise\n\n        self.owner, self.repo = self.name.split(\"/\")\n        self.modules_file_tree = {}\n        self.modules_avail_module_names = []\n\n    def get_default_branch(self):\n        \"\"\"Get the default branch for a GitHub repo\"\"\"\n        api_url = f\"https://api.github.com/repos/{self.name}\"\n        response = requests.get(api_url, auth=nf_core.utils.github_api_auto_auth())\n        if response.status_code == 200:\n            self.branch = response.json()[\"default_branch\"]\n            log.debug(f\"Found default branch to be '{self.branch}'\")\n        else:\n            raise LookupError(f\"Could not find repository '{self.name}' on GitHub\")\n\n    def verify_modules_repo(self):\n\n        # Check if name seems to be well formed\n        if self.name.count(\"/\") != 1:\n            raise LookupError(f\"Repository name '{self.name}' should be of the format '<github_user_name>/<repo_name>'\")\n\n        # Check if repository exist\n        api_url = f\"https://api.github.com/repos/{self.name}/branches\"\n        response = requests.get(api_url, auth=nf_core.utils.github_api_auto_auth())\n        if response.status_code == 200:\n            branches = [branch[\"name\"] for branch in response.json()]\n            if self.branch not in branches:\n                raise LookupError(f\"Branch '{self.branch}' not found in '{self.name}'\")\n        else:\n            raise LookupError(f\"Repository '{self.name}' is not available on GitHub\")\n\n        api_url = f\"https://api.github.com/repos/{self.name}/contents?ref={self.branch}\"\n        response = requests.get(api_url, auth=nf_core.utils.github_api_auto_auth())\n        if response.status_code == 200:\n            dir_names = [entry[\"name\"] for entry in response.json() if entry[\"type\"] == \"dir\"]\n            if \"modules\" not in dir_names:\n                err_str = f\"Repository '{self.name}' ({self.branch}) does not contain a 'modules/' directory\"\n                if \"software\" in dir_names:\n                    err_str += \".\\nAs of version 2.0, the 'software/' directory should be renamed to 'modules/'\"\n                raise LookupError(err_str)\n        else:\n            raise LookupError(f\"Unable to fetch repository information from '{self.name}' ({self.branch})\")\n\n    def get_modules_file_tree(self):\n        \"\"\"\n        Fetch the file list from the repo, using the GitHub API\n\n        Sets self.modules_file_tree\n             self.modules_avail_module_names\n        \"\"\"\n        api_url = \"https://api.github.com/repos/{}/git/trees/{}?recursive=1\".format(self.name, self.branch)\n        r = requests.get(api_url, auth=nf_core.utils.github_api_auto_auth())\n        if r.status_code == 404:\n            raise LookupError(\"Repository / branch not found: {} ({})\\n{}\".format(self.name, self.branch, api_url))\n        elif r.status_code != 200:\n            raise LookupError(\n                \"Could not fetch {} ({}) tree: {}\\n{}\".format(self.name, self.branch, r.status_code, api_url)\n            )\n\n        result = r.json()\n        assert result[\"truncated\"] == False\n\n        self.modules_file_tree = result[\"tree\"]\n        for f in result[\"tree\"]:\n            if f[\"path\"].startswith(f\"modules/\") and f[\"path\"].endswith(\"/main.nf\") and \"/test/\" not in f[\"path\"]:\n                # remove modules/ and /main.nf\n                self.modules_avail_module_names.append(f[\"path\"].replace(\"modules/\", \"\").replace(\"/main.nf\", \"\"))\n        if len(self.modules_avail_module_names) == 0:\n            raise LookupError(f\"Found no modules in '{self.name}'\")\n\n    def get_module_file_urls(self, module, commit=\"\"):\n        \"\"\"Fetch list of URLs for a specific module\n\n        Takes the name of a module and iterates over the GitHub repo file tree.\n        Loops over items that are prefixed with the path 'modules/<module_name>' and ignores\n        anything that's not a blob. Also ignores the test/ subfolder.\n\n        Returns a dictionary with keys as filenames and values as GitHub API URLs.\n        These can be used to then download file contents.\n\n        Args:\n            module (string): Name of module for which to fetch a set of URLs\n\n        Returns:\n            dict: Set of files and associated URLs as follows:\n\n            {\n                'modules/fastqc/main.nf': 'https://api.github.com/repos/nf-core/modules/git/blobs/65ba598119206a2b851b86a9b5880b5476e263c3',\n                'modules/fastqc/meta.yml': 'https://api.github.com/repos/nf-core/modules/git/blobs/0d5afc23ba44d44a805c35902febc0a382b17651'\n            }\n        \"\"\"\n        results = {}\n        for f in self.modules_file_tree:\n            if not f[\"path\"].startswith(\"modules/{}/\".format(module)):\n                continue\n            if f[\"type\"] != \"blob\":\n                continue\n            if \"/test/\" in f[\"path\"]:\n                continue\n            results[f[\"path\"]] = f[\"url\"]\n        if commit != \"\":\n            for path in results:\n                results[path] = f\"https://api.github.com/repos/{self.name}/contents/{path}?ref={commit}\"\n        return results\n\n    def download_gh_file(self, dl_filename, api_url):\n        \"\"\"Download a file from GitHub using the GitHub API\n\n        Args:\n            dl_filename (string): Path to save file to\n            api_url (string): GitHub API URL for file\n\n        Raises:\n            If a problem, raises an error\n        \"\"\"\n\n        # Make target directory if it doesn't already exist\n        dl_directory = os.path.dirname(dl_filename)\n        if not os.path.exists(dl_directory):\n            os.makedirs(dl_directory)\n\n        # Call the GitHub API\n        r = requests.get(api_url, auth=nf_core.utils.github_api_auto_auth())\n        if r.status_code != 200:\n            raise LookupError(\"Could not fetch {} file: {}\\n {}\".format(self.name, r.status_code, api_url))\n        result = r.json()\n        file_contents = base64.b64decode(result[\"content\"])\n\n        # Write the file contents\n        with open(dl_filename, \"wb\") as fh:\n            fh.write(file_contents)\n", "path": "nf_core/modules/modules_repo.py"}]}