Example #1
0
def main():

    # Get list of languages 
    languages = set_run.languages()

    # Get list of graph objects and graph object info 
    graph_objs_info = set_run.graph_objs_info()
    graph_objs = set_run.graph_objs()

    # Make instance of MakeMeta object and get graph object meta!
    meta_make = MakeMeta()
    meta = get_meta(graph_objs, meta_make)

    for language in languages:

        # Make/Check output tree structures
        tree_graph_objs, tree_published = get_trees(language)

        # Make deep copy of language-agnostic meta and graph_objs_info
        meta_language = deepcopy(meta)
        graph_objs_info_language = deepcopy(graph_objs_info)
        
        # Retrieve examples from Examples class
        meta_language = retrieve_examples(meta_language, language)
        
        # Get language tables and format meta respectively to each language
        table = language_table.table[language]
        tables = make_tables(table)
        meta_language = format_meta_vocab(meta_language, tables)

        # Write meta and keymeta
        write_meta(tree_graph_objs, meta_language)
        write_keymeta(tree_graph_objs, meta_language)
        
        # Write NAME_TO_KEY, KEY_TO_NAME, PARENT_TREE
        NAME_TO_KEY = write_NAME_TO_KEY(tree_graph_objs, meta_language)
        KEY_TO_NAME = write_KEY_TO_NAME(tree_graph_objs, meta_language)
        PARENT_TREE = write_PARENT_TREE(tree_graph_objs, meta_language)

        # Write OBJ_MAP (python only)
        if language == 'python':
            OBJ_MAP = write_OBJ_MAP(tree_graph_objs,
                                    meta_language,
                                    graph_objs_info_language, tables)

        # Make\Write meta+toc config file (for plot.ly)
        write_config(tree_published, language, 
                     graph_objs_info_language, 
                     meta_language,
                     KEY_TO_NAME, PARENT_TREE) 
Example #2
0
def main():

    # Get list of languages
    languages = set_run.languages()

    # Get list of graph objects and graph object info
    graph_objs_info = set_run.graph_objs_info()
    graph_objs = set_run.graph_objs()

    # Make instance of MakeMeta object and get graph object meta!
    meta_make = MakeMeta()
    meta = get_meta(graph_objs, meta_make)

    for language in languages:

        # Make/Check output tree structures
        tree_graph_objs, tree_published = get_trees(language)

        # Make deep copy of language-agnostic meta and graph_objs_info
        meta_language = deepcopy(meta)
        graph_objs_info_language = deepcopy(graph_objs_info)

        # Retrieve examples from Examples class
        meta_language = retrieve_examples(meta_language, language)

        # Get language tables and format meta respectively to each language
        table = language_table.table[language]
        tables = make_tables(table)
        meta_language = format_meta_vocab(meta_language, tables)

        # Write meta and keymeta
        write_meta(tree_graph_objs, meta_language)
        write_keymeta(tree_graph_objs, meta_language)

        # Write NAME_TO_KEY, KEY_TO_NAME, PARENT_TREE
        NAME_TO_KEY = write_NAME_TO_KEY(tree_graph_objs, meta_language)
        KEY_TO_NAME = write_KEY_TO_NAME(tree_graph_objs, meta_language)
        PARENT_TREE = write_PARENT_TREE(tree_graph_objs, meta_language)

        # Write OBJ_MAP (python only)
        if language == 'python':
            OBJ_MAP = write_OBJ_MAP(tree_graph_objs, meta_language,
                                    graph_objs_info_language, tables)

        # Make\Write meta+toc config file (for plot.ly)
        write_config(tree_published, language, graph_objs_info_language,
                     meta_language, KEY_TO_NAME, PARENT_TREE)
        WEB = 'https://plot.ly/julia/',
        OL = 'array',
        OL2D = '2d array',
        UL = 'dictionary',
        OLlike = 'array',      # same as OL
        ULlike = 'dictionary', # same as UL
        TRUE = 'TRUE',
        FALSE = 'FALSE',
        NAN = 'NaN'
    )
)
        

# Add graph object *names* to table
languages = set_run.languages()
graph_objs_info = set_run.graph_objs_info()
graph_objs = set_run.graph_objs()

for language in languages:
    for graph_obj in graph_objs:
        if language == 'python':  # N.B Special object name in Python API!
            name = (
                graph_obj.title()
                         .replace('_','')
                         .replace('axis','Axis')
                         .replace('bins','Bins')
                         .replace('2D','2d')
                         .replace('3D','3d')
                         .replace('bar','Bar')
                         .replace('contour','Contour')
            )
Example #4
0
        FALSE='false',
        NAN='NaN'),
    julia=dict(
        LANG='Julia',
        WEB='https://plot.ly/julia/',
        OL='array',
        OL2D='2d array',
        UL='dictionary',
        OLlike='array',  # same as OL
        ULlike='dictionary',  # same as UL
        TRUE='TRUE',
        FALSE='FALSE',
        NAN='NaN'))

# Add graph object *names* to table
languages = set_run.languages()
graph_objs_info = set_run.graph_objs_info()
graph_objs = set_run.graph_objs()

for language in languages:
    for graph_obj in graph_objs:
        if language == 'python':  # N.B Special object name in Python API!
            name = (graph_obj.title().replace('_', '').replace(
                'axis',
                'Axis').replace('bins', 'Bins').replace('2D', '2d').replace(
                    '3D', '3d').replace('bar',
                                        'Bar').replace('contour', 'Contour'))
            table[language][graph_obj] = name
        else:
            table[language][graph_obj] = graph_obj