openego / data_processing

(geo)data processing, database setup, data validation
GNU Affero General Public License v3.0
7 stars 5 forks source link

Add custom config file keyword argument #18

Open gplssm opened 7 years ago

gplssm commented 7 years ago

Move oemof.db.connection() to close#13. Then ego.io and add filename keyword argument to it.

Ludee commented 7 years ago

Is this issue closed? @gplssm If not I move it to v0.3

nesnoj commented 7 years ago

Related to #13 (v0.3)

gplssm commented 7 years ago

ego.io now () has it's own config file that is created when egoio.tools.db.connection() is called and no config file exists. Data processing now uses an OEDB connection via egoio.

Tested implementation by following query script

from egoio.tools.db import connection
from egoio.db_tables.scenario import EgoSlpParameter
from sqlalchemy.orm import sessionmaker
import pandas as pd

Session = sessionmaker(bind=connection(section='oep'))
session=Session()

data = session.query(EgoSlpParameter)

print(pd.read_sql_query(data.statement, session.bind))
gplssm commented 7 years ago

We won't resolve this entirely within v0.3.0 due to necessary changes in ego.powerflow. So, I postponed it.

nesnoj commented 7 years ago

related to #123