sugarsdk/modval.py
def _get_runner_meta(self, uri):
        """
        Get doc, schema and examples of a runner.

        :param uri:
        :return:
        """
        mod_type = self._cli_args.type
        mod_path = os.path.join(self._runner_module_loader.root_path, os.path.sep.join(uri.split(".")))

        doc_path = os.path.join(mod_path, "doc.yaml")
        xpl_path = os.path.join(mod_path, "examples.yaml")
        scm_path = os.path.join(mod_path, "scheme.yaml")

        for metafile in [doc_path, xpl_path, scm_path]:
            if not os.path.exists(metafile):
                self.errors.append(("{} module at '{}' is missing '{}' file!", (mod_type.title(), uri, metafile)))

        meta = {}
        for metakey, metafile in [("doc", doc_path), ("example", xpl_path), ("scheme", scm_path)]:
            with sugar.utils.files.fopen(metafile) as mth:
                try:
                    meta[metakey] = yaml.load(mth.read())
                except Exception as exc:
                    meta[metakey] = None
                    self.warnings.append(("'{}' in {} module seems broken ({})",
                                          (os.path.basename(metafile), mod_type, exc)))
        return meta

        Get doc, schema and examples of a runner.

        :param uri:
        :return:
        
Get doc, schema and examples of a runner.
Get doc schema and examples of a runner .
def _get_runner_meta(self, uri):
        mod_type = self._cli_args.type
        mod_path = os.path.join(self._runner_module_loader.root_path, os.path.sep.join(uri.split(".")))
        doc_path = os.path.join(mod_path, "doc.yaml")
        xpl_path = os.path.join(mod_path, "examples.yaml")
        scm_path = os.path.join(mod_path, "scheme.yaml")
        for metafile in [doc_path, xpl_path, scm_path]:
            if not os.path.exists(metafile):
                self.errors.append(("{} module at '{}' is missing '{}' file!", (mod_type.title(), uri, metafile)))
        meta = {}
        for metakey, metafile in [("doc", doc_path), ("example", xpl_path), ("scheme", scm_path)]:
            with sugar.utils.files.fopen(metafile) as mth:
                try:
                    meta[metakey] = yaml.load(mth.read())
                except Exception as exc:
                    meta[metakey] = None
                    self.warnings.append(("'{}' in {} module seems broken ({})",
                                          (os.path.basename(metafile), mod_type, exc)))
        return meta
def _get_runner_meta ( self , uri ) : mod_type = self . _cli_args . type mod_path = os . path . join ( self . _runner_module_loader . root_path , os . path . sep . join ( uri . split ( "." ) ) ) doc_path = os . path . join ( mod_path , "doc.yaml" ) xpl_path = os . path . join ( mod_path , "examples.yaml" ) scm_path = os . path . join ( mod_path , "scheme.yaml" ) for metafile in [ doc_path , xpl_path , scm_path ] : if not os . path . exists ( metafile ) : self . errors . append ( ( "{} module at '{}' is missing '{}' file!" , ( mod_type . title ( ) , uri , metafile ) ) ) meta = { } for metakey , metafile in [ ( "doc" , doc_path ) , ( "example" , xpl_path ) , ( "scheme" , scm_path ) ] : with sugar . utils . files . fopen ( metafile ) as mth : try : meta [ metakey ] = yaml . load ( mth . read ( ) ) except Exception as exc : meta [ metakey ] = None self . warnings . append ( ( "'{}' in {} module seems broken ({})" , ( os . path . basename ( metafile ) , mod_type , exc ) ) ) return meta
Get doc, schema and examples of a runner.
Get doc schema and examples of a runner .
"""
        Get doc, schema and examples of a runner.

        :param uri:
        :return:
        """
None
self
uri
None