index
int64
0
50.7k
project_path
stringclasses
279 values
completion_path
stringlengths
57
199
signature_postion
stringlengths
3
11
class_position
stringlengths
3
11
function_name
stringlengths
1
62
class_name
stringlengths
0
55
body_position
stringlengths
3
11
body_position_with_comments
stringlengths
3
11
masked_class
stringlengths
14
8.32k
masked_class_with_comment
stringlengths
14
8.32k
func_body
stringlengths
9
6.72k
func_body_with_comment
stringlengths
9
6.72k
len_func_body
int64
1
643
len_input
int64
10
2.02k
len_output
int64
4
1.9k
total
int64
20
2.05k
file_code
stringlengths
14
442k
file_code_with_comment
stringlengths
14
442k
46,161
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
642,644
637,666
lint
InputsSelectOptionDuplicateText
644,666
644,666
class InputsSelectOptionDuplicateText(Linter): """ Lint for select option with same text """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class InputsSelectOptionDuplicateText(Linter): """ Lint for select option with same text """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type != "select": continue select_options = param.findall("./option") select_options...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type != "select": continue select_options = param.findall("./option") select_options...
64
72
264
336
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,162
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
616,618
611,637
lint
InputsSelectOptionDuplicateValue
618,637
618,637
class InputsSelectOptionDuplicateValue(Linter): """ Lint for select option with same value """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class InputsSelectOptionDuplicateValue(Linter): """ Lint for select option with same value """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type != "select": continue select_options = param.findall("./option") select_options...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type != "select": continue select_options = param.findall("./option") select_options...
55
72
232
304
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,163
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
596,598
591,611
lint
InputsSelectOptionValueMissing
598,611
598,611
class InputsSelectOptionValueMissing(Linter): """ Lint for select option tags without value """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class InputsSelectOptionValueMissing(Linter): """ Lint for select option tags without value """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type != "select": continue select_options = param.findall("./option") if any("value"...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type != "select": continue select_options = param.findall("./option") if any("value"...
43
71
157
228
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,164
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
936,938
931,955
lint
InputsSelectOptionalRadio
938,955
938,955
class InputsSelectOptionalRadio(Linter): """ Lint selects that are optional but display as radio """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class InputsSelectOptionalRadio(Linter): """ Lint selects that are optional but display as radio """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type not in ["select", "data_column", "drill_down"]: continue multiple = string_as_bool(param.at...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type not in ["select", "data_column", "drill_down"]: continue multiple = string_as_bool(param.at...
48
74
218
292
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,165
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
544,546
539,564
lint
InputsSelectOptionsDef
546,564
546,564
class InputsSelectOptionsDef(Linter): """ Lint for valid ways to define select options """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class InputsSelectOptionsDef(Linter): """ Lint for valid ways to define select options """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type != "select": continue dynamic_options = param.get("dynamic_options", None) opti...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type != "select": continue dynamic_options = param.get("dynamic_options", None) opti...
73
71
247
318
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,166
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
570,572
564,591
lint
InputsSelectOptionsDefConditional
572,591
572,591
class InputsSelectOptionsDefConditional(Linter): """ Lint for valid ways to define select options (for a select in a conditional) """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class InputsSelectOptionsDefConditional(Linter): """ Lint for valid ways to define select options (for a select in a conditional) """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type != "select": continue dynamic_options = param.get("dynamic_options", None) opti...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type != "select": continue dynamic_options = param.get("dynamic_options", None) opti...
69
83
231
314
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,167
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
693,695
688,727
lint
InputsSelectOptionsDefinesOptions
695,727
695,727
class InputsSelectOptionsDefinesOptions(Linter): """ Lint dynamic options select for the potential to define options """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class InputsSelectOptionsDefinesOptions(Linter): """ Lint dynamic options select for the potential to define options """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type != "select": continue options = param.find("./options") if options is None: ...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type != "select": continue options = param.find("./options") if options is None: ...
109
75
371
446
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,168
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
732,734
727,752
lint
InputsSelectOptionsDeprecatedAttr
734,752
734,752
class InputsSelectOptionsDeprecatedAttr(Linter): """ Lint dynamic options select deprecated attributes """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class InputsSelectOptionsDeprecatedAttr(Linter): """ Lint dynamic options select deprecated attributes """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type != "select": continue options = param.find("./options") if options is None: ...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type != "select": continue options = param.find("./options") if options is None: ...
52
72
207
279
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,169
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
757,759
752,778
lint
InputsSelectOptionsFromDatasetAndDatatable
759,778
759,778
class InputsSelectOptionsFromDatasetAndDatatable(Linter): """ Lint dynamic options select for from_dataset and from_data_table """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class InputsSelectOptionsFromDatasetAndDatatable(Linter): """ Lint dynamic options select for from_dataset and from_data_table """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type != "select": continue options = param.find("./options") if options is None: ...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type != "select": continue options = param.find("./options") if options is None: ...
59
82
222
304
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,170
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
783,785
778,803
lint
InputsSelectOptionsMetaFileKey
785,803
785,803
class InputsSelectOptionsMetaFileKey(Linter): """ Lint dynamic options select: meta_file_key attribute can only be used with from_dataset """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class InputsSelectOptionsMetaFileKey(Linter): """ Lint dynamic options select: meta_file_key attribute can only be used with from_dataset """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type != "select": continue options = param.find("./options") if options is None: ...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type != "select": continue options = param.find("./options") if options is None: ...
55
84
207
291
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,171
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
671,673
666,688
lint
InputsSelectOptionsMultiple
673,688
673,688
class InputsSelectOptionsMultiple(Linter): """ Lint dynamic options select for multiple options tags """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class InputsSelectOptionsMultiple(Linter): """ Lint dynamic options select for multiple options tags """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type != "select": continue options = param.findall("./options") if len(options) > 1:...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type != "select": continue options = param.findall("./options") if len(options) > 1:...
38
72
154
226
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,172
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
866,868
861,884
lint
InputsSelectSingleCheckboxes
868,884
868,884
class InputsSelectSingleCheckboxes(Linter): """ Lint selects that allow only a single selection but display as checkboxes """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class InputsSelectSingleCheckboxes(Linter): """ Lint selects that allow only a single selection but display as checkboxes """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type not in ["select", "data_column", "drill_down"]: continue multiple = string_as_bool(param.at...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): if param_type not in ["select", "data_column", "drill_down"]: continue multiple = string_as_bool(param.at...
49
80
211
291
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,173
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
356,358
351,372
lint
InputsTypeChildCombination
358,372
358,372
class InputsTypeChildCombination(Linter): """ Lint for invalid parameter type child combinations """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class InputsTypeChildCombination(Linter): """ Lint for invalid parameter type child combinations """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): # lint for valid param type - child node combinations for ptcc in PARAM_TYPE_CHILD_COMBINATIONS: if param...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param, param_name, param_type in _iter_param_type(tool_xml): # lint for valid param type - child node combinations for ptcc in PARAM_TYPE_CHILD_COMBINATIONS: if param...
55
71
193
264
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,174
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
994,996
989,1009
lint
ValidatorAttribIncompatible
996,1009
996,1009
class ValidatorAttribIncompatible(Linter): """ Lint for incompatibilities between validator type and given attributes """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class ValidatorAttribIncompatible(Linter): """ Lint for incompatibilities between validator type and given attributes """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param_name, _, validator, vtype in _iter_param_validator(tool_xml): for attrib in ATTRIB_VALIDATOR_COMPATIBILITY: if attrib in validator.attrib and vtype not in ATTRIB_VALIDATOR_...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param_name, _, validator, vtype in _iter_param_validator(tool_xml): for attrib in ATTRIB_VALIDATOR_COMPATIBILITY: if attrib in validator.attrib and vtype not in ATTRIB_VALIDATOR_...
44
76
181
257
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,175
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
1132,1134
1127,1150
lint
ValidatorDatasetMetadataEqualValue
1134,1150
1134,1150
class ValidatorDatasetMetadataEqualValue(Linter): """ Lint dataset_metadata_equal needs value or value_json """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class ValidatorDatasetMetadataEqualValue(Linter): """ Lint dataset_metadata_equal needs value or value_json """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param_name, _, validator, vtype in _iter_param_validator(tool_xml): if vtype in ["dataset_metadata_equal"]: if ( not ("value" in validator.attrib or "value_js...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param_name, _, validator, vtype in _iter_param_validator(tool_xml): if vtype in ["dataset_metadata_equal"]: if ( not ("value" in validator.attrib or "value_js...
52
77
204
281
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,176
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
1155,1157
1150,1170
lint
ValidatorDatasetMetadataEqualValueOrJson
1157,1170
1157,1170
class ValidatorDatasetMetadataEqualValueOrJson(Linter): """ Lint dataset_metadata_equal needs either value or value_json """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class ValidatorDatasetMetadataEqualValueOrJson(Linter): """ Lint dataset_metadata_equal needs either value or value_json """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param_name, _, validator, vtype in _iter_param_validator(tool_xml): if vtype in ["dataset_metadata_equal"]: if "value" in validator.attrib and "value_json" in validator.attrib: ...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param_name, _, validator, vtype in _iter_param_validator(tool_xml): if vtype in ["dataset_metadata_equal"]: if "value" in validator.attrib and "value_json" in validator.attrib: ...
45
80
174
254
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,177
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
1053,1055
1048,1077
lint
ValidatorExpression
1055,1077
1055,1077
class ValidatorExpression(Linter): """ Lint that checks expressions / regexp (ignoring FutureWarning) """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class ValidatorExpression(Linter): """ Lint that checks expressions / regexp (ignoring FutureWarning) """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return with warnings.catch_warnings(): warnings.simplefilter("error", FutureWarning) for param_name, _, validator, vtype in _iter_param_validator(tool_xml): if vtype in ["expres...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return with warnings.catch_warnings(): warnings.simplefilter("error", FutureWarning) for param_name, _, validator, vtype in _iter_param_validator(tool_xml): if vtype in ["expres...
58
74
244
318
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,178
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
1082,1084
1077,1106
lint
ValidatorExpressionFuture
1084,1106
1084,1106
class ValidatorExpressionFuture(Linter): """ Lint that checks expressions / regexp FutureWarnings """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class ValidatorExpressionFuture(Linter): """ Lint that checks expressions / regexp FutureWarnings """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return with warnings.catch_warnings(): warnings.simplefilter("error", FutureWarning) for param_name, _, validator, vtype in _iter_param_validator(tool_xml): if vtype in ["expres...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return with warnings.catch_warnings(): warnings.simplefilter("error", FutureWarning) for param_name, _, validator, vtype in _iter_param_validator(tool_xml): if vtype in ["expres...
59
73
246
319
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,179
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
1034,1036
1029,1048
lint
ValidatorHasNoText
1036,1048
1036,1048
class ValidatorHasNoText(Linter): """ Lint that parameters that need no text have no text """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class ValidatorHasNoText(Linter): """ Lint that parameters that need no text have no text """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param_name, _, validator, vtype in _iter_param_validator(tool_xml): if vtype not in ["expression", "regex"] and validator.text is not None: lint_ctx.warn( f"P...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param_name, _, validator, vtype in _iter_param_validator(tool_xml): if vtype not in ["expression", "regex"] and validator.text is not None: lint_ctx.warn( f"P...
43
73
157
230
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,180
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
1014,1016
1009,1029
lint
ValidatorHasText
1016,1029
1016,1029
class ValidatorHasText(Linter): """ Lint that parameters that need text have text """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class ValidatorHasText(Linter): """ Lint that parameters that need text have text """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param_name, _, validator, vtype in _iter_param_validator(tool_xml): if vtype in ["expression", "regex"]: if validator.text is None: lint_ctx.error( ...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param_name, _, validator, vtype in _iter_param_validator(tool_xml): if vtype in ["expression", "regex"]: if validator.text is None: lint_ctx.error( ...
38
70
147
217
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,181
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
1175,1177
1170,1189
lint
ValidatorMetadataCheckSkip
1177,1189
1177,1189
class ValidatorMetadataCheckSkip(Linter): """ Lint metadata needs check or skip """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class ValidatorMetadataCheckSkip(Linter): """ Lint metadata needs check or skip """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param_name, _, validator, vtype in _iter_param_validator(tool_xml): if vtype in ["metadata"] and ("check" not in validator.attrib and "skip" not in validator.attrib): lint_ctx.er...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param_name, _, validator, vtype in _iter_param_validator(tool_xml): if vtype in ["metadata"] and ("check" not in validator.attrib and "skip" not in validator.attrib): lint_ctx.er...
46
69
165
234
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,182
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
1222,1224
1217,1245
lint
ValidatorMetadataName
1224,1245
1224,1245
class ValidatorMetadataName(Linter): """ Lint metadata_name is present if needed """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class ValidatorMetadataName(Linter): """ Lint metadata_name is present if needed """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param_name, _, validator, vtype in _iter_param_validator(tool_xml): if ( vtype in [ "dataset_metadata_in_data_table", "dat...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param_name, _, validator, vtype in _iter_param_validator(tool_xml): if ( vtype in [ "dataset_metadata_in_data_table", "dat...
46
70
222
292
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,183
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
1111,1113
1106,1127
lint
ValidatorMinMax
1113,1127
1113,1127
class ValidatorMinMax(Linter): """ Lint for min/max for validator that need it """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class ValidatorMinMax(Linter): """ Lint for min/max for validator that need it """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param_name, _, validator, vtype in _iter_param_validator(tool_xml): if vtype in ["in_range", "length", "dataset_metadata_in_range"] and ( "min" not in validator.attrib and "max" ...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param_name, _, validator, vtype in _iter_param_validator(tool_xml): if vtype in ["in_range", "length", "dataset_metadata_in_range"] and ( "min" not in validator.attrib and "max" ...
50
73
187
260
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,184
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
974,976
969,989
lint
ValidatorParamIncompatible
976,989
976,989
class ValidatorParamIncompatible(Linter): """ Lint for validator type - parameter type incompatibilities """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class ValidatorParamIncompatible(Linter): """ Lint for validator type - parameter type incompatibilities """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param_name, param_type, validator, vtype in _iter_param_validator(tool_xml): if param_type in PARAMETER_VALIDATOR_TYPE_COMPATIBILITY: if vtype not in PARAMETER_VALIDATOR_TYPE_COM...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param_name, param_type, validator, vtype in _iter_param_validator(tool_xml): if param_type in PARAMETER_VALIDATOR_TYPE_COMPATIBILITY: if vtype not in PARAMETER_VALIDATOR_TYPE_COM...
37
74
176
250
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,185
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/inputs.py
1194,1196
1189,1217
lint
ValidatorTableName
1196,1217
1196,1217
class ValidatorTableName(Linter): """ Lint table_name is present if needed """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class ValidatorTableName(Linter): """ Lint table_name is present if needed """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param_name, _, validator, vtype in _iter_param_validator(tool_xml): if ( vtype in [ "value_in_data_table", "value_not_in_d...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for param_name, _, validator, vtype in _iter_param_validator(tool_xml): if ( vtype in [ "value_in_data_table", "value_not_in_d...
46
70
224
294
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
"""This module contains a linting functions for tool inputs.""" import ast import re import warnings from typing import ( Iterator, Optional, Tuple, TYPE_CHECKING, ) from packaging.version import Version from galaxy.tool_util.lint import Linter from galaxy.util import string_as_bool from ._util impor...
46,187
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/output.py
114,116
113,124
lint
OutputsCollectionType
116,124
116,124
class OutputsCollectionType(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class OutputsCollectionType(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for output in tool_xml.findall("./outputs/collection"): if "type" not in output.attrib: lint_ctx.warn("Collection output with undefined 'type' found.", linter=cls.name(), node=output...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for output in tool_xml.findall("./outputs/collection"): if "type" not in output.attrib: lint_ctx.warn("Collection output with undefined 'type' found.", linter=cls.name(), node=output...
26
52
102
154
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
46,188
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/output.py
162,164
161,192
lint
OutputsFormat
164,192
164,192
class OutputsFormat(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class OutputsFormat(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for output in tool_xml.findall("./outputs/data") + tool_xml.findall("./outputs/collection"): format_set = False if _check_format(output): format_set = True if...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for output in tool_xml.findall("./outputs/data") + tool_xml.findall("./outputs/collection"): format_set = False if _check_format(output): format_set = True if...
86
51
330
381
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
46,189
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/output.py
140,141
137,161
_report
OutputsFormatInput
141,147
141,147
class OutputsFormatInput(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): def _report(output: "Element"): FILL_FUNC_BODY profile = tool_source.parse_profile() tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: ret...
class OutputsFormatInput(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): def _report(output: "Element"): FILL_FUNC_BODY profile = tool_source.parse_profile() tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: ret...
message = f"Using format='input' on {output.tag} is deprecated. Use the format_source attribute." if Version(str(profile)) <= Version("16.01"): lint_ctx.warn(message, linter=cls.name(), node=output) else: lint_ctx.error(message, linter=cls.name(), node...
message = f"Using format='input' on {output.tag} is deprecated. Use the format_source attribute." if Version(str(profile)) <= Version("16.01"): lint_ctx.warn(message, linter=cls.name(), node=output) else: lint_ctx.error(message, linter=cls.name(), node...
23
214
103
317
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
46,190
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/output.py
193,195
192,212
lint
OutputsFormatSourceIncomp
195,212
195,212
class OutputsFormatSourceIncomp(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class OutputsFormatSourceIncomp(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
def _check_and_report(node): if "format_source" in node.attrib and ("ext" in node.attrib or "format" in node.attrib): lint_ctx.warn( f"Tool {node.tag} output '{node.attrib.get('name', 'with missing name')}' should use either format_source or format/ext", ...
def _check_and_report(node): if "format_source" in node.attrib and ("ext" in node.attrib or "format" in node.attrib): lint_ctx.warn( f"Tool {node.tag} output '{node.attrib.get('name', 'with missing name')}' should use either format_source or format/ext", ...
52
54
224
278
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
46,191
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/output.py
80,82
79,98
lint
OutputsLabelDuplicatedFilter
82,98
82,98
class OutputsLabelDuplicatedFilter(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class OutputsLabelDuplicatedFilter(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return labels = set() for output in tool_xml.findall("./outputs/data") + tool_xml.findall("./outputs/collection"): name = output.attrib.get("name", "") label = output.attrib.get("label"...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return labels = set() for output in tool_xml.findall("./outputs/data") + tool_xml.findall("./outputs/collection"): name = output.attrib.get("name", "") label = output.attrib.get("label"...
56
55
211
266
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
46,192
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/output.py
99,101
98,113
lint
OutputsLabelDuplicatedNoFilter
101,113
101,113
class OutputsLabelDuplicatedNoFilter(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class OutputsLabelDuplicatedNoFilter(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return labels = set() for output in tool_xml.findall("./outputs/data[@name]") + tool_xml.findall("./outputs/collection[@name]"): name = output.attrib.get("name", "") label = output.attr...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return labels = set() for output in tool_xml.findall("./outputs/data[@name]") + tool_xml.findall("./outputs/collection[@name]"): name = output.attrib.get("name", "") label = output.attr...
46
56
196
252
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
46,193
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/output.py
21,23
20,37
lint
OutputsMissing
23,37
23,37
class OutputsMissing(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class OutputsMissing(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tool_node = tool_xml.find("./outputs") if tool_node is None: tool_node = tool_xml.getroot() if len(tool_xml.findall("./outputs")) == 0: lint_ctx.warn( "To...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tool_node = tool_xml.find("./outputs") if tool_node is None: tool_node = tool_xml.getroot() if len(tool_xml.findall("./outputs")) == 0: lint_ctx.warn( "To...
37
51
148
199
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
46,194
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/output.py
66,68
65,79
lint
OutputsNameDuplicated
68,79
68,79
class OutputsNameDuplicated(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class OutputsNameDuplicated(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return names = set() for output in tool_xml.findall("./outputs/data[@name]") + tool_xml.findall("./outputs/collection[@name]"): name = output.attrib["name"] if name in names: ...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return names = set() for output in tool_xml.findall("./outputs/data[@name]") + tool_xml.findall("./outputs/collection[@name]"): name = output.attrib["name"] if name in names: ...
34
54
149
203
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
46,195
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/output.py
51,53
50,65
lint
OutputsNameInvalidCheetah
53,65
53,65
class OutputsNameInvalidCheetah(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class OutputsNameInvalidCheetah(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for output in tool_xml.findall("./outputs/data[@name]") + tool_xml.findall("./outputs/collection[@name]"): if not is_valid_cheetah_placeholder(output.attrib["name"]): lint_ctx.warn( ...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return for output in tool_xml.findall("./outputs/data[@name]") + tool_xml.findall("./outputs/collection[@name]"): if not is_valid_cheetah_placeholder(output.attrib["name"]): lint_ctx.warn( ...
32
55
162
217
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
46,196
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/output.py
125,127
124,137
lint
OutputsNumber
127,137
127,137
class OutputsNumber(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class OutputsNumber(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return outputs = tool_xml.findall("./outputs") if len(outputs) == 0: return num_outputs = len(outputs[0].findall("./data")) + len(outputs[0].findall("./collection")) lint_ctx.info(f...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return outputs = tool_xml.findall("./outputs") if len(outputs) == 0: return num_outputs = len(outputs[0].findall("./data")) + len(outputs[0].findall("./collection")) lint_ctx.info(f...
27
51
140
191
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
46,197
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/output.py
38,40
37,50
lint
OutputsOutput
40,50
40,50
class OutputsOutput(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class OutputsOutput(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return output = tool_xml.find("./outputs/output") if output is not None: lint_ctx.warn( "Avoid the use of 'output' and replace by 'data' or 'collection'", linter=cls.name(), node=ou...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return output = tool_xml.find("./outputs/output") if output is not None: lint_ctx.warn( "Avoid the use of 'output' and replace by 'data' or 'collection'", linter=cls.name(), node=ou...
32
51
111
162
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
"""This module contains a linting functions for tool outputs.""" from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter from ._util import is_valid_cheetah_placeholder from ..parser.output_collection_def import NAMED_PATTERNS if TYPE_CHECKING: from galaxy...
46,198
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/stdio.py
38,40
37,59
lint
StdIOAbsence
40,59
40,59
class StdIOAbsence(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class StdIOAbsence(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: # Can only lint XML tools at this point. # Should probably use tool_source.parse_stdio() to abstract away XML details return stdios = tool_xml.findall("./stdio") if tool_xml else [] if ...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: # Can only lint XML tools at this point. # Should probably use tool_source.parse_stdio() to abstract away XML details return stdios = tool_xml.findall("./stdio") if tool_xml else [] if ...
71
53
232
285
"""This module contains a linting functions for tool error detection.""" import re from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext from galaxy.tool_util.parser.interface import Too...
"""This module contains a linting functions for tool error detection.""" import re from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext from galaxy.tool_util.parser.interface import Too...
46,199
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/stdio.py
16,18
15,37
lint
StdIOAbsenceLegacy
18,37
18,37
class StdIOAbsenceLegacy(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class StdIOAbsenceLegacy(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: # Can only lint XML tools at this point. # Should probably use tool_source.parse_stdio() to abstract away XML details return stdios = tool_xml.findall("./stdio") if tool_xml else [] if ...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: # Can only lint XML tools at this point. # Should probably use tool_source.parse_stdio() to abstract away XML details return stdios = tool_xml.findall("./stdio") if tool_xml else [] if ...
72
55
232
287
"""This module contains a linting functions for tool error detection.""" import re from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext from galaxy.tool_util.parser.interface import Too...
"""This module contains a linting functions for tool error detection.""" import re from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext from galaxy.tool_util.parser.interface import Too...
46,200
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/stdio.py
60,62
59,83
lint
StdIORegex
62,83
62,83
class StdIORegex(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class StdIORegex(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: # Can only lint XML tools at this point. # Should probably use tool_source.parse_stdio() to abstract away XML details return stdios = tool_xml.findall("./stdio") if tool_xml else [] if...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: # Can only lint XML tools at this point. # Should probably use tool_source.parse_stdio() to abstract away XML details return stdios = tool_xml.findall("./stdio") if tool_xml else [] if...
74
54
234
288
"""This module contains a linting functions for tool error detection.""" import re from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext from galaxy.tool_util.parser.interface import Too...
"""This module contains a linting functions for tool error detection.""" import re from typing import TYPE_CHECKING from packaging.version import Version from galaxy.tool_util.lint import Linter if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext from galaxy.tool_util.parser.interface import Too...
46,202
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
69,71
68,87
lint
TestsAssertsHasNQuant
71,87
71,87
class TestsAssertsHasNQuant(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsAssertsHasNQuant(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): for a in test.xpath( ".//*[self::assert_contents or self::assert_stdout or self::ass...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): for a in test.xpath( ".//*[self::assert_contents or self::assert_stdout or self::ass...
58
55
233
288
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,203
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
117,119
112,137
lint
TestsAssertsHasSizeOrValueQuant
119,137
119,137
class TestsAssertsHasSizeOrValueQuant(Linter): """ has_size should not have size and value """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsAssertsHasSizeOrValueQuant(Linter): """ has_size should not have size and value """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): for a in test.xpath( ".//*[self::assert_contents or self::assert_stdout or self::ass...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): for a in test.xpath( ".//*[self::assert_contents or self::assert_stdout or self::ass...
56
75
224
299
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,204
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
92,94
87,112
lint
TestsAssertsHasSizeQuant
94,112
94,112
class TestsAssertsHasSizeQuant(Linter): """ has_size needs at least one of size (or value), min, max """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsAssertsHasSizeQuant(Linter): """ has_size needs at least one of size (or value), min, max """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): for a in test.xpath( ".//*[self::assert_contents or self::assert_stdout or self::ass...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): for a in test.xpath( ".//*[self::assert_contents or self::assert_stdout or self::ass...
58
80
235
315
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,205
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
51,53
50,68
lint
TestsAssertsMultiple
53,68
53,68
class TestsAssertsMultiple(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsAssertsMultiple(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): # TODO same would be nice also for assert_contents for ta in ("assert_stdout", "assert_s...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): # TODO same would be nice also for assert_contents for ta in ("assert_stdout", "assert_s...
53
54
184
238
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,206
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
138,140
137,160
lint
TestsExpectNumOutputs
140,160
140,160
class TestsExpectNumOutputs(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsExpectNumOutputs(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): # check if expect_num_outputs is set if there are outputs with filters # (except for tes...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): # check if expect_num_outputs is set if there are outputs with filters # (except for tes...
78
55
274
329
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,207
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
448,450
445,467
lint
TestsExpectNumOutputsFailing
450,467
450,467
class TestsExpectNumOutputsFailing(Linter): """ """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsExpectNumOutputsFailing(Linter): """ """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): if not asbool(test.attrib.get("expect_failure", False)): continue if tes...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): if not asbool(test.attrib.get("expect_failure", False)): continue if tes...
57
62
205
267
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,208
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
470,472
467,484
lint
TestsHasExpectations
472,484
472,484
class TestsHasExpectations(Linter): """ """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsHasExpectations(Linter): """ """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") for test_idx, test in _iter_tests(tests, valid=False): lint_ctx.warn( f"Test {test_idx}: No outputs or expectations defined for tests...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") for test_idx, test in _iter_tests(tests, valid=False): lint_ctx.warn( f"Test {test_idx}: No outputs or expectations defined for tests...
36
59
132
191
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,209
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
23,25
22,36
lint
TestsMissing
25,36
25,36
class TestsMissing(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsMissing(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") root = tool_xml.find("./tests") if root is None: root = tool_xml.getroot() if len(tests) == 0 and not is_datasource(tool_xml): ...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") root = tool_xml.find("./tests") if root is None: root = tool_xml.getroot() if len(tests) == 0 and not is_datasource(tool_xml): ...
40
51
143
194
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,210
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
37,39
36,50
lint
TestsMissingDatasource
39,50
39,50
class TestsMissingDatasource(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsMissingDatasource(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") root = tool_xml.find("./tests") if root is None: root = tool_xml.getroot() if len(tests) == 0 and is_datasource(tool_xml): ...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") root = tool_xml.find("./tests") if root is None: root = tool_xml.getroot() if len(tests) == 0 and is_datasource(tool_xml): ...
39
54
144
198
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,211
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
487,489
484,503
lint
TestsNoValid
489,503
489,503
class TestsNoValid(Linter): """ """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsNoValid(Linter): """ """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return general_node = tool_xml.find("./tests") if general_node is None: general_node = tool_xml.getroot() tests = tool_xml.findall("./tests/test") if not tests: return ...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return general_node = tool_xml.find("./tests") if general_node is None: general_node = tool_xml.getroot() tests = tool_xml.findall("./tests/test") if not tests: return ...
39
57
187
244
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,212
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
331,333
325,359
lint
TestsOutputCheckDiscovered
333,359
333,359
class TestsOutputCheckDiscovered(Linter): """ Linter checking that discovered elements of outputs are tested with a count attribute or listing some discovered_dataset """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsOutputCheckDiscovered(Linter): """ Linter checking that discovered elements of outputs are tested with a count attribute or listing some discovered_dataset """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return output_data_or_collection = _collect_output_names(tool_xml) tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): for output in test.findall("outp...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return output_data_or_collection = _collect_output_names(tool_xml) tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): for output in test.findall("outp...
81
85
321
406
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,213
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
365,367
359,392
lint
TestsOutputCollectionCheckDiscovered
367,392
367,392
class TestsOutputCollectionCheckDiscovered(Linter): """ Linter checking that discovered elements of output collections are tested with a count attribute or listing some elements """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsOutputCollectionCheckDiscovered(Linter): """ Linter checking that discovered elements of output collections are tested with a count attribute or listing some elements """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return output_data_or_collection = _collect_output_names(tool_xml) tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): for output in test.findall("outp...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return output_data_or_collection = _collect_output_names(tool_xml) tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): for output in test.findall("outp...
81
85
313
398
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,214
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
395,397
392,425
lint
TestsOutputCollectionCheckDiscoveredNested
397,425
397,425
class TestsOutputCollectionCheckDiscoveredNested(Linter): """ """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsOutputCollectionCheckDiscoveredNested(Linter): """ """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return output_data_or_collection = _collect_output_names(tool_xml) tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): for output in test.findall("outp...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return output_data_or_collection = _collect_output_names(tool_xml) tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): for output in test.findall("outp...
93
62
364
426
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,215
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
267,269
262,292
lint
TestsOutputCollectionCorresponding
269,292
269,292
class TestsOutputCollectionCorresponding(Linter): """ Linter checking if test/collection corresponds to outputs/output_collection """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsOutputCollectionCorresponding(Linter): """ Linter checking if test/collection corresponds to outputs/output_collection """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return output_data_or_collection = _collect_output_names(tool_xml) tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): for output in test.findall("outp...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return output_data_or_collection = _collect_output_names(tool_xml) tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): for output in test.findall("outp...
77
78
296
374
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,216
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
298,300
292,325
lint
TestsOutputCompareAttrib
300,325
300,325
class TestsOutputCompareAttrib(Linter): """ Linter checking compatibility of output attributes with the value of the compare attribute """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsOutputCompareAttrib(Linter): """ Linter checking compatibility of output attributes with the value of the compare attribute """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") COMPARE_COMPATIBILITY = { "sort": ["diff", "re_match", "re_match_multiline"], "lines_diff": ["diff", "re_match", "contains"], ...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") COMPARE_COMPATIBILITY = { "sort": ["diff", "re_match", "re_match_multiline"], "lines_diff": ["diff", "re_match", "contains"], ...
77
79
337
416
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,217
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
237,239
232,262
lint
TestsOutputCorresponding
239,262
239,262
class TestsOutputCorresponding(Linter): """ Linter checking if test/output corresponds to outputs/data """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsOutputCorresponding(Linter): """ Linter checking if test/output corresponds to outputs/data """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return output_data_or_collection = _collect_output_names(tool_xml) tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): for output in test.findall("outp...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return output_data_or_collection = _collect_output_names(tool_xml) tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): for output in test.findall("outp...
76
75
290
365
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,218
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
212,214
211,232
lint
TestsOutputDefined
214,232
214,232
class TestsOutputDefined(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsOutputDefined(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return output_data_or_collection = _collect_output_names(tool_xml) tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): for output in test.findall("outp...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return output_data_or_collection = _collect_output_names(tool_xml) tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): for output in test.findall("outp...
56
53
233
286
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,219
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
428,430
425,445
lint
TestsOutputFailing
430,445
430,445
class TestsOutputFailing(Linter): """ """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsOutputFailing(Linter): """ """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): if not asbool(test.attrib.get("expect_failure", False)): continue if tes...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): if not asbool(test.attrib.get("expect_failure", False)): continue if tes...
47
58
178
236
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,220
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
194,196
193,211
lint
TestsOutputName
196,211
196,211
class TestsOutputName(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsOutputName(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): # note output_collections are covered by xsd, but output is not required to have one by xsd ...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): # note output_collections are covered by xsd, but output is not required to have one by xsd ...
56
52
184
236
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,221
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
165,167
160,193
lint
TestsParamInInputs
167,193
167,193
class TestsParamInInputs(Linter): """ really simple linter that test parameters are also present in the inputs """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsParamInInputs(Linter): """ really simple linter that test parameters are also present in the inputs """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): for param in test.findall("param"): name = param.attrib.get("name", None) ...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tests = tool_xml.findall("./tests/test") for test_idx, test in enumerate(tests, start=1): for param in test.findall("param"): name = param.attrib.get("name", None) ...
87
76
351
427
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,222
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/tests.py
506,508
503,522
lint
TestsValid
508,522
508,522
class TestsValid(Linter): """ """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class TestsValid(Linter): """ """ @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return general_node = tool_xml.find("./tests") if general_node is None: general_node = tool_xml.getroot() tests = tool_xml.findall("./tests/test") if not tests: return ...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return general_node = tool_xml.find("./tests") if general_node is None: general_node = tool_xml.getroot() tests = tool_xml.findall("./tests/test") if not tests: return ...
41
56
183
239
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
"""This module contains a linting functions for tool tests.""" from typing import ( Iterator, List, Tuple, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from galaxy.util import asbool from ._util import is_datasource if TYPE_CHECKING: from galaxy.tool_util.lint import LintContext ...
46,223
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/linters/xml_order.py
61,63
60,88
lint
XMLOrder
63,88
63,88
class XMLOrder(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
class XMLOrder(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): FILL_FUNC_BODY
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tool_root = tool_xml.getroot() if is_datasource(tool_xml): tag_ordering = DATASOURCE_TAG_ORDER else: tag_ordering = TAG_ORDER last_tag = None last_key: O...
tool_xml = getattr(tool_source, "xml_tree", None) if not tool_xml: return tool_root = tool_xml.getroot() if is_datasource(tool_xml): tag_ordering = DATASOURCE_TAG_ORDER else: tag_ordering = TAG_ORDER last_tag = None last_key: O...
69
50
255
305
"""This module contains a linter for tool XML block order. For more information on the IUC standard for XML block order see - https://github.com/galaxy-iuc/standards. """ from typing import ( Optional, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from ._util import is_datasource if TYPE_CHECKIN...
"""This module contains a linter for tool XML block order. For more information on the IUC standard for XML block order see - https://github.com/galaxy-iuc/standards. """ from typing import ( Optional, TYPE_CHECKING, ) from galaxy.tool_util.lint import Linter from ._util import is_datasource if TYPE_CHECKIN...
46,225
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/locations/dockstore.py
13,14
10,27
get_tool_source_path
DockStoreResolver
14,27
14,27
class DockStoreResolver(ToolLocationResolver): scheme = "dockstore" def get_tool_source_path(self, uri_like: str) -> str: FILL_FUNC_BODY
class DockStoreResolver(ToolLocationResolver): scheme = "dockstore" def get_tool_source_path(self, uri_like: str) -> str: FILL_FUNC_BODY
assert uri_like.startswith("dockstore://") tool_id = uri_like[len("dockstore://") :] if ":" in tool_id: tool_id, version = tool_id.split(":", 1) else: tool_id, version = tool_id, "latest" tmp_path = self._temp_path(f"{uri_like}.cwl") cwl_str = _Ga4...
assert uri_like.startswith("dockstore://") tool_id = uri_like[len("dockstore://") :] if ":" in tool_id: tool_id, version = tool_id.split(":", 1) else: tool_id, version = tool_id, "latest" tmp_path = self._temp_path(f"{uri_like}.cwl") cwl_str = _Ga4...
37
54
189
243
from urllib.parse import quote import requests import yaml from galaxy.util import DEFAULT_SOCKET_TIMEOUT from . import ToolLocationResolver class DockStoreResolver(ToolLocationResolver): scheme = "dockstore" def get_tool_source_path(self, uri_like: str) -> str: FILL_FUNC_BODYclass _Ga4ghToolClient: de...
from urllib.parse import quote import requests import yaml from galaxy.util import DEFAULT_SOCKET_TIMEOUT from . import ToolLocationResolver class DockStoreResolver(ToolLocationResolver): scheme = "dockstore" def get_tool_source_path(self, uri_like: str) -> str: FILL_FUNC_BODYclass _Ga4ghToolClient: de...
46,226
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/locations/dockstore.py
46,47
27,63
get_tool_cwl
_Ga4ghToolClient
47,56
47,56
class _Ga4ghToolClient: def __init__(self, base_url="https://www.dockstore.org:8443/api"): self.base_url = base_url def get_tools(self): return self._requests.get(f"{self.base_url}/ga4gh/v1/tools", timeout=DEFAULT_SOCKET_TIMEOUT) def get_tool(self, tool_id): url = f"{self.base_url}...
class _Ga4ghToolClient: def __init__(self, base_url="https://www.dockstore.org:8443/api"): self.base_url = base_url def get_tools(self): return self._requests.get(f"{self.base_url}/ga4gh/v1/tools", timeout=DEFAULT_SOCKET_TIMEOUT) def get_tool(self, tool_id): url = f"{self.base_url}...
tool_type = "CWL" url = f"{self.base_url}/ga4gh/v1/tools/{quote(tool_id, safe='')}/versions/{version}/{tool_type}/descriptor" descriptor_response = self._requests.get(url, timeout=DEFAULT_SOCKET_TIMEOUT) descriptor_str = descriptor_response.json()["descriptor"] if as_string: ...
tool_type = "CWL" url = f"{self.base_url}/ga4gh/v1/tools/{quote(tool_id, safe='')}/versions/{version}/{tool_type}/descriptor" descriptor_response = self._requests.get(url, timeout=DEFAULT_SOCKET_TIMEOUT) descriptor_str = descriptor_response.json()["descriptor"] if as_string: ...
21
437
140
577
from urllib.parse import quote import requests import yaml from galaxy.util import DEFAULT_SOCKET_TIMEOUT from . import ToolLocationResolver class DockStoreResolver(ToolLocationResolver): scheme = "dockstore" def get_tool_source_path(self, uri_like: str) -> str: assert uri_like.startswith("dockstor...
from urllib.parse import quote import requests import yaml from galaxy.util import DEFAULT_SOCKET_TIMEOUT from . import ToolLocationResolver class DockStoreResolver(ToolLocationResolver): scheme = "dockstore" def get_tool_source_path(self, uri_like: str) -> str: assert uri_like.startswith("dockstor...
46,227
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/locations/file.py
7,8
4,10
get_tool_source_path
HttpToolResolver
8,10
8,10
class HttpToolResolver(ToolLocationResolver): scheme = "file" def get_tool_source_path(self, uri_like: str) -> str: FILL_FUNC_BODY
class HttpToolResolver(ToolLocationResolver): scheme = "file" def get_tool_source_path(self, uri_like: str) -> str: FILL_FUNC_BODY
assert uri_like.startswith("file://") return uri_like[len("file://") :]
assert uri_like.startswith("file://") return uri_like[len("file://") :]
5
51
30
81
from . import ToolLocationResolver class HttpToolResolver(ToolLocationResolver): scheme = "file" def get_tool_source_path(self, uri_like: str) -> str: FILL_FUNC_BODY
from . import ToolLocationResolver class HttpToolResolver(ToolLocationResolver): scheme = "file" def get_tool_source_path(self, uri_like: str) -> str: FILL_FUNC_BODY
46,228
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/locations/http.py
11,12
5,17
get_tool_source_path
HttpToolResolver
12,17
12,17
class HttpToolResolver(ToolLocationResolver): scheme = "http" def __init__(self, **kwds): pass def get_tool_source_path(self, uri_like: str) -> str: FILL_FUNC_BODY
class HttpToolResolver(ToolLocationResolver): scheme = "http" def __init__(self, **kwds): pass def get_tool_source_path(self, uri_like: str) -> str: FILL_FUNC_BODY
tmp_path = self._temp_path(uri_like) download_to_file(uri_like, tmp_path) return tmp_path
tmp_path = self._temp_path(uri_like) download_to_file(uri_like, tmp_path) return tmp_path
7
67
45
112
from galaxy.util import download_to_file from . import ToolLocationResolver class HttpToolResolver(ToolLocationResolver): scheme = "http" def __init__(self, **kwds): pass def get_tool_source_path(self, uri_like: str) -> str: FILL_FUNC_BODYclass HttpsToolResolver(HttpToolResolver): scheme = "...
from galaxy.util import download_to_file from . import ToolLocationResolver class HttpToolResolver(ToolLocationResolver): scheme = "http" def __init__(self, **kwds): pass def get_tool_source_path(self, uri_like: str) -> str: FILL_FUNC_BODYclass HttpsToolResolver(HttpToolResolver): scheme = "...
46,229
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/ontologies/ontology_data.py
68,71
1,108
expand_ontology_data
71,108
71,108
from typing import ( cast, Dict, List, NamedTuple, Optional, Tuple, ) from galaxy.tool_util.biotools import BiotoolsMetadataSource from galaxy.tool_util.parser import ToolSource from galaxy.util.resources import resource_string def _multi_dict_mapping(content: str) -> Dict[str, List[str]]: ...
from typing import ( cast, Dict, List, NamedTuple, Optional, Tuple, ) from galaxy.tool_util.biotools import BiotoolsMetadataSource from galaxy.tool_util.parser import ToolSource from galaxy.util.resources import resource_string def _multi_dict_mapping(content: str) -> Dict[str, List[str]]: ...
xrefs = tool_source.parse_xrefs() has_biotools_reference = any(x["reftype"] == "bio.tools" for x in xrefs) if not has_biotools_reference: legacy_biotools_ref = legacy_biotools_external_reference(all_ids) if legacy_biotools_ref is not None: xrefs.append({"value": legacy_biotools_r...
xrefs = tool_source.parse_xrefs() has_biotools_reference = any(x["reftype"] == "bio.tools" for x in xrefs) if not has_biotools_reference: legacy_biotools_ref = legacy_biotools_external_reference(all_ids) if legacy_biotools_ref is not None: xrefs.append({"value": legacy_biotools_r...
103
834
552
1,386
from typing import ( cast, Dict, List, NamedTuple, Optional, Tuple, ) from galaxy.tool_util.biotools import BiotoolsMetadataSource from galaxy.tool_util.parser import ToolSource from galaxy.util.resources import resource_string def _multi_dict_mapping(content: str) -> Dict[str, List[str]]: ...
from typing import ( cast, Dict, List, NamedTuple, Optional, Tuple, ) from galaxy.tool_util.biotools import BiotoolsMetadataSource from galaxy.tool_util.parser import ToolSource from galaxy.util.resources import resource_string def _multi_dict_mapping(content: str) -> Dict[str, List[str]]: ...
46,231
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/cwl.py
187,188
182,195
_to_input_source
CwlPageSource
188,191
188,191
class CwlPageSource(PageSource): def __init__(self, tool_proxy): cwl_instances = tool_proxy.input_instances() self._input_list = list(map(self._to_input_source, cwl_instances)) def _to_input_source(self, input_instance): FILL_FUNC_BODY def parse_input_sources(self): return self._inpu...
class CwlPageSource(PageSource): def __init__(self, tool_proxy): cwl_instances = tool_proxy.input_instances() self._input_list = list(map(self._to_input_source, cwl_instances)) def _to_input_source(self, input_instance): FILL_FUNC_BODY def parse_input_sources(self): return self._inpu...
as_dict = input_instance.to_dict() return YamlInputSource(as_dict)
as_dict = input_instance.to_dict() return YamlInputSource(as_dict)
5
113
30
143
import json import logging import math from typing import Optional import packaging.version from galaxy.tool_util.cwl.parser import ( tool_proxy, ToolProxy, ) from galaxy.tool_util.deps import requirements from .interface import ( PageSource, PagesSource, ToolSource, ) from .output_actions import ...
import json import logging import math from typing import Optional import packaging.version from galaxy.tool_util.cwl.parser import ( tool_proxy, ToolProxy, ) from galaxy.tool_util.deps import requirements from .interface import ( PageSource, PagesSource, ToolSource, ) from .output_actions import ...
46,232
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/cwl.py
60,61
29,182
parse_environment_variables
CwlToolSource
61,76
61,76
class CwlToolSource(ToolSource): language = "yaml" def __init__(self, tool_file=None, strict_cwl_validation=True, tool_proxy: Optional[ToolProxy] = None): self._cwl_tool_file = tool_file self._tool_proxy = tool_proxy self._source_path = tool_file self._strict_cwl_validation = st...
class CwlToolSource(ToolSource): language = "yaml" def __init__(self, tool_file=None, strict_cwl_validation=True, tool_proxy: Optional[ToolProxy] = None): self._cwl_tool_file = tool_file self._tool_proxy = tool_proxy self._source_path = tool_file self._strict_cwl_validation = st...
environment_variables = [] # TODO: Is this even possible from here, should instead this be moved # into the job. # for environment_variable_el in environment_variables_el.findall("environment_variable"): # definition = { # "name": environment_variable_el.get("n...
environment_variables = [] # TODO: Is this even possible from here, should instead this be moved # into the job. # for environment_variable_el in environment_variables_el.findall("environment_variable"): # definition = { # "name": environment_variable_el.get("n...
45
1,290
147
1,437
import json import logging import math from typing import Optional import packaging.version from galaxy.tool_util.cwl.parser import ( tool_proxy, ToolProxy, ) from galaxy.tool_util.deps import requirements from .interface import ( PageSource, PagesSource, ToolSource, ) from .output_actions import ...
import json import logging import math from typing import Optional import packaging.version from galaxy.tool_util.cwl.parser import ( tool_proxy, ToolProxy, ) from galaxy.tool_util.deps import requirements from .interface import ( PageSource, PagesSource, ToolSource, ) from .output_actions import ...
46,233
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/factory.py
44,45
1,135
build_cwl_tool_source
45,50
45,50
"""Constructors for concrete tool and input source objects.""" import logging from typing import ( Callable, Dict, List, Optional, ) from yaml import safe_load from galaxy.tool_util.loader import load_tool_with_refereces from galaxy.util import ( ElementTree, parse_xml_string_to_etree, ) from...
"""Constructors for concrete tool and input source objects.""" import logging from typing import ( Callable, Dict, List, Optional, ) from yaml import safe_load from galaxy.tool_util.loader import load_tool_with_refereces from galaxy.util import ( ElementTree, parse_xml_string_to_etree, ) from...
proxy = tool_proxy(tool_object=safe_load(yaml_string)) # regular CwlToolSource sets basename as tool id, but that's not going to cut it in production return CwlToolSource(tool_proxy=proxy)
proxy = tool_proxy(tool_object=safe_load(yaml_string)) # regular CwlToolSource sets basename as tool id, but that's not going to cut it in production return CwlToolSource(tool_proxy=proxy)
22
1,347
68
1,415
"""Constructors for concrete tool and input source objects.""" import logging from typing import ( Callable, Dict, List, Optional, ) from yaml import safe_load from galaxy.tool_util.loader import load_tool_with_refereces from galaxy.util import ( ElementTree, parse_xml_string_to_etree, ) from...
"""Constructors for concrete tool and input source objects.""" import logging from typing import ( Callable, Dict, List, Optional, ) from yaml import safe_load from galaxy.tool_util.loader import load_tool_with_refereces from galaxy.util import ( ElementTree, parse_xml_string_to_etree, ) from...
46,234
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/interface.py
347,348
344,432
elem
InputSource
348,353
348,353
class InputSource(metaclass=ABCMeta): default_optional = False def elem(self): FILL_FUNC_BODY @abstractmethod def get(self, key, value=None): """Return simple named properties as string for this input source. keys to be supported depend on the parameter type. """ @abstractme...
class InputSource(metaclass=ABCMeta): default_optional = False def elem(self): FILL_FUNC_BODY @abstractmethod def get(self, key, value=None): """Return simple named properties as string for this input source. keys to be supported depend on the parameter type. """ @abstractme...
# For things in transition that still depend on XML - provide a way # to grab it and just throw an error if feature is attempted to be # used with other tool sources. raise NotImplementedError(NOT_IMPLEMENTED_MESSAGE)
# For things in transition that still depend on XML - provide a way # to grab it and just throw an error if feature is attempted to be # used with other tool sources. raise NotImplementedError(NOT_IMPLEMENTED_MESSAGE)
37
719
67
786
import fnmatch import os import re from abc import ( ABCMeta, abstractmethod, ) from os.path import join from typing import ( Any, Dict, List, Optional, Tuple, TYPE_CHECKING, Union, ) import packaging.version from typing_extensions import TypedDict from galaxy.util.path import safe...
import fnmatch import os import re from abc import ( ABCMeta, abstractmethod, ) from os.path import join from typing import ( Any, Dict, List, Optional, Tuple, TYPE_CHECKING, Union, ) import packaging.version from typing_extensions import TypedDict from galaxy.util.path import safe...
46,235
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/interface.py
433,434
432,441
parse_display
PageSource
434,436
434,436
class PageSource(metaclass=ABCMeta): def parse_display(self): FILL_FUNC_BODY @abstractmethod def parse_input_sources(self) -> List[InputSource]: """Return a list of InputSource objects."""
class PageSource(metaclass=ABCMeta): def parse_display(self): FILL_FUNC_BODY @abstractmethod def parse_input_sources(self) -> List[InputSource]: """Return a list of InputSource objects."""
return None
return None
2
69
7
76
import fnmatch import os import re from abc import ( ABCMeta, abstractmethod, ) from os.path import join from typing import ( Any, Dict, List, Optional, Tuple, TYPE_CHECKING, Union, ) import packaging.version from typing_extensions import TypedDict from galaxy.util.path import safe...
import fnmatch import os import re from abc import ( ABCMeta, abstractmethod, ) from os.path import join from typing import ( Any, Dict, List, Optional, Tuple, TYPE_CHECKING, Union, ) import packaging.version from typing_extensions import TypedDict from galaxy.util.path import safe...
46,236
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/interface.py
339,341
329,344
inputs_defined
PagesSource
341,344
341,344
class PagesSource: """Contains a list of Pages - each a list of InputSources - each item in the outer list representing a page of inputs. Pages are deprecated so ideally this outer list will always be exactly a singleton. """ def __init__(self, page_sources): self.page_sources = page_so...
class PagesSource: """Contains a list of Pages - each a list of InputSources - each item in the outer list representing a page of inputs. Pages are deprecated so ideally this outer list will always be exactly a singleton. """ def __init__(self, page_sources): self.page_sources = page_so...
return True
return True
2
109
9
118
import fnmatch import os import re from abc import ( ABCMeta, abstractmethod, ) from os.path import join from typing import ( Any, Dict, List, Optional, Tuple, TYPE_CHECKING, Union, ) import packaging.version from typing_extensions import TypedDict from galaxy.util.path import safe...
import fnmatch import os import re from abc import ( ABCMeta, abstractmethod, ) from os.path import join from typing import ( Any, Dict, List, Optional, Tuple, TYPE_CHECKING, Union, ) import packaging.version from typing_extensions import TypedDict from galaxy.util.path import safe...
46,237
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/interface.py
534,535
521,568
find_required_files
RequiredFiles
535,568
535,568
class RequiredFiles: def __init__(self, includes: List[Dict], excludes: List[Dict], extend_default_excludes: bool): self.includes = includes self.excludes = excludes self.extend_default_excludes = extend_default_excludes @staticmethod def from_dict(as_dict): extend_default_e...
class RequiredFiles: def __init__(self, includes: List[Dict], excludes: List[Dict], extend_default_excludes: bool): self.includes = includes self.excludes = excludes self.extend_default_excludes = extend_default_excludes @staticmethod def from_dict(as_dict): extend_default_e...
def matches(ie_list: List, rel_path: str): for ie_item in ie_list: ie_item_path = ie_item["path"] ie_item_type = ie_item.get("path_type", "literal") if ie_item_type == "literal": if rel_path == ie_item_path: ...
def matches(ie_list: List, rel_path: str): for ie_item in ie_list: ie_item_path = ie_item["path"] ie_item_type = ie_item.get("path_type", "literal") if ie_item_type == "literal": if rel_path == ie_item_path: ...
102
201
440
641
import fnmatch import os import re from abc import ( ABCMeta, abstractmethod, ) from os.path import join from typing import ( Any, Dict, List, Optional, Tuple, TYPE_CHECKING, Union, ) import packaging.version from typing_extensions import TypedDict from galaxy.util.path import safe...
import fnmatch import os import re from abc import ( ABCMeta, abstractmethod, ) from os.path import join from typing import ( Any, Dict, List, Optional, Tuple, TYPE_CHECKING, Union, ) import packaging.version from typing_extensions import TypedDict from galaxy.util.path import safe...
46,238
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/interface.py
450,452
441,521
from_xml
TestCollectionDef
452,473
452,473
class TestCollectionDef: __test__ = False # Prevent pytest from discovering this class (issue #12071) def __init__(self, attrib, name, collection_type, elements): self.attrib = attrib self.collection_type = collection_type self.elements = elements self.name = name @staticm...
class TestCollectionDef: __test__ = False # Prevent pytest from discovering this class (issue #12071) def __init__(self, attrib, name, collection_type, elements): self.attrib = attrib self.collection_type = collection_type self.elements = elements self.name = name @staticm...
elements = [] attrib = dict(elem.attrib) collection_type = attrib["type"] name = attrib.get("name", "Unnamed Collection") for element in elem.findall("element"): element_attrib = dict(element.attrib) element_identifier = element_attrib["name"] ...
elements = [] attrib = dict(elem.attrib) collection_type = attrib["type"] name = attrib.get("name", "Unnamed Collection") for element in elem.findall("element"): element_attrib = dict(element.attrib) element_identifier = element_attrib["name"] ...
51
602
242
844
import fnmatch import os import re from abc import ( ABCMeta, abstractmethod, ) from os.path import join from typing import ( Any, Dict, List, Optional, Tuple, TYPE_CHECKING, Union, ) import packaging.version from typing_extensions import TypedDict from galaxy.util.path import safe...
import fnmatch import os import re from abc import ( ABCMeta, abstractmethod, ) from os.path import join from typing import ( Any, Dict, List, Optional, Tuple, TYPE_CHECKING, Union, ) import packaging.version from typing_extensions import TypedDict from galaxy.util.path import safe...
46,239
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/interface.py
587,588
568,589
to_dict
TestCollectionOutputDef
588,589
588,589
class TestCollectionOutputDef: __test__ = False # Prevent pytest from discovering this class (issue #12071) def __init__(self, name, attrib, element_tests): self.name = name self.collection_type = attrib.get("type", None) count = attrib.get("count", None) self.count = int(count...
class TestCollectionOutputDef: __test__ = False # Prevent pytest from discovering this class (issue #12071) def __init__(self, name, attrib, element_tests): self.name = name self.collection_type = attrib.get("type", None) count = attrib.get("count", None) self.count = int(count...
return dict(name=self.name, attributes=self.attrib, element_tests=self.element_tests)
return dict(name=self.name, attributes=self.attrib, element_tests=self.element_tests)
4
213
29
242
import fnmatch import os import re from abc import ( ABCMeta, abstractmethod, ) from os.path import join from typing import ( Any, Dict, List, Optional, Tuple, TYPE_CHECKING, Union, ) import packaging.version from typing_extensions import TypedDict from galaxy.util.path import safe...
import fnmatch import os import re from abc import ( ABCMeta, abstractmethod, ) from os.path import join from typing import ( Any, Dict, List, Optional, Tuple, TYPE_CHECKING, Union, ) import packaging.version from typing_extensions import TypedDict from galaxy.util.path import safe...
46,242
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/output_objects.py
134,136
52,159
from_dict
ToolOutput
136,154
136,154
class ToolOutput(ToolOutputBase): """ Represents an output datasets produced by a tool. For backward compatibility this behaves as if it were the tuple:: (format, metadata_source, parent) """ dict_collection_visible_keys = [ "name", "format", "label", "hidden", ...
class ToolOutput(ToolOutputBase): """ Represents an output datasets produced by a tool. For backward compatibility this behaves as if it were the tuple:: (format, metadata_source, parent) """ dict_collection_visible_keys = [ "name", "format", "label", "hidden", ...
output = ToolOutput(name) output.format = output_dict.get("format", "data") output.change_format = [] output.format_source = output_dict.get("format_source", None) output.default_identifier_source = output_dict.get("default_identifier_source", None) output.metadata_source...
output = ToolOutput(name) output.format = output_dict.get("format", "data") output.change_format = [] output.format_source = output_dict.get("format_source", None) output.default_identifier_source = output_dict.get("default_identifier_source", None) output.metadata_source...
65
900
284
1,184
from typing import ( Any, Dict, List, Optional, ) from typing_extensions import TypedDict from galaxy.util import Element from galaxy.util.dictifiable import Dictifiable from .output_actions import ToolOutputActionGroup from .output_collection_def import ( dataset_collector_descriptions_from_outpu...
from typing import ( Any, Dict, List, Optional, ) from typing_extensions import TypedDict from galaxy.util import Element from galaxy.util.dictifiable import Dictifiable from .output_actions import ToolOutputActionGroup from .output_collection_def import ( dataset_collector_descriptions_from_outpu...
46,243
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/output_objects.py
44,45
27,52
to_dict
ToolOutputBase
45,47
45,47
class ToolOutputBase(Dictifiable): def __init__( self, name: str, label: Optional[str] = None, filters: Optional[List[Element]] = None, hidden: bool = False, from_expression: Optional[str] = None, ) -> None: super().__init__() self.name = name ...
class ToolOutputBase(Dictifiable): def __init__( self, name: str, label: Optional[str] = None, filters: Optional[List[Element]] = None, hidden: bool = False, from_expression: Optional[str] = None, ) -> None: super().__init__() self.name = name ...
return super().to_dict(view=view, value_mapper=value_mapper)
return super().to_dict(view=view, value_mapper=value_mapper)
3
200
26
226
from typing import ( Any, Dict, List, Optional, ) from typing_extensions import TypedDict from galaxy.util import Element from galaxy.util.dictifiable import Dictifiable from .output_actions import ToolOutputActionGroup from .output_collection_def import ( dataset_collector_descriptions_from_outpu...
from typing import ( Any, Dict, List, Optional, ) from typing_extensions import TypedDict from galaxy.util import Element from galaxy.util.dictifiable import Dictifiable from .output_actions import ToolOutputActionGroup from .output_collection_def import ( dataset_collector_descriptions_from_outpu...
46,244
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/output_objects.py
237,238
179,325
known_outputs
ToolOutputCollection
238,288
238,288
class ToolOutputCollection(ToolOutputBase): """ Represents a HistoryDatasetCollectionAssociation of output datasets produced by a tool. .. code-block:: <outputs> <collection type="list" label="${tool.name} on ${on_string} fasta"> <discover_datasets pattern="__name__" ext="f...
class ToolOutputCollection(ToolOutputBase): """ Represents a HistoryDatasetCollectionAssociation of output datasets produced by a tool. .. code-block:: <outputs> <collection type="list" label="${tool.name} on ${on_string} fasta"> <discover_datasets pattern="__name__" ext="f...
if self.dynamic_structure: return [] # This line is probably not right - should verify structured_like # or have outputs and all outputs have name. if len(self.outputs) > 1: output_parts = [ToolOutputCollectionPart(self, k, v) for k, v in self.outputs.items()] ...
if self.dynamic_structure: return [] # This line is probably not right - should verify structured_like # or have outputs and all outputs have name. if len(self.outputs) > 1: output_parts = [ToolOutputCollectionPart(self, k, v) for k, v in self.outputs.items()] ...
122
987
532
1,519
from typing import ( Any, Dict, List, Optional, ) from typing_extensions import TypedDict from galaxy.util import Element from galaxy.util.dictifiable import Dictifiable from .output_actions import ToolOutputActionGroup from .output_collection_def import ( dataset_collector_descriptions_from_outpu...
from typing import ( Any, Dict, List, Optional, ) from typing_extensions import TypedDict from galaxy.util import Element from galaxy.util.dictifiable import Dictifiable from .output_actions import ToolOutputActionGroup from .output_collection_def import ( dataset_collector_descriptions_from_outpu...
46,245
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/output_objects.py
420,422
405,428
is_named_collection_part_name
ToolOutputCollectionPart
422,424
422,424
class ToolOutputCollectionPart: def __init__(self, output_collection_def, element_identifier, output_def, parent_ids=None): parent_ids = parent_ids or [] self.output_collection_def = output_collection_def self.element_identifier = element_identifier self.output_def = output_def ...
class ToolOutputCollectionPart: def __init__(self, output_collection_def, element_identifier, output_def, parent_ids=None): parent_ids = parent_ids or [] self.output_collection_def = output_collection_def self.element_identifier = element_identifier self.output_def = output_def ...
return "|__part__|" in name
return "|__part__|" in name
4
245
15
260
from typing import ( Any, Dict, List, Optional, ) from typing_extensions import TypedDict from galaxy.util import Element from galaxy.util.dictifiable import Dictifiable from .output_actions import ToolOutputActionGroup from .output_collection_def import ( dataset_collector_descriptions_from_outpu...
from typing import ( Any, Dict, List, Optional, ) from typing_extensions import TypedDict from galaxy.util import Element from galaxy.util.dictifiable import Dictifiable from .output_actions import ToolOutputActionGroup from .output_collection_def import ( dataset_collector_descriptions_from_outpu...
46,246
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/output_objects.py
377,379
325,396
from_dict
ToolOutputCollectionStructure
379,388
379,388
class ToolOutputCollectionStructure: def __init__( self, collection_type: Optional[str], collection_type_source: Optional[str] = None, collection_type_from_rules: Optional[str] = None, structured_like: Optional[str] = None, dataset_collector_descriptions: Optional[Lis...
class ToolOutputCollectionStructure: def __init__( self, collection_type: Optional[str], collection_type_source: Optional[str] = None, collection_type_from_rules: Optional[str] = None, structured_like: Optional[str] = None, dataset_collector_descriptions: Optional[Lis...
structure = ToolOutputCollectionStructure( collection_type=as_dict["collection_type"], collection_type_source=as_dict["collection_type_source"], collection_type_from_rules=as_dict["collection_type_from_rules"], structured_like=as_dict["structured_like"], ...
structure = ToolOutputCollectionStructure( collection_type=as_dict["collection_type"], collection_type_source=as_dict["collection_type_source"], collection_type_from_rules=as_dict["collection_type_from_rules"], structured_like=as_dict["structured_like"], ...
11
731
126
857
from typing import ( Any, Dict, List, Optional, ) from typing_extensions import TypedDict from galaxy.util import Element from galaxy.util.dictifiable import Dictifiable from .output_actions import ToolOutputActionGroup from .output_collection_def import ( dataset_collector_descriptions_from_outpu...
from typing import ( Any, Dict, List, Optional, ) from typing_extensions import TypedDict from galaxy.util import Element from galaxy.util.dictifiable import Dictifiable from .output_actions import ToolOutputActionGroup from .output_collection_def import ( dataset_collector_descriptions_from_outpu...
46,247
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/stdio.py
108,109
1,146
aggressive_error_checks
109,122
109,122
import math class StdioErrorLevel: """ These determine stdio-based error levels from matching on regular expressions and exit codes. They are meant to be used comparatively, such as showing that warning < fatal. This is really meant to just be an enum. """ NO_ERROR = 0 LOG = 1 QC = 1....
import math class StdioErrorLevel: """ These determine stdio-based error levels from matching on regular expressions and exit codes. They are meant to be used comparatively, such as showing that warning < fatal. This is really meant to just be an enum. """ NO_ERROR = 0 LOG = 1 QC = 1....
exit_codes, _ = error_on_exit_code() # these regexes are processed as case insensitive by default regexes = [ _oom_regex("MemoryError"), _oom_regex("std::bad_alloc"), _oom_regex("java.lang.OutOfMemoryError"), _oom_regex("Out of memory"), _error_regex("exception:"), ...
exit_codes, _ = error_on_exit_code() # these regexes are processed as case insensitive by default regexes = [ _oom_regex("MemoryError"), _oom_regex("std::bad_alloc"), _oom_regex("java.lang.OutOfMemoryError"), _oom_regex("Out of memory"), _error_regex("exception:"), ...
29
1,296
135
1,431
import math class StdioErrorLevel: """ These determine stdio-based error levels from matching on regular expressions and exit codes. They are meant to be used comparatively, such as showing that warning < fatal. This is really meant to just be an enum. """ NO_ERROR = 0 LOG = 1 QC = 1....
import math class StdioErrorLevel: """ These determine stdio-based error levels from matching on regular expressions and exit codes. They are meant to be used comparatively, such as showing that warning < fatal. This is really meant to just be an enum. """ NO_ERROR = 0 LOG = 1 QC = 1....
46,248
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/stdio.py
27,29
4,35
desc
StdioErrorLevel
29,35
29,35
class StdioErrorLevel: """ These determine stdio-based error levels from matching on regular expressions and exit codes. They are meant to be used comparatively, such as showing that warning < fatal. This is really meant to just be an enum. """ NO_ERROR = 0 LOG = 1 QC = 1.1 WARNING ...
class StdioErrorLevel: """ These determine stdio-based error levels from matching on regular expressions and exit codes. They are meant to be used comparatively, such as showing that warning < fatal. This is really meant to just be an enum. """ NO_ERROR = 0 LOG = 1 QC = 1.1 WARNING ...
err_msg = "Unknown error" if error_level > 0 and error_level <= StdioErrorLevel.MAX: err_msg = StdioErrorLevel.descs[error_level] return err_msg
err_msg = "Unknown error" if error_level > 0 and error_level <= StdioErrorLevel.MAX: err_msg = StdioErrorLevel.descs[error_level] return err_msg
17
206
62
268
import math class StdioErrorLevel: """ These determine stdio-based error levels from matching on regular expressions and exit codes. They are meant to be used comparatively, such as showing that warning < fatal. This is really meant to just be an enum. """ NO_ERROR = 0 LOG = 1 QC = 1....
import math class StdioErrorLevel: """ These determine stdio-based error levels from matching on regular expressions and exit codes. They are meant to be used comparatively, such as showing that warning < fatal. This is really meant to just be an enum. """ NO_ERROR = 0 LOG = 1 QC = 1....
46,249
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/stdio.py
48,49
35,58
to_dict
ToolStdioExitCode
49,58
49,58
class ToolStdioExitCode: """ This is a container for the <stdio> element's <exit_code> subelement. The exit_code element has a range of exit codes and the error level. """ def __init__(self, as_dict=None): as_dict = as_dict or {} self.range_start = as_dict.get("range_start", -math.i...
class ToolStdioExitCode: """ This is a container for the <stdio> element's <exit_code> subelement. The exit_code element has a range of exit codes and the error level. """ def __init__(self, as_dict=None): as_dict = as_dict or {} self.range_start = as_dict.get("range_start", -math.i...
return { "class": "ToolStdioExitCode", "range_start": self.range_start, "range_end": self.range_end, "error_level": self.error_level, "desc": self.desc, }
return { "class": "ToolStdioExitCode", "range_start": self.range_start, "range_end": self.range_end, "error_level": self.error_level, "desc": self.desc, }
13
189
78
267
import math class StdioErrorLevel: """ These determine stdio-based error levels from matching on regular expressions and exit codes. They are meant to be used comparatively, such as showing that warning < fatal. This is really meant to just be an enum. """ NO_ERROR = 0 LOG = 1 QC = 1....
import math class StdioErrorLevel: """ These determine stdio-based error levels from matching on regular expressions and exit codes. They are meant to be used comparatively, such as showing that warning < fatal. This is really meant to just be an enum. """ NO_ERROR = 0 LOG = 1 QC = 1....
46,250
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/stdio.py
74,75
58,85
to_dict
ToolStdioRegex
75,85
75,85
class ToolStdioRegex: """ This is a container for the <stdio> element's regex subelement. The regex subelement has a "match" attribute, a "sources" attribute that contains "output" and/or "error", and a "level" attribute that contains "warning" or "fatal". """ def __init__(self, as_dict=Non...
class ToolStdioRegex: """ This is a container for the <stdio> element's regex subelement. The regex subelement has a "match" attribute, a "sources" attribute that contains "output" and/or "error", and a "level" attribute that contains "warning" or "fatal". """ def __init__(self, as_dict=Non...
return { "class": "ToolStdioRegex", "match": self.match, "stdout_match": self.stdout_match, "stderr_match": self.stderr_match, "error_level": self.error_level, "desc": self.desc, }
return { "class": "ToolStdioRegex", "match": self.match, "stdout_match": self.stdout_match, "stderr_match": self.stderr_match, "error_level": self.error_level, "desc": self.desc, }
15
231
92
323
import math class StdioErrorLevel: """ These determine stdio-based error levels from matching on regular expressions and exit codes. They are meant to be used comparatively, such as showing that warning < fatal. This is really meant to just be an enum. """ NO_ERROR = 0 LOG = 1 QC = 1....
import math class StdioErrorLevel: """ These determine stdio-based error levels from matching on regular expressions and exit codes. They are meant to be used comparatively, such as showing that warning < fatal. This is really meant to just be an enum. """ NO_ERROR = 0 LOG = 1 QC = 1....
46,251
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/util.py
11,12
1,26
is_dict
12,15
12,15
from collections import OrderedDict DEFAULT_DELTA = 10000 DEFAULT_DELTA_FRAC = None DEFAULT_METRIC = "mae" DEFAULT_EPS = 0.01 DEFAULT_PIN_LABELS = None def is_dict(item): FILL_FUNC_BODYdef _parse_name(name, argument): """Determine name of an input source from name and argument returns the name or if absent ...
from collections import OrderedDict DEFAULT_DELTA = 10000 DEFAULT_DELTA_FRAC = None DEFAULT_METRIC = "mae" DEFAULT_EPS = 0.01 DEFAULT_PIN_LABELS = None def is_dict(item): FILL_FUNC_BODYdef _parse_name(name, argument): """Determine name of an input source from name and argument returns the name or if absent ...
return isinstance(item, dict) or isinstance(item, OrderedDict)
return isinstance(item, dict) or isinstance(item, OrderedDict)
6
207
26
233
from collections import OrderedDict DEFAULT_DELTA = 10000 DEFAULT_DELTA_FRAC = None DEFAULT_METRIC = "mae" DEFAULT_EPS = 0.01 DEFAULT_PIN_LABELS = None def is_dict(item): FILL_FUNC_BODYdef _parse_name(name, argument): """Determine name of an input source from name and argument returns the name or if absent ...
from collections import OrderedDict DEFAULT_DELTA = 10000 DEFAULT_DELTA_FRAC = None DEFAULT_METRIC = "mae" DEFAULT_EPS = 0.01 DEFAULT_PIN_LABELS = None def is_dict(item): FILL_FUNC_BODYdef _parse_name(name, argument): """Determine name of an input source from name and argument returns the name or if absent ...
46,253
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/yaml.py
373,374
316,379
parse_default
YamlInputSource
374,379
374,379
class YamlInputSource(InputSource): def __init__(self, input_dict): self.input_dict = input_dict def get(self, key, default=None): return self.input_dict.get(key, default) def get_bool(self, key, default): return self.input_dict.get(key, default) def parse_input_type(self): ...
class YamlInputSource(InputSource): def __init__(self, input_dict): self.input_dict = input_dict def get(self, key, default=None): return self.input_dict.get(key, default) def get_bool(self, key, default): return self.input_dict.get(key, default) def parse_input_type(self): ...
input_dict = self.input_dict default_def = input_dict.get("default", None) return default_def
input_dict = self.input_dict default_def = input_dict.get("default", None) return default_def
9
562
40
602
import json from typing import ( Any, Dict, List, Optional, ) import packaging.version from galaxy.tool_util.deps import requirements from galaxy.tool_util.parser.util import ( DEFAULT_DELTA, DEFAULT_DELTA_FRAC, ) from .interface import ( AssertionDict, AssertionList, InputSource, ...
import json from typing import ( Any, Dict, List, Optional, ) import packaging.version from galaxy.tool_util.deps import requirements from galaxy.tool_util.parser.util import ( DEFAULT_DELTA, DEFAULT_DELTA_FRAC, ) from .interface import ( AssertionDict, AssertionList, InputSource, ...
46,254
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/yaml.py
312,313
308,316
parse_input_sources
YamlPageSource
313,316
313,316
class YamlPageSource(PageSource): def __init__(self, inputs_list): self.inputs_list = inputs_list def parse_input_sources(self): FILL_FUNC_BODY
class YamlPageSource(PageSource): def __init__(self, inputs_list): self.inputs_list = inputs_list def parse_input_sources(self): FILL_FUNC_BODY
return list(map(YamlInputSource, self.inputs_list))
return list(map(YamlInputSource, self.inputs_list))
3
56
24
80
import json from typing import ( Any, Dict, List, Optional, ) import packaging.version from galaxy.tool_util.deps import requirements from galaxy.tool_util.parser.util import ( DEFAULT_DELTA, DEFAULT_DELTA_FRAC, ) from .interface import ( AssertionDict, AssertionList, InputSource, ...
import json from typing import ( Any, Dict, List, Optional, ) import packaging.version from galaxy.tool_util.deps import requirements from galaxy.tool_util.parser.util import ( DEFAULT_DELTA, DEFAULT_DELTA_FRAC, ) from .interface import ( AssertionDict, AssertionList, InputSource, ...
46,255
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/parser/yaml.py
69,70
36,214
parse_xrefs
YamlToolSource
70,73
70,73
class YamlToolSource(ToolSource): language = "yaml" def __init__(self, root_dict: Dict, source_path=None): self.root_dict = root_dict self._source_path = source_path self._macro_paths: List[str] = [] @property def source_path(self): return self._source_path def par...
class YamlToolSource(ToolSource): language = "yaml" def __init__(self, root_dict: Dict, source_path=None): self.root_dict = root_dict self._source_path = source_path self._macro_paths: List[str] = [] @property def source_path(self): return self._source_path def par...
xrefs = self.root_dict.get("xrefs", []) return [dict(value=xref["value"], reftype=xref["type"]) for xref in xrefs if xref["type"]]
xrefs = self.root_dict.get("xrefs", []) return [dict(value=xref["value"], reftype=xref["type"]) for xref in xrefs if xref["type"]]
13
1,829
61
1,890
import json from typing import ( Any, Dict, List, Optional, ) import packaging.version from galaxy.tool_util.deps import requirements from galaxy.tool_util.parser.util import ( DEFAULT_DELTA, DEFAULT_DELTA_FRAC, ) from .interface import ( AssertionDict, AssertionList, InputSource, ...
import json from typing import ( Any, Dict, List, Optional, ) import packaging.version from galaxy.tool_util.deps import requirements from galaxy.tool_util.parser.util import ( DEFAULT_DELTA, DEFAULT_DELTA_FRAC, ) from .interface import ( AssertionDict, AssertionList, InputSource, ...
46,257
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/provided_metadata.py
60,61
42,94
get_new_dataset_meta_by_basename
BaseToolProvidedMetadata
67,69
61,69
class BaseToolProvidedMetadata: def get_new_datasets(self, output_name): """Find new datasets for dataset discovery for specified output. Return a list of such datasets. Called only in the context of discovering datasets when discover_via="tool_provided_metadata" is defined in the ...
class BaseToolProvidedMetadata: def get_new_datasets(self, output_name): """Find new datasets for dataset discovery for specified output. Return a list of such datasets. Called only in the context of discovering datasets when discover_via="tool_provided_metadata" is defined in the ...
return {}
"""For a discovered dataset, get the corresponding metadata entry. The discovery may have been from explicit listing in this file (returned from get_new_datasets) or via file regex, either way the basename of the file is used to index the fetching of the metadata entry. """ ...
2
454
7
461
import json import logging import os import re from galaxy.util import stringify_dictionary_keys log = logging.getLogger(__name__) def parse_tool_provided_metadata(meta_file, provided_metadata_style=None, job_wrapper=None): """Return a ToolProvidedMetadata object for specified file path. If meta_file is ab...
import json import logging import os import re from galaxy.util import stringify_dictionary_keys log = logging.getLogger(__name__) def parse_tool_provided_metadata(meta_file, provided_metadata_style=None, job_wrapper=None): """Return a ToolProvidedMetadata object for specified file path. If meta_file is ab...
46,258
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/provided_metadata.py
140,141
98,180
get_dataset_meta
LegacyToolProvidedMetadata
141,148
141,148
class LegacyToolProvidedMetadata(BaseToolProvidedMetadata): def __init__(self, meta_file, job_wrapper=None): self.meta_file = meta_file self.tool_provided_job_metadata = [] with open(meta_file) as f: for line in f: try: line_as_dict = stringif...
class LegacyToolProvidedMetadata(BaseToolProvidedMetadata): def __init__(self, meta_file, job_wrapper=None): self.meta_file = meta_file self.tool_provided_job_metadata = [] with open(meta_file) as f: for line in f: try: line_as_dict = stringif...
for meta in self.tool_provided_job_metadata: if meta["type"] == "dataset" and "dataset_id" in meta and int(meta["dataset_id"]) == dataset_id: return meta if meta["type"] == "dataset" and "dataset_uuid" in meta and meta["dataset_uuid"] == dataset_uuid: retu...
for meta in self.tool_provided_job_metadata: if meta["type"] == "dataset" and "dataset_id" in meta and int(meta["dataset_id"]) == dataset_id: return meta if meta["type"] == "dataset" and "dataset_uuid" in meta and meta["dataset_uuid"] == dataset_uuid: retu...
34
933
101
1,034
import json import logging import os import re from galaxy.util import stringify_dictionary_keys log = logging.getLogger(__name__) def parse_tool_provided_metadata(meta_file, provided_metadata_style=None, job_wrapper=None): """Return a ToolProvidedMetadata object for specified file path. If meta_file is ab...
import json import logging import os import re from galaxy.util import stringify_dictionary_keys log = logging.getLogger(__name__) def parse_tool_provided_metadata(meta_file, provided_metadata_style=None, job_wrapper=None): """Return a ToolProvidedMetadata object for specified file path. If meta_file is ab...
46,259
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/provided_metadata.py
228,229
180,235
get_unnamed_outputs
ToolProvidedMetadata
229,232
229,232
class ToolProvidedMetadata(BaseToolProvidedMetadata): def __init__(self, meta_file): self.meta_file = meta_file with open(meta_file) as f: self.tool_provided_job_metadata = json.load(f) def get_dataset_meta(self, output_name, dataset_id, dataset_uuid): return self.tool_provi...
class ToolProvidedMetadata(BaseToolProvidedMetadata): def __init__(self, meta_file): self.meta_file = meta_file with open(meta_file) as f: self.tool_provided_job_metadata = json.load(f) def get_dataset_meta(self, output_name, dataset_id, dataset_uuid): return self.tool_provi...
log.debug(f"unnamed outputs [{self.tool_provided_job_metadata}]") return self.tool_provided_job_metadata.get("__unnamed_outputs", [])
log.debug(f"unnamed outputs [{self.tool_provided_job_metadata}]") return self.tool_provided_job_metadata.get("__unnamed_outputs", [])
6
626
54
680
import json import logging import os import re from galaxy.util import stringify_dictionary_keys log = logging.getLogger(__name__) def parse_tool_provided_metadata(meta_file, provided_metadata_style=None, job_wrapper=None): """Return a ToolProvidedMetadata object for specified file path. If meta_file is ab...
import json import logging import os import re from galaxy.util import stringify_dictionary_keys log = logging.getLogger(__name__) def parse_tool_provided_metadata(meta_file, provided_metadata_style=None, job_wrapper=None): """Return a ToolProvidedMetadata object for specified file path. If meta_file is ab...
46,260
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/toolbox/filters/examples.py.sample
111,112
1,131
per_host_tool_sections
121,131
112,131
import logging log = logging.getLogger( __name__ ) def restrict_encode( context, tool ): """ Disable the random interval ENCODE tool This tool filter will disable all the ENCODE tool when enabled. """ if tool.id == 'random_intervals1': return False return True def restrict_text( conte...
import logging log = logging.getLogger( __name__ ) def restrict_encode( context, tool ): """ Disable the random interval ENCODE tool This tool filter will disable all the ENCODE tool when enabled. """ if tool.id == 'random_intervals1': return False return True def restrict_text( conte...
host = context.trans.request.host # Core tools used by all virtual hosts. valid_sections = [ "getext", "textutil", "filter" ] if "ngs.galaxy.example.com" in host: valid_sections += [ "ngs" ] elif "microarray.galaxy.example.com" in host: valid_sections += [ "microarray" ] elif "pr...
""" This tool section filter results in different sections being display based on the URL the user is making the request to. This could allow a single Galaxy instance to seem like several different instances hosting different tools based on the URL used to access the Galxy. This can be enabled by re...
49
1,191
152
1,343
import logging log = logging.getLogger( __name__ ) def restrict_encode( context, tool ): """ Disable the random interval ENCODE tool This tool filter will disable all the ENCODE tool when enabled. """ if tool.id == 'random_intervals1': return False return True def restrict_text( conte...
import logging log = logging.getLogger( __name__ ) def restrict_encode( context, tool ): """ Disable the random interval ENCODE tool This tool filter will disable all the ENCODE tool when enabled. """ if tool.id == 'random_intervals1': return False return True def restrict_text( conte...
46,261
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/toolbox/integrated_panel.py
57,58
33,137
_write_integrated_tool_panel_config_file
ManagesIntegratedToolPanelMixin
62,137
58,137
class ManagesIntegratedToolPanelMixin: def _init_integrated_tool_panel(self, config): self.update_integrated_tool_panel = config.update_integrated_tool_panel self._integrated_tool_panel_config = config.integrated_tool_panel_config self._integrated_tool_panel_tracking_directory = getattr( ...
class ManagesIntegratedToolPanelMixin: def _init_integrated_tool_panel(self, config): self.update_integrated_tool_panel = config.update_integrated_tool_panel self._integrated_tool_panel_config = config.integrated_tool_panel_config self._integrated_tool_panel_tracking_directory = getattr( ...
destination = os.path.abspath(self._integrated_tool_panel_config) log.debug("Writing integrated tool panel config file to '%s'", destination) tracking_directory = self._integrated_tool_panel_tracking_directory if tracking_directory: if not os.path.exists(tracking_directory): ...
""" Write the current in-memory version of the integrated_tool_panel.xml file to disk. Since Galaxy administrators use this file to manage the tool panel, we'll not use xml_to_string() since it doesn't write XML quite right. """ destination = os.path.abspath(self._integrated_too...
245
475
1,168
1,643
import logging import os import shutil import string import time import traceback from xml.sax.saxutils import escape from galaxy.util import RW_R__R__ from galaxy.util.renamed_temporary_file import RenamedTemporaryFile from .panel import ( panel_item_types, ToolPanelElements, ) log = logging.getLogger(__name...
import logging import os import shutil import string import time import traceback from xml.sax.saxutils import escape from galaxy.util import RW_R__R__ from galaxy.util.renamed_temporary_file import RenamedTemporaryFile from .panel import ( panel_item_types, ToolPanelElements, ) log = logging.getLogger(__name...
46,262
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/toolbox/lineages/factory.py
35,36
10,67
get
LineageMap
43,62
36,62
class LineageMap: """Map each unique tool id to a lineage object.""" def __init__(self, app): self.lineage_map: Dict[str, ToolLineage] = {} self.app = app def register(self, tool) -> ToolLineage: tool_id = tool.id versionless_tool_id = remove_version_from_guid(tool_id) ...
class LineageMap: """Map each unique tool id to a lineage object.""" def __init__(self, app): self.lineage_map: Dict[str, ToolLineage] = {} self.app = app def register(self, tool) -> ToolLineage: tool_id = tool.id versionless_tool_id = remove_version_from_guid(tool_id) ...
lineage = self._get_versionless(tool_id) if lineage: return lineage if tool_id not in self.lineage_map: toolbox = None try: toolbox = self.app.toolbox except AttributeError: # We're building the lineage map while bui...
""" Get lineage for `tool_id`. By preference the lineage for a version-agnostic tool_id is returned. Falls back to fetching the lineage only when this fails. This happens when the tool_id does not contain a version. """ lineage = self._get_versionless(tool_id) ...
72
486
227
713
from typing import ( Dict, Optional, ) from galaxy.util.tool_version import remove_version_from_guid from .interface import ToolLineage class LineageMap: """Map each unique tool id to a lineage object.""" def __init__(self, app): self.lineage_map: Dict[str, ToolLineage] = {} self.app...
from typing import ( Dict, Optional, ) from galaxy.util.tool_version import remove_version_from_guid from .interface import ToolLineage class LineageMap: """Map each unique tool id to a lineage object.""" def __init__(self, app): self.lineage_map: Dict[str, ToolLineage] = {} self.app...
46,263
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/toolbox/lineages/interface.py
51,53
39,93
tool_ids
ToolLineage
53,57
53,57
class ToolLineage: """Simple tool's loaded directly from file system with lineage determined solely by PEP 440 versioning scheme. """ lineages_by_id: Dict[str, "ToolLineage"] = {} lock = threading.Lock() def __init__(self, tool_id, **kwds): self.tool_id = tool_id self.tool_vers...
class ToolLineage: """Simple tool's loaded directly from file system with lineage determined solely by PEP 440 versioning scheme. """ lineages_by_id: Dict[str, "ToolLineage"] = {} lock = threading.Lock() def __init__(self, tool_id, **kwds): self.tool_id = tool_id self.tool_vers...
versionless_tool_id = remove_version_from_guid(self.tool_id) tool_id = versionless_tool_id or self.tool_id return [f"{tool_id}/{version}" for version in self.tool_versions]
versionless_tool_id = remove_version_from_guid(self.tool_id) tool_id = versionless_tool_id or self.tool_id return [f"{tool_id}/{version}" for version in self.tool_versions]
14
520
70
590
import threading from typing import ( Any, Dict, List, ) from sortedcontainers import SortedSet from galaxy.tool_util.version import parse_version from galaxy.util.tool_version import remove_version_from_guid class ToolLineageVersion: """Represents a single tool in a lineage. If lineage is based ...
import threading from typing import ( Any, Dict, List, ) from sortedcontainers import SortedSet from galaxy.tool_util.version import parse_version from galaxy.util.tool_version import remove_version_from_guid class ToolLineageVersion: """Represents a single tool in a lineage. If lineage is based ...
46,264
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/toolbox/lineages/interface.py
23,25
14,39
id_based
ToolLineageVersion
30,32
25,32
class ToolLineageVersion: """Represents a single tool in a lineage. If lineage is based around GUIDs that somehow encode the version (either using GUID or a simple tool id and a version).""" def __init__(self, id, version): self.id = id self.version = version @property def id_b...
class ToolLineageVersion: """Represents a single tool in a lineage. If lineage is based around GUIDs that somehow encode the version (either using GUID or a simple tool id and a version).""" def __init__(self, id, version): self.id = id self.version = version @property def id_b...
return self.version is None
"""Return True if the lineage is defined by GUIDs (in this case the indexer of the tools (i.e. the ToolBox) should ignore the tool_version (because it is encoded in the GUID and managed externally). """ return self.version is None
4
202
11
213
import threading from typing import ( Any, Dict, List, ) from sortedcontainers import SortedSet from galaxy.tool_util.version import parse_version from galaxy.util.tool_version import remove_version_from_guid class ToolLineageVersion: """Represents a single tool in a lineage. If lineage is based ...
import threading from typing import ( Any, Dict, List, ) from sortedcontainers import SortedSet from galaxy.tool_util.version import parse_version from galaxy.util.tool_version import remove_version_from_guid class ToolLineageVersion: """Represents a single tool in a lineage. If lineage is based ...
46,265
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/toolbox/panel.py
30,31
21,47
panel_items_iter
HasPanelItems
34,47
31,47
class HasPanelItems: """ """ @abstractmethod def panel_items(self): """Return an ordered dictionary-like object describing tool panel items (such as workflows, tools, labels, and sections). """ def panel_items_iter(self): FILL_FUNC_BODY
class HasPanelItems: """ """ @abstractmethod def panel_items(self): """Return an ordered dictionary-like object describing tool panel items (such as workflows, tools, labels, and sections). """ def panel_items_iter(self): """Iterate through panel items each represented ...
for panel_key, panel_value in self.panel_items().items(): if panel_value is None: continue panel_type = panel_item_types.SECTION if panel_key.startswith("tool_"): panel_type = panel_item_types.TOOL elif panel_key.startswith("label_"...
"""Iterate through panel items each represented as a tuple of (panel_key, panel_type, panel_content). """ for panel_key, panel_value in self.panel_items().items(): if panel_value is None: continue panel_type = panel_item_types.SECTION i...
32
112
164
276
from abc import abstractmethod from enum import Enum from typing import ( Dict, Optional, Tuple, ) from galaxy.util.dictifiable import Dictifiable from galaxy.util.odict import odict from .parser import ensure_tool_conf_item class panel_item_types(str, Enum): TOOL = "TOOL" WORKFLOW = "WORKFLOW" ...
from abc import abstractmethod from enum import Enum from typing import ( Dict, Optional, Tuple, ) from galaxy.util.dictifiable import Dictifiable from galaxy.util.odict import odict from .parser import ensure_tool_conf_item class panel_item_types(str, Enum): TOOL = "TOOL" WORKFLOW = "WORKFLOW" ...
46,266
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/toolbox/panel.py
172,173
157,306
replace_tool_for_id
ToolPanelElements
173,183
173,183
class ToolPanelElements(odict, HasPanelItems): """Represents an ordered dictionary of tool entries - abstraction used both by tool panel itself (normal and integrated) and its sections. """ _section_by_tool: Dict[str, Tuple[str, str]] = {} def record_section_for_tool_id(self, tool_id: str, key: st...
class ToolPanelElements(odict, HasPanelItems): """Represents an ordered dictionary of tool entries - abstraction used both by tool panel itself (normal and integrated) and its sections. """ _section_by_tool: Dict[str, Tuple[str, str]] = {} def record_section_for_tool_id(self, tool_id: str, key: st...
tool_key = f"tool_{tool_id}" for key, val in self.items(): if key == tool_key: self[key] = new_tool break elif key.startswith("section"): if tool_key in val.elems: self[key].elems[tool_key] = new_tool ...
tool_key = f"tool_{tool_id}" for key, val in self.items(): if key == tool_key: self[key] = new_tool break elif key.startswith("section"): if tool_key in val.elems: self[key].elems[tool_key] = new_tool ...
26
1,409
102
1,511
from abc import abstractmethod from enum import Enum from typing import ( Dict, Optional, Tuple, ) from galaxy.util.dictifiable import Dictifiable from galaxy.util.odict import odict from .parser import ensure_tool_conf_item class panel_item_types(str, Enum): TOOL = "TOOL" WORKFLOW = "WORKFLOW" ...
from abc import abstractmethod from enum import Enum from typing import ( Dict, Optional, Tuple, ) from galaxy.util.dictifiable import Dictifiable from galaxy.util.odict import odict from .parser import ensure_tool_conf_item class panel_item_types(str, Enum): TOOL = "TOOL" WORKFLOW = "WORKFLOW" ...
46,267
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/toolbox/panel.py
100,101
47,134
to_dict
ToolSection
109,130
101,130
class ToolSection(Dictifiable, HasPanelItems): """ A group of tools with similar type/purpose that will be displayed as a group in the user interface. """ dict_collection_visible_keys = ["id", "name", "version", "description", "links"] def __init__(self, item=None): """Build a ToolSect...
class ToolSection(Dictifiable, HasPanelItems): """ A group of tools with similar type/purpose that will be displayed as a group in the user interface. """ dict_collection_visible_keys = ["id", "name", "version", "description", "links"] def __init__(self, item=None): """Build a ToolSect...
section_dict = super().to_dict() section_elts = [] kwargs = dict(trans=trans, link_details=link_details, tool_help=tool_help) for elt in self.elems.values(): if hasattr(elt, "tool_type") and toolbox: if only_ids: section_elts.append(elt.id...
"""Return a dict that includes section's attributes. if `only_ids` is `True`, we store only the ids of the section's tools in `section.tools` (also full `ToolSectionLabel` objects in `section.tools` if any are present) if `only_ids` is `False`, we store the section's full `Tool` (and a...
58
672
263
935
from abc import abstractmethod from enum import Enum from typing import ( Dict, Optional, Tuple, ) from galaxy.util.dictifiable import Dictifiable from galaxy.util.odict import odict from .parser import ensure_tool_conf_item class panel_item_types(str, Enum): TOOL = "TOOL" WORKFLOW = "WORKFLOW" ...
from abc import abstractmethod from enum import Enum from typing import ( Dict, Optional, Tuple, ) from galaxy.util.dictifiable import Dictifiable from galaxy.util.odict import odict from .parser import ensure_tool_conf_item class panel_item_types(str, Enum): TOOL = "TOOL" WORKFLOW = "WORKFLOW" ...
46,268
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy
/home/hieuvd/dung_repo/raw/stars_03/galaxyproject_galaxy/galaxy/lib/galaxy/tool_util/toolbox/panel.py
153,154
134,157
to_dict
ToolSectionLabel
154,157
154,157
class ToolSectionLabel(Dictifiable): """ A label for a set of tools that can be displayed above groups of tools and sections in the user interface """ dict_collection_visible_keys = ["id", "text", "version", "description", "links"] def __init__(self, item): """Build a ToolSectionLabel ...
class ToolSectionLabel(Dictifiable): """ A label for a set of tools that can be displayed above groups of tools and sections in the user interface """ dict_collection_visible_keys = ["id", "text", "version", "description", "links"] def __init__(self, item): """Build a ToolSectionLabel ...
return super().to_dict()
return super().to_dict()
2
204
14
218
from abc import abstractmethod from enum import Enum from typing import ( Dict, Optional, Tuple, ) from galaxy.util.dictifiable import Dictifiable from galaxy.util.odict import odict from .parser import ensure_tool_conf_item class panel_item_types(str, Enum): TOOL = "TOOL" WORKFLOW = "WORKFLOW" ...
from abc import abstractmethod from enum import Enum from typing import ( Dict, Optional, Tuple, ) from galaxy.util.dictifiable import Dictifiable from galaxy.util.odict import odict from .parser import ensure_tool_conf_item class panel_item_types(str, Enum): TOOL = "TOOL" WORKFLOW = "WORKFLOW" ...