from scriptcwl import WorkflowGenerator as WFGenerator

from .utils import CWL_PATH


class WorkflowGenerator(WFGenerator):
    def __init__(self, working_dir=None):
        WFGenerator.__init__(self, steps_dir=CWL_PATH, working_dir=working_dir)

        self.load(step_file='https://raw.githubusercontent.com/nlppln/'
                            'edlib-align/master/align.cwl')
        self.load(step_file='https://raw.githubusercontent.com/nlppln/'
                            'pattern-docker/master/pattern.cwl')

    def save(self, fname, validate=True, wd=True, inline=False, relative=False,
             pack=False, encoding='utf-8'):
        """Save workflow to file

        For nlppln, the default is to use a working directory (and save steps
        using the ``wd`` option).
        """
        super(WorkflowGenerator, self).save(fname,
                                            validate=validate,
                                            wd=wd,
                                            inline=inline,
                                            relative=relative,
                                            pack=pack,
                                            encoding=encoding)

@@ -554,19 +554,20 @@
 rue, wd=
-Tru
+Fals
 e, inlin
@@ -584,20 +584,19 @@
 elative=
-Fals
+Tru
 e,%0A     
@@ -710,80 +710,42 @@
  to 
-use a working directory (and save steps%0A        using the %60%60wd%60%60 option)
+save workflows with relative paths
 .%0A  

Make default saving option relative