Exemplo n.º 1
0
def test_with_file():    
    filename = "_yaml_spec_sample.txt"
    p = docstring_to_file(yaml_doc, filename)
    d1, d2, d3 = load_spec_from_yaml(p)
    assert d1 == header_dict
    assert d2 == unit_dict
    assert d3 == reader_dict
    
    d1, d2 = load_spec(p)
    assert d1 == header_dict
    assert d2 == unit_dict
Exemplo n.º 2
0
def dump_var_list_explained():
    """Writes table of variables (label, desciption, unit) to src/output/varnames.md"""    
    tab_table = get_table()
    docstring_to_file(tab_table, "varnames.md", "output")
Exemplo n.º 3
0
def init_main_yaml():    
    return docstring_to_file(yaml_main, MAIN_YAML_FILENAME)
Exemplo n.º 4
0
def init_raw_csv_file():
    doc = "\n".join([ip,trans,investment])
    return docstring_to_file(doc, RAW_FILE)    
Exemplo n.º 5
0
def init_additional_yaml():    
    return docstring_to_file(yaml_main, ADDITIONAL_YAML_FILENAME)
# -----------------------------------------------------------------------------
Exemplo n.º 6
0
def init_config_yaml():    
    return docstring_to_file(yaml_config, CONFIG_YAML_FILENAME)