Code Duplication    Length = 12-13 lines in 2 locations

src/egon/data/datasets/power_plants/__init__.py 1 location

@@ 59-71 (lines=13) @@
56
Base = declarative_base()
57
58
59
class EgonPowerPlants(Base):
60
    __tablename__ = "egon_power_plants"
61
    __table_args__ = {"schema": "supply"}
62
    id = Column(BigInteger, Sequence("pp_seq"), primary_key=True)
63
    sources = Column(JSONB)
64
    source_id = Column(JSONB)
65
    carrier = Column(String)
66
    el_capacity = Column(Float)
67
    bus_id = Column(Integer)
68
    voltage_level = Column(Integer)
69
    weather_cell_id = Column(Integer)
70
    scenario = Column(String)
71
    geom = Column(Geometry("POINT", 4326), index=True)
72
73
74
def create_tables():

src/egon/data/datasets/storages/__init__.py 1 location

@@ 49-60 (lines=12) @@
46
Base = declarative_base()
47
48
49
class EgonStorages(Base):
50
    __tablename__ = "egon_storages"
51
    __table_args__ = {"schema": "supply"}
52
    id = Column(BigInteger, Sequence("storage_seq"), primary_key=True)
53
    sources = Column(JSONB)
54
    source_id = Column(JSONB)
55
    carrier = Column(String)
56
    el_capacity = Column(Float)
57
    bus_id = Column(Integer)
58
    voltage_level = Column(Integer)
59
    scenario = Column(String)
60
    geom = Column(Geometry("POINT", 4326))
61
62
63
class Storages(Dataset):