def make_scheduler(self, **kwargs):
        """
        Build a return a :class:`PyFlowScheduler` to run the flow.

        Args:
            kwargs: if empty we use the user configuration file.
                    if `filepath` in kwargs we init the scheduler from filepath.
                    else pass **kwargs to :class:`PyFlowScheduler` __init__ method.
        """
        from .launcher import PyFlowScheduler
        if not kwargs:
            # User config if kwargs is empty
            sched = PyFlowScheduler.from_user_config()
        else:
            # Use from_file if filepath if present, else call __init__
            filepath = kwargs.pop("filepath", None)
            if filepath is not None:
                assert not kwargs
                sched = PyFlowScheduler.from_file(filepath)
            else:
                sched = PyFlowScheduler(**kwargs)

        sched.add_flow(self)
        return sched
def make_scheduler ( self , ** kwargs ) : from . launcher import PyFlowScheduler if not kwargs : sched = PyFlowScheduler . from_user_config ( ) else : filepath = kwargs . pop ( "filepath" , None ) if filepath is not None : assert not kwargs sched = PyFlowScheduler . from_file ( filepath ) else : sched = PyFlowScheduler ( ** kwargs ) sched . add_flow ( self ) return sched
Build a return a :class:`PyFlowScheduler` to run the flow.

        Args:
            kwargs: if empty we use the user configuration file.
                    if `filepath` in kwargs we init the scheduler from filepath.
                    else pass **kwargs to :class:`PyFlowScheduler` __init__ method.