From 43af5b10ff544861a23f0e55e11ff616a866d06b Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Mon, 11 Dec 2023 14:52:31 +0100 Subject: [PATCH 1/3] Sort the list in --- CHANGELOG.md | 1 + nf_core/modules/modules_json.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1279e9249..234c89191f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ - Add mypy to pre-commit config for the tools repo ([#2545](https://github.com/nf-core/tools/pull/2545)) - Use Path objects for ComponentCreate and update the structure of components templates ([#2551](https://github.com/nf-core/tools/pull/2551)). - GitPod base image: swap tool installation back to `conda` from `mamba` ([#2566](https://github.com/nf-core/tools/pull/2566)). +- Sort the `installed_by` list in `modules.json` ([]()). # [v2.10 - Nickel Ostrich](https://github.com/nf-core/tools/releases/tag/2.10) + [2023-09-25] diff --git a/nf_core/modules/modules_json.py b/nf_core/modules/modules_json.py index 9c3d1ae9b1..8a8c6153bb 100644 --- a/nf_core/modules/modules_json.py +++ b/nf_core/modules/modules_json.py @@ -678,7 +678,7 @@ def update( repo_component_entry[component_name]["installed_by"] = [installed_by] finally: new_installed_by = repo_component_entry[component_name]["installed_by"] + list(installed_by_log) - repo_component_entry[component_name]["installed_by"] = [*set(new_installed_by)] + repo_component_entry[component_name]["installed_by"] = [*set(new_installed_by)].sort() # Sort the 'modules.json' repo entries self.modules_json["repos"] = nf_core.utils.sort_dictionary(self.modules_json["repos"]) From 1fd25de492b40c2f1fa04aeec860545e48d50cfe Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Mon, 11 Dec 2023 15:12:48 +0100 Subject: [PATCH 2/3] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 234c89191f..dc157d4ed9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,7 +41,7 @@ - Add mypy to pre-commit config for the tools repo ([#2545](https://github.com/nf-core/tools/pull/2545)) - Use Path objects for ComponentCreate and update the structure of components templates ([#2551](https://github.com/nf-core/tools/pull/2551)). - GitPod base image: swap tool installation back to `conda` from `mamba` ([#2566](https://github.com/nf-core/tools/pull/2566)). -- Sort the `installed_by` list in `modules.json` ([]()). +- Sort the `installed_by` list in `modules.json` ([#2570](https://github.com/nf-core/tools/pull/2570)). # [v2.10 - Nickel Ostrich](https://github.com/nf-core/tools/releases/tag/2.10) + [2023-09-25] From 954daeed9968a564b7c6d8105612186e610d41c8 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Mon, 11 Dec 2023 15:35:26 +0100 Subject: [PATCH 3/3] Sort the installed_by list in modules.json, now right --- nf_core/modules/modules_json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/modules/modules_json.py b/nf_core/modules/modules_json.py index 8a8c6153bb..7ea76938ec 100644 --- a/nf_core/modules/modules_json.py +++ b/nf_core/modules/modules_json.py @@ -678,7 +678,7 @@ def update( repo_component_entry[component_name]["installed_by"] = [installed_by] finally: new_installed_by = repo_component_entry[component_name]["installed_by"] + list(installed_by_log) - repo_component_entry[component_name]["installed_by"] = [*set(new_installed_by)].sort() + repo_component_entry[component_name]["installed_by"] = sorted([*set(new_installed_by)]) # Sort the 'modules.json' repo entries self.modules_json["repos"] = nf_core.utils.sort_dictionary(self.modules_json["repos"])