Exemple #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)
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
Exemple #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