Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions acclimatise/converter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ def choose_converter(cls, typ) -> Type["WrapperGenerator"]:

raise Exception("Unknown format type")

@classmethod
@abstractmethod
def validate(cls, wrapper: str, cmd: Command = None, explore=True):
"""
Validates that the tool wrapper is correct, and that it correctly represents the command.
:param wrapper: The generated tool definition
:param cmd: The command to validate against
:param explore: If true, we're in explore mode, and we should ignore subcommands
"""

@classmethod
@abstractmethod
def format(cls) -> str:
Expand Down
38 changes: 38 additions & 0 deletions acclimatise/converter/galaxy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import inspect
import tempfile
from io import IOBase, StringIO, TextIOBase
from os import PathLike
from pathlib import Path
from typing import Generator, List

from dataclasses import dataclass

from acclimatise import cli_types
from acclimatise.converter import NamedArgument, WrapperGenerator
from acclimatise.model import CliArgument, Command, Flag, Positional
from acclimatise.yaml import yaml


@dataclass
class GalaxyGenerator(WrapperGenerator):
case = "snake"

@classmethod
def format(cls) -> str:
return "galaxy"

@property
def suffix(self) -> str:
return ".xml"

def save_to_string(self, cmd: Command) -> str:
# Todo
pass

def save_to_file(self, cmd: Command, path: Path) -> None:
# Todo
pass

@classmethod
def validate(cls, wrapper: str, cmd: Command = None, explore=True):
pass