def __init__(
            self,
            source_directory: str,
            results_path: str = None,
            shared: typing.Union[dict, SharedCache] = None
    ):
        """
        :param source_directory:
        :param results_path:
            [optional] The path where the results files for the project will
            be saved. If omitted, the default global results path will be
            used.
        :param shared:
            [optional] The shared data cache used to store project data when
            run
        """

        source_directory = environ.paths.clean(source_directory)
        if os.path.isfile(source_directory):
            source_directory = os.path.dirname(source_directory)
        self.source_directory = source_directory

        self.steps = []  # type: typing.List[steps.ProjectStep]
        self._results_path = results_path  # type: str
        self._current_step = None  # type: steps.ProjectStep
        self.last_modified = None
        self.remote_source_directory = None  # type: str

        def as_shared_cache(source):
            if source and not hasattr(source, 'fetch'):
                return SharedCache().put(**source)
            return source or SharedCache()

        self.stop_condition = StopCondition(False, False)  # type: StopCondition
        self.shared = as_shared_cache(shared)
        self.settings = SharedCache()
        self.refresh()
def __init__ ( self , source_directory : str , results_path : str = None , shared : typing . Union [ dict , SharedCache ] = None ) : source_directory = environ . paths . clean ( source_directory ) if os . path . isfile ( source_directory ) : source_directory = os . path . dirname ( source_directory ) self . source_directory = source_directory self . steps = [ ] self . _results_path = results_path self . _current_step = None self . last_modified = None self . remote_source_directory = None def as_shared_cache ( source ) : if source and not hasattr ( source , 'fetch' ) : return SharedCache ( ) . put ( ** source ) return source or SharedCache ( ) self . stop_condition = StopCondition ( False , False ) self . shared = as_shared_cache ( shared ) self . settings = SharedCache ( ) self . refresh ( )
:param source_directory:
        :param results_path:
            [optional] The path where the results files for the project will
            be saved. If omitted, the default global results path will be
            used.
        :param shared:
            [optional] The shared data cache used to store project data when
            run