From 7199e39384272cd27cd08346a9034c69d57dca2c Mon Sep 17 00:00:00 2001 From: Michele Berselli Date: Thu, 5 Dec 2024 17:18:54 -0500 Subject: [PATCH] . --- pipeline_utils/lib/yaml_parser.py | 4 ++++ pipeline_utils/schemas/yaml_reference_file.py | 4 ++++ pipeline_utils/schemas/yaml_software.py | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/pipeline_utils/lib/yaml_parser.py b/pipeline_utils/lib/yaml_parser.py index 8c26e96..ab0952b 100644 --- a/pipeline_utils/lib/yaml_parser.py +++ b/pipeline_utils/lib/yaml_parser.py @@ -641,6 +641,10 @@ def to_json( if getattr(self, self.LICENSE_SCHEMA, None): ref_json[self.LICENSE_SCHEMA] = self.license + # code + if getattr(self, self.CODE_SCHEMA, None): + ref_json[self.CODE_SCHEMA] = self.code + return ref_json diff --git a/pipeline_utils/schemas/yaml_reference_file.py b/pipeline_utils/schemas/yaml_reference_file.py index 7e19a99..fbed47a 100644 --- a/pipeline_utils/schemas/yaml_reference_file.py +++ b/pipeline_utils/schemas/yaml_reference_file.py @@ -60,6 +60,10 @@ 'license': { schema.DESCRIPTION: 'License of the ReferenceFile', schema.TYPE: schema.STRING + }, + 'code': { + schema.DESCRIPTION: 'Code for the ReferenceFile', + schema.TYPE: schema.STRING } }, schema.REQUIRED: ['name', 'description', 'format', 'category', 'type', 'version'] diff --git a/pipeline_utils/schemas/yaml_software.py b/pipeline_utils/schemas/yaml_software.py index 2750536..b45fe6e 100644 --- a/pipeline_utils/schemas/yaml_software.py +++ b/pipeline_utils/schemas/yaml_software.py @@ -44,6 +44,10 @@ schema.ITEMS: { schema.TYPE: schema.STRING } + }, + 'code': { + schema.DESCRIPTION: 'Code for the Software', + schema.TYPE: schema.STRING } }, schema.REQUIRED: ['name', 'category'],