Skip to content

planemo lint XSD check unaware of legacy parameter attribute default_value #593

@peterjc

Description

@peterjc

While <param value="..." ...> is prefered, Galaxy still supports <param default_value="..." ...> for a ColumnListParameter, as can be seen here:

https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/tools/parameters/basic.py#L1005

        # Legacy style default value specification...
        self.default_value = input_source.get( "default_value", None )
        if self.default_value is None:
            # Newer style... more in line with other parameters.
            self.default_value = input_source.get( "value", None )
        if self.default_value is not None:
            self.default_value = ColumnListParameter._strip_c( self.default_value )

The XSD should be aware of this legacy attribute, which currently causes lint failures, e.g. https://travis-ci.org/peterjc/galaxy_blast/jobs/167595623

+Linting tool /home/travis/build/peterjc/galaxy_blast/tools/blastxml_to_top_descr/blastxml_to_top_descr.xml
Applying linter tests... CHECK
.. CHECK: 2 test(s) found.
Applying linter output... CHECK
.. INFO: 1 outputs found.
Applying linter inputs... CHECK
.. INFO: Found 7 input parameters.
Applying linter help... CHECK
.. CHECK: Tool contains help section.
.. CHECK: Help contains valid reStructuredText.
Applying linter general... CHECK
.. CHECK: Tool defines a version [0.1.2].
.. CHECK: Tool defines a name [BLAST top hit descriptions].
.. CHECK: Tool defines an id [blastxml_to_top_descr].
Applying linter command... CHECK
.. INFO: Command uses deprecated 'interpreter' attribute.
.. INFO: Tool contains a command with interpreter of type [python].
Applying linter citations... CHECK
.. CHECK: Found 1 likely valid citations.
Applying linter tool_xsd... FAIL
.. ERROR: Invalid tmp6TctTh found. Errors [/tmp/tmp6TctTh:24:0:ERROR:SCHEMASV:SCHEMAV_CVC_COMPLEX_TYPE_3_2_1: Element 'option', attribute 'select': The attribute 'select' is not allowed.
/tmp/tmp6TctTh:32:0:ERROR:SCHEMASV:SCHEMAV_CVC_COMPLEX_TYPE_3_2_1: Element 'param', attribute 'default_value': The attribute 'default_value' is not allowed.
/tmp/tmp6TctTh:33:0:ERROR:SCHEMASV:SCHEMAV_CVC_COMPLEX_TYPE_3_2_1: Element 'param', attribute 'default_value': The attribute 'default_value' is not allowed.
/tmp/tmp6TctTh:34:0:ERROR:SCHEMASV:SCHEMAV_CVC_COMPLEX_TYPE_3_2_1: Element 'param', attribute 'default_value': The attribute 'default_value' is not allowed.]
Applying linter shed_metadata... CHECK
.. INFO: Found all shed metadata fields required for automated repository creation and/or updates.
Failed linting

See galaxyproject/galaxy@9128311 (originally only default_value was supported) and the option to use the more common value added in galaxyproject/galaxy@40f19d2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions