(self, patterns, dirs, ignore=None)
return True
Load objects from the filesystem into the ``paths`` dictionary.

        If the setting ``autoapi_patterns`` was not specified, look for a
        ``docfx.json`` file by default.  A ``docfx.json`` should be treated as
        the canonical source before the default patterns.  Fallback to default
        pattern matches if no ``docfx.json`` files are found.
Load objects from the filesystem into the ``paths`` dictionary.
Load objects from the filesystem into the paths dictionary .
def load(self, patterns, dirs, ignore=None):
        """Load objects from the filesystem into the ``paths`` dictionary.

        If the setting ``autoapi_patterns`` was not specified, look for a
        ``docfx.json`` file by default.  A ``docfx.json`` should be treated as
        the canonical source before the default patterns.  Fallback to default
        pattern matches if no ``docfx.json`` files are found.
        """
        LOGGER.info(bold("[AutoAPI] ") + darkgreen("Loading Data"))
        all_files = set()
        if not self.app.config.autoapi_file_patterns:
            all_files = set(
                self.find_files(patterns=["docfx.json"], dirs=dirs, ignore=ignore)
            )
        if not all_files:
            all_files = set(
                self.find_files(patterns=patterns, dirs=dirs, ignore=ignore)
            )

        if all_files:
            command = ["docfx", "metadata", "--raw", "--force"]
            command.extend(all_files)
            proc = subprocess.Popen(
                " ".join(command),
                stdout=subprocess.PIPE,
                stderr=subprocess.PIPE,
                shell=True,
                env=dict(
                    (key, os.environ[key])
                    for key in [
                        "PATH",
                        "HOME",
                        "SYSTEMROOT",
                        "USERPROFILE",
                        "WINDIR",
                    ]
                    if key in os.environ
                ),
            )
            _, error_output = proc.communicate()
            if error_output:
                LOGGER.warning(error_output, type="autoapi", subtype="not_readable")
        # We now have yaml files
        for xdoc_path in self.find_files(
            patterns=["*.yml"], dirs=[self.DOCFX_OUTPUT_PATH], ignore=ignore
        ):
            data = self.read_file(path=xdoc_path)
            if data:
                self.paths[xdoc_path] = data

        return True
def load ( self , patterns , dirs , ignore = None ) : LOGGER . info ( bold ( "[AutoAPI] " ) + darkgreen ( "Loading Data" ) ) all_files = set ( ) if not self . app . config . autoapi_file_patterns : all_files = set ( self . find_files ( patterns = [ "docfx.json" ] , dirs = dirs , ignore = ignore ) ) if not all_files : all_files = set ( self . find_files ( patterns = patterns , dirs = dirs , ignore = ignore ) ) if all_files : command = [ "docfx" , "metadata" , "--raw" , "--force" ] command . extend ( all_files ) proc = subprocess . Popen ( " " . join ( command ) , stdout = subprocess . PIPE , stderr = subprocess . PIPE , shell = True , env = dict ( ( key , os . environ [ key ] ) for key in [ "PATH" , "HOME" , "SYSTEMROOT" , "USERPROFILE" , "WINDIR" , ] if key in os . environ ) , ) _ , error_output = proc . communicate ( ) if error_output : LOGGER . warning ( error_output , type = "autoapi" , subtype = "not_readable" ) # We now have yaml files for xdoc_path in self . find_files ( patterns = [ "*.yml" ] , dirs = [ self . DOCFX_OUTPUT_PATH ] , ignore = ignore ) : data = self . read_file ( path = xdoc_path ) if data : self . paths [ xdoc_path ] = data return True