예제 #1
0
def test_build_pandas_dataframe():
    tmpdir = tempfile.mkdtemp()

    from thermopyl.utils import build_pandas_dataframe, pandas_dataframe

    # Generate dataframe
    filenames = [get_fn("je8006138.xml")]
    [data, compounds] = build_pandas_dataframe(filenames)

    # Write as HDF5
    data.to_hdf(os.path.join(tmpdir, 'data.h5'), 'data')
    compounds.to_hdf(os.path.join(tmpdir, 'compound_name_to_formula.h5'), 'data')

    # Read dataframe
    df = pandas_dataframe(thermoml_path=tmpdir)

    # Clean up tmpdir
    import shutil
    shutil.rmtree(tmpdir)
예제 #2
0
def test_thermopyl():
    filename = get_fn("je8006138.xml")
    
    parser = thermoml_lib.Parser(filename)
    current_data = parser.parse()
    name_to_formula = parser.compound_name_to_formula
예제 #3
0
def test_thermopyl():
    filename = get_fn("je8006138.xml")

    parser = thermoml_lib.Parser(filename)
    current_data = parser.parse()
    name_to_formula = parser.compound_name_to_formula