From 2d5ecc7f1e367c4f412d86fdfaa5aa8bfedda677 Mon Sep 17 00:00:00 2001 From: Alexander Puck Neuwirth Date: Sun, 18 Feb 2024 21:01:23 +0100 Subject: [PATCH 1/4] Add new 'authors' to default for json software listing --- easybuild/tools/docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/docs.py b/easybuild/tools/docs.py index 13f2c11c27..0ef2352e34 100644 --- a/easybuild/tools/docs.py +++ b/easybuild/tools/docs.py @@ -778,7 +778,7 @@ def list_software(output_format=FORMAT_TXT, detailed=False, only_installed=False else: toolchain = '%s/%s' % (ec['toolchain']['name'], ec['toolchain']['version']) - keys = ['description', 'homepage', 'version', 'versionsuffix'] + keys = ['description', 'homepage', 'version', 'versionsuffix', 'authors'] info = {'toolchain': toolchain} for key in keys: From 28452703c3b7cea5deda1f2c85954481f12b9fd0 Mon Sep 17 00:00:00 2001 From: Alexander Puck Neuwirth Date: Sun, 18 Feb 2024 21:12:31 +0100 Subject: [PATCH 2/4] authors should be empty list if none are given --- easybuild/tools/docs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/tools/docs.py b/easybuild/tools/docs.py index 0ef2352e34..fa4a0ff5a2 100644 --- a/easybuild/tools/docs.py +++ b/easybuild/tools/docs.py @@ -778,9 +778,9 @@ def list_software(output_format=FORMAT_TXT, detailed=False, only_installed=False else: toolchain = '%s/%s' % (ec['toolchain']['name'], ec['toolchain']['version']) - keys = ['description', 'homepage', 'version', 'versionsuffix', 'authors'] - - info = {'toolchain': toolchain} + keys = ['description', 'homepage', 'version', 'versionsuffix'] + # authors should be a list and does not need to be templated + info = {'toolchain': toolchain, 'authors' : ec.get('authors', [])} for key in keys: info[key] = ec.get(key, '') From fa363a52986ebbfe8701a00174c30416a48ecfcd Mon Sep 17 00:00:00 2001 From: Alexander Puck Neuwirth Date: Sun, 18 Feb 2024 21:13:20 +0100 Subject: [PATCH 3/4] Fix format/hound --- easybuild/tools/docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/docs.py b/easybuild/tools/docs.py index fa4a0ff5a2..e83b89ad9e 100644 --- a/easybuild/tools/docs.py +++ b/easybuild/tools/docs.py @@ -780,7 +780,7 @@ def list_software(output_format=FORMAT_TXT, detailed=False, only_installed=False keys = ['description', 'homepage', 'version', 'versionsuffix'] # authors should be a list and does not need to be templated - info = {'toolchain': toolchain, 'authors' : ec.get('authors', [])} + info = {'toolchain': toolchain, 'authors': ec.get('authors', [])} for key in keys: info[key] = ec.get(key, '') From 8fbd099fafcc2bb0d8b240e3321c3dcc71773400 Mon Sep 17 00:00:00 2001 From: Alexander Puck Neuwirth Date: Sun, 18 Feb 2024 20:16:42 +0000 Subject: [PATCH 4/4] Adjust json tests for authors --- test/framework/docs.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/framework/docs.py b/test/framework/docs.py index 70280892e4..d920c0b6bf 100644 --- a/test/framework/docs.py +++ b/test/framework/docs.py @@ -462,6 +462,7 @@ LIST_SOFTWARE_DETAILED_JSON = """[ { + "authors": [], "description": "%(gcc_descr)s", "homepage": "http://gcc.gnu.org/", "name": "GCC", @@ -470,6 +471,7 @@ "versionsuffix": "" }, { + "authors": [], "description": "%(gzip_descr)s", "homepage": "http://www.gzip.org/", "name": "gzip", @@ -478,6 +480,7 @@ "versionsuffix": "" }, { + "authors": [], "description": "%(gzip_descr)s", "homepage": "http://www.gzip.org/", "name": "gzip", @@ -486,6 +489,7 @@ "versionsuffix": "" }, { + "authors": [], "description": "%(gzip_descr)s", "homepage": "http://www.gzip.org/", "name": "gzip", @@ -494,6 +498,7 @@ "versionsuffix": "" }, { + "authors": [], "description": "%(gzip_descr)s", "homepage": "http://www.gzip.org/", "name": "gzip",