Skip to content

Add CWL support #28

Open
Open

Description

@chahuistle

The most reasonable way to go around this would be to refactor generator.py following these guidelines:

  • Each supported format (Galaxy, CWL) should have its own folder, and each folder should contain a converter script.
  • The generator.py script will be moved to galaxy/converter.py. A new script under cwl/converter.py will also be added.
  • All common functionality, such as CTD parsing, validation against a schema, logging, etc., should be housed in a separate folder, e.g., common.
  • The documentation will clearly define which parameters are required across all supported formats and which ones are specific for one format. This should also be reflected on the code.
  • A main script, convert.py, should be created on the topmost level. This script will then decide which specific script (whether galaxy/converter.py or cwl/converter.py) should be invoked.

In the end, invoking the converter should look similar to:

$ python convert.py [FORMAT] [ADDITIONAL_ARGUMENTS ...]

That is, the first positional parameter will be the output format (either galaxy or cwl), while the rest of the arguments should not be modified in order to keep current functionality (i.e., generating Galaxy ToolConfig files). In other words, this is how a single CTD file is converted into a ToolConfig file:

$ python generator.py -i tool.ctd -o tool.xml

After the refactoring, this will change to:

$ python convert.py galaxy -i tool.ctd -o tool.xml

And in the case of CWL, it would look like:

$ python convert.py cwl -i tool.ctd -o tool.cwl

Activity

  1. mr-c commented on Feb 18, 2018

    @mr-c
    Collaborator

    Hey @chahuistle et all., thank you for all your work on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions