Skip to content

Lesson learned from unit tests #53

@bernt-matthias

Description

@bernt-matthias

This is the list of TODOs that I would like to cover in the near future:

  • CDATA for command and help: started here bernt-matthias@a9ea258

  • optional string/int/... parameters dont get optional="true" its currently only set for parameters with restrictions bernt-matthias@9ab3b25

  • int/float without a default value currently are autoset to 0 -- needs manual cherry pick from Galaxy converter improvements #49

  • fix indentation of closing #end if for the #if str(...) and the -parameter, bernt-matthias@eb50cfa

  • there may be different ways to specify itemlists on the cli: -param A B C or -param A -param B -param C, see command line for itemlists OpenMS/OpenMS#4196, but in OpenMS only the former is used.

  • add the possibility to add hidden parameters

  • <item type='boolean' >

    • are possible in ctd v1.7
  • <item type='string' restriction="true,false">

  • <item type='string' restriction="...,...,..."> and <itemlist type='string' restriction="...,...,...">

    • itemlist with restrictions should be a select, not it is a repeat, bernt-matthias@9ab3b25
    • I would prefer non-radio selects .. lets keep radio up to 4 options
    • Do text and select inputs need the sanitizer (selects definitely can contain weird characters)
    • selects with default select the option and a value="default" (redundant), bernt-matthias@12fe492
    • select: cheetah can probably be simplified by using '$param_param_wodefault_mandatory_restricted' instead of the inner if, bernt-matthias@9ab3b25
  • <itemlist type='string/int/float'> are currently rendered as repeat, which does not allow for default values. the best seems to be render them as comma separated list of elements with appropriate validators and sanitizers. bernt-matthias@ed73ced

    • if default value(s) are given max=1 is set?
    • defaults are not set as repeat elements, but as value="A B"
    • int and float repeats are rendered as text
    • [ ]
  • Input files

  • Output files

    • all output files need quoting bernt-matthias@bcb9986
    • optional output files? -> add boolean to inputs and filter to the output bernt-matthias@5873f96
    • do output files (with a single possible format) need to have the correct extension?
    • output files allowing multiple formats currently just set one
      • if there is an input with the same supported formats (maybe check if its only one input to be sure) then set it as format_source
      • otherwise a select box for the user which to choose
    • multiple output files (needs to be the same number as for a specific input in most cases .. seems difficult to determine)
      • maybe check if there is only a single input or have an additional tabular config for controling this
    • Can output parameters be black listed? Seems not possible to black list param_stdout (seems absent automatically if there are outputs)
  • Use {# ' '.join([\"'%s'\"%str(_) for _ in " + actual_parameter + "])} instead of tmp variable in command block for list selection, maybe also for multiple file input (by adding an if _ != None ), also all references to repeats could be removed from there. bernt-matthias@bcb9986

  • tests?

    • remove macro="..." from conditional there for add the conditional select param
    • implement the generation of simple test(s) for the test cases: setting all mandatory options wo defaults bernt-matthias@7d22fad
    • use the same code to extract a <test> (ie. remove all the rest) from the ctd files in the OpenMS tests
  • implement <NODE> in tests (and render as section?)

  • OpenMS has parameters specifying prefixes for output files, e.g. DTAExtractor.ctd <ITEM name="out" value="" type="string" description="base name of DTA output files (RT, m/z and extension are appended)" required="true" advanced="false" />

  • data type mapping

    • TOFCalibration tof_const parameter (OpenMS expects csv) works only if the file extension is absent or csv -> maybe remove extension for tabular or hardcode to csv (the former might be easier for tests because test data is detected as text)

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