.. link: .. description: .. tags: .. date: 2013/08/16 00:00:00 .. title: Documentor .. slug: analyzer .. class:: alert alert-info pull-top .. contents:: *Module:* `analyzer.py `_ API =========================================================== No description. *Imports:* ------------ - `_ast `_ - `ast `_ - `docdump `_ - `os `_ - `shutil `_ *Global Attributes:* ---------------------- - `_map_type [at ln:25] `_ ---- *Global Functions:* --------------------- *Function:* `get_python_files(path) [at ln:38] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def get_python_files(path): | Return a dict structure containing the info inside a folder. ---- *Class:* `Analyzer(object) `_ --------------------------------------------------------------------------------- .. code:: python class Analyzer(object): | Explore recursively the project folder and scan the info of each file. *Attributes* ~~~~~~~~~~~~~~ - `dump [at ln:57] `_ - `listings_folder [at ln:56] `_ - `output [at ln:55] `_ - `project [at ln:54] `_ - `structure [at ln:61] `_ *Function:* `__init__(project, output, projectname) [at ln:53] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def __init__(project, output, projectname): No description. ---- *Function:* `_parse_assign(symbol) [at ln:154] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def _parse_assign(symbol): | Parse assign and extract the info from the node. ---- *Function:* `_parse_class(symbol) [at ln:165] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def _parse_class(symbol): | Parse class and extract the info from the node. ---- *Function:* `_parse_function(symbol) [at ln:194] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def _parse_function(symbol): | Parse function and extract the info from the node. ---- *Function:* `_parse_imports(module) [at ln:248] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def _parse_imports(module): | Parse imports and extract the info from the node. ---- *Function:* `expand_attribute(attribute) [at ln:134] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def expand_attribute(attribute): | Expand the node to obtain the expanded representation. ---- *Function:* `obtain_symbols(source, filename=str) [at ln:100] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def obtain_symbols(source, filename=str): | Parse a module code to obtain: Classes, Functions and Assigns. ---- *Function:* `parse_file(filepath, relpath) [at ln:79] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def parse_file(filepath, relpath): | Parse the file and create a representation with all the info about: | - Imports | - Classes | - Functions | - Attributes | - Decorators | - etc ---- *Function:* `parse_folder(folderpath, relpath) [at ln:66] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def parse_folder(folderpath, relpath): | Parse the folders and files contained inside folderpath. ---- *Function:* `scan() [at ln:59] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def scan(): | Initialize the scan process.