From 4d3c78d0997aa1c6992cad8bd18133aefae2d4d3 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Fri, 29 Sep 2017 12:29:04 +0100 Subject: [PATCH 1/2] Fix typo in function name Follow-up on https://github.com/galaxyproject/galaxy/pull/4635 --- lib/galaxy/tools/loader.py | 4 ++-- lib/galaxy/util/xml_macros.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/galaxy/tools/loader.py b/lib/galaxy/tools/loader.py index 8d25e24b821..f97e92410e2 100644 --- a/lib/galaxy/tools/loader.py +++ b/lib/galaxy/tools/loader.py @@ -1,13 +1,13 @@ from galaxy.util.xml_macros import ( imported_macro_paths, load, - load_with_refereces, + load_with_references, raw_xml_tree, template_macro_params, ) load_tool = load -load_tool_with_refereces = load_with_refereces +load_tool_with_refereces = load_with_references raw_tool_xml_tree = raw_xml_tree __all__ = ( diff --git a/lib/galaxy/util/xml_macros.py b/lib/galaxy/util/xml_macros.py index 2dc94c965e2..0667c8c6550 100644 --- a/lib/galaxy/util/xml_macros.py +++ b/lib/galaxy/util/xml_macros.py @@ -7,7 +7,7 @@ from xml.etree import ElementInclude, ElementTree REQUIRED_PARAMETER = object() -def load_with_refereces(path): +def load_with_references(path): """Load XML documentation from file system and preprocesses XML macros. Return the XML representation of the expanded tree and paths to @@ -29,7 +29,7 @@ def load_with_refereces(path): def load(path): - tree, _ = load_with_refereces(path) + tree, _ = load_with_references(path) return tree @@ -307,7 +307,7 @@ def _parse_xml(fname): __all__ = ( "imported_macro_paths", "load", - "load_with_refereces", + "load_with_references", "raw_xml_tree", "template_macro_params", ) From cc983c318b75e861a4b79127201925b289826f09 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Fri, 29 Sep 2017 12:38:08 +0100 Subject: [PATCH 2/2] Typo fixes and small cleanups --- lib/galaxy/datatypes/proteomics.py | 2 +- lib/galaxy/jobs/runners/__init__.py | 6 +++--- lib/galaxy/managers/collections.py | 2 +- lib/galaxy/tools/xsd/galaxy.xsd | 4 ++-- lib/galaxy/util/__init__.py | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/galaxy/datatypes/proteomics.py b/lib/galaxy/datatypes/proteomics.py index d803d1de0c2..525ffb1daab 100644 --- a/lib/galaxy/datatypes/proteomics.py +++ b/lib/galaxy/datatypes/proteomics.py @@ -62,7 +62,7 @@ class PepXmlReport(Tabular): def __init__(self, **kwd): super(PepXmlReport, self).__init__(**kwd) - self.column_names = ['Protein', 'Peptide', 'Assumed Charge', 'Neutral Pep Mass (calculated)', 'Neutral Mass', 'Retention Time', 'Start Scan', 'End Scan', 'Search Engine', 'PeptideProphet Probability', 'Interprophet Probabaility'] + self.column_names = ['Protein', 'Peptide', 'Assumed Charge', 'Neutral Pep Mass (calculated)', 'Neutral Mass', 'Retention Time', 'Start Scan', 'End Scan', 'Search Engine', 'PeptideProphet Probability', 'Interprophet Probability'] def display_peek(self, dataset): """Returns formated html of peek""" diff --git a/lib/galaxy/jobs/runners/__init__.py b/lib/galaxy/jobs/runners/__init__.py index cd30907061d..dfbe125fcf6 100644 --- a/lib/galaxy/jobs/runners/__init__.py +++ b/lib/galaxy/jobs/runners/__init__.py @@ -367,7 +367,7 @@ class BaseJobRunner(object): if job_state.runner_state_handled: break except: - log.exception('Caught exception in runner state handler:') + log.exception('Caught exception in runner state handler') def fail_job(self, job_state, exception=False): if getattr(job_state, 'stop_job', True): @@ -593,11 +593,11 @@ class AsynchronousJobRunner(BaseJobRunner): # wait for the files to appear which_try = 0 - while which_try < (self.app.config.retry_job_output_collection + 1): + while which_try < self.app.config.retry_job_output_collection + 1: try: stdout = shrink_stream_by_size(open(job_state.output_file, "r"), DATABASE_MAX_STRING_SIZE, join_by="\n..\n", left_larger=True, beginning_on_size_error=True) stderr = shrink_stream_by_size(open(job_state.error_file, "r"), DATABASE_MAX_STRING_SIZE, join_by="\n..\n", left_larger=True, beginning_on_size_error=True) - which_try = (self.app.config.retry_job_output_collection + 1) + break except Exception as e: if which_try == self.app.config.retry_job_output_collection: stdout = '' diff --git a/lib/galaxy/managers/collections.py b/lib/galaxy/managers/collections.py index 286aa4e8f70..86f1427ce5b 100644 --- a/lib/galaxy/managers/collections.py +++ b/lib/galaxy/managers/collections.py @@ -23,7 +23,7 @@ ERROR_NO_COLLECTION_TYPE = "Create called without specifing a collection type." class DatasetCollectionManager(object): """ - Abstraction for interfacing with dataset collections instance - ideally abstarcts + Abstraction for interfacing with dataset collections instance - ideally abstracts out model and plugin details. """ ELEMENTS_UNINITIALIZED = object() diff --git a/lib/galaxy/tools/xsd/galaxy.xsd b/lib/galaxy/tools/xsd/galaxy.xsd index 40ae2fa7fe3..726ed733a40 100644 --- a/lib/galaxy/tools/xsd/galaxy.xsd +++ b/lib/galaxy/tools/xsd/galaxy.xsd @@ -1299,7 +1299,7 @@ provides a demonstration of using this tag. - Name of the metdata element to check. + Name of the metadata element to check. @@ -2770,7 +2770,7 @@ dataset for the contained input of the type specified using the ``type`` tag. - Name of cheetah variable to create for converted dataset. + Name of Cheetah variable to create for converted dataset. diff --git a/lib/galaxy/util/__init__.py b/lib/galaxy/util/__init__.py index 6bea695ea64..e48207e8c7f 100644 --- a/lib/galaxy/util/__init__.py +++ b/lib/galaxy/util/__init__.py @@ -785,9 +785,9 @@ def rst_to_html(s, error=False): # number of sections in help content. } - return unicodify(docutils_core.publish_string(s, - writer=docutils_html4css1.Writer(), - settings_overrides=settings_overrides)) + return unicodify(docutils_core.publish_string( + s, writer=docutils_html4css1.Writer(), + settings_overrides=settings_overrides)) def xml_text(root, name=None):