diff --git a/debian/patches/add_setup.py.patch b/debian/patches/add_setup.py.patch index 8e84a52..994123f 100644 --- a/debian/patches/add_setup.py.patch +++ b/debian/patches/add_setup.py.patch @@ -1,9 +1,11 @@ From: Michael R. Crusoe Subject: Add setup.py Forwarded: https://github.com/WorkflowConversion/CTDConverter/pull/40 +Index: ctdconverter/convert.py +=================================================================== --- ctdconverter.orig/convert.py +++ ctdconverter/convert.py -@@ -8,7 +8,7 @@ +@@ -8,7 +8,7 @@ from argparse import RawDescriptionHelpF from common.exceptions import ApplicationException, ModelError __all__ = [] @@ -12,13 +14,15 @@ __date__ = '2014-09-17' __updated__ = '2017-08-09' -@@ -269,4 +269,4 @@ +@@ -269,4 +269,4 @@ def validate_and_prepare_common_argument if __name__ == "__main__": - sys.exit(main()) \ No newline at end of file + sys.exit(main()) +Index: ctdconverter/setup.py +=================================================================== --- /dev/null +++ ctdconverter/setup.py @@ -0,0 +1,170 @@ diff --git a/debian/patches/correct_name b/debian/patches/correct_name index a517c09..e92b980 100644 --- a/debian/patches/correct_name +++ b/debian/patches/correct_name @@ -1,8 +1,10 @@ From: Michael R. Crusoe Subject: unify script name reporting +Index: ctdconverter/convert.py +=================================================================== --- ctdconverter.orig/convert.py +++ ctdconverter/convert.py -@@ -17,10 +17,11 @@ +@@ -17,10 +17,11 @@ program_build_date = str(__updated__) program_version_message = '%%(prog)s %s (%s)' % (program_version, program_build_date) program_short_description = "CTDConverter - A project from the WorkflowConversion family " \ "(https://github.com/WorkflowConversion/CTDConverter)" @@ -15,7 +17,7 @@ FORMAT can be either one of the supported output formats: cwl, galaxy. -@@ -30,12 +31,12 @@ +@@ -30,12 +31,12 @@ documentation for each of the converters I - Parsing a single CTD file and convert it: @@ -30,7 +32,7 @@ III - Hardcoding parameters -@@ -141,7 +142,7 @@ +@@ -141,7 +142,7 @@ III - Hardcoding parameters There are, for now, no CWL-specific parameters or options. @@ -39,7 +41,7 @@ program_license = '''%(short_description)s -@@ -174,7 +175,8 @@ +@@ -174,7 +175,8 @@ def main(argv=None): # converter will register its own parameters after we've registered the basic ones... we have to do it old school if len(argv) < 2: utils.error("Not enough arguments provided") diff --git a/debian/patches/py3_compat b/debian/patches/py3_compat index 65ba38a..92473eb 100644 --- a/debian/patches/py3_compat +++ b/debian/patches/py3_compat @@ -1,8 +1,10 @@ From: Michael R. Crusoe Subject: use `open` instead of `file` +Index: ctdconverter/cwl/converter.py +=================================================================== --- ctdconverter.orig/cwl/converter.py +++ ctdconverter/cwl/converter.py -@@ -72,7 +72,7 @@ +@@ -72,7 +72,7 @@ def convert_models(args, parsed_ctds): logger.info("Writing to %s" % utils.get_filename(output_file), 1) @@ -11,7 +13,7 @@ stream.write(CWL_SHEBANG + '\n\n') stream.write("# This CWL file was automatically generated using CTDConverter.\n") stream.write("# Visit https://github.com/WorkflowConversion/CTDConverter for more information.\n\n") -@@ -103,6 +103,8 @@ +@@ -103,6 +103,8 @@ def convert_to_cwl(ctd_model, args): param_name = utils.extract_param_name(param) cwl_fixed_param_name = fix_param_name(param_name) hardcoded_value = args.parameter_hardcoder.get_hardcoded_value(param_name, ctd_model.name) diff --git a/debian/patches/upgrade_deprecated_strip b/debian/patches/upgrade_deprecated_strip index d39b370..89a0727 100644 --- a/debian/patches/upgrade_deprecated_strip +++ b/debian/patches/upgrade_deprecated_strip @@ -1,18 +1,18 @@ From: Michael R. Crusoe Subject: Upgrade deprecated using of string.strip() +Index: ctdconverter/common/utils.py +=================================================================== --- ctdconverter.orig/common/utils.py +++ ctdconverter/common/utils.py -@@ -4,8 +4,7 @@ +@@ -4,7 +4,6 @@ import ntpath import os from lxml import etree -from string import strip --from logger import info, error, warning -+from logger import info, error, warning + from logger import info, error, warning from common.exceptions import ApplicationException - from CTDopts.CTDopts import CTDModel, ParameterGroup -@@ -73,9 +72,9 @@ +@@ -73,9 +72,9 @@ def validate_argument_is_valid_path(args if member_value is not None: if isinstance(member_value, list): for file_name in member_value: @@ -24,4 +24,3 @@ for path_to_check in paths_to_check: validate_path_exists(path_to_check) -