openego / ego.powerflow

A power flow app to solve AC and DC powerflow problems using PyPSA
GNU Affero General Public License v3.0
5 stars 3 forks source link

Replace __name__ by __tablename__ #18

Closed simnh closed 7 years ago

simnh commented 7 years ago

this is linked to https://github.com/openego/ego.io/issues/12

simnh commented 7 years ago

Ok, I just checked in https://github.com/openego/ego.io/blob/master/egoio/db_tables/calc_ego_mv_powerflow.py , there the Storage is indeed named Storage and not `StorageUnit``as defined in the corresponding hv - file.

So maybe my fix was not right, and we should just rename the class inside https://github.com/openego/ego.io/blob/master/egoio/db_tables/calc_ego_hv_powerflow.py from StorageUnit to Storage?

simnh commented 7 years ago

Can you check, and and fix this, or give a comment on this @mariusves ?

mariusves commented 7 years ago

Closed due to already available fix (see f0a494b0ef070d3585326e7410035595d5381c80)

nesnoj commented 7 years ago

@mariusves, @simnh : Plz delete branch as well if no longer needed

But: I think the issue rather concerns ego.io than ego.powerflow. In your current version of StorageUnit you use the table 'storage' and manually changed the class name. @MGlauer's script to automatically generate table defs (see issue 8 in ego.io) in ego.io will probably destroy your modification since it uses the table name as class name. I don't really see why you can't use 'Storage'?