Code Duplication    Length = 12-13 lines in 2 locations

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

@@ 144-156 (lines=13) @@
141
    geom = Column(Geometry("POINT", 4326), index=True, nullable=True)
142
143
144
class EgonPowerPlants(Base):
145
    __tablename__ = "egon_power_plants"
146
    __table_args__ = {"schema": "supply"}
147
    id = Column(BigInteger, Sequence("pp_seq"), primary_key=True)
148
    sources = Column(JSONB)
149
    source_id = Column(JSONB)
150
    carrier = Column(String)
151
    el_capacity = Column(Float)
152
    bus_id = Column(Integer)
153
    voltage_level = Column(Integer)
154
    weather_cell_id = Column(Integer)
155
    scenario = Column(String)
156
    geom = Column(Geometry("POINT", 4326), index=True)
157
158
159
class PowerPlants(Dataset):

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

@@ 30-41 (lines=12) @@
27
Base = declarative_base()
28
29
30
class EgonStorages(Base):
31
    __tablename__ = "egon_storages"
32
    __table_args__ = {"schema": "supply"}
33
    id = Column(BigInteger, Sequence("storage_seq"), primary_key=True)
34
    sources = Column(JSONB)
35
    source_id = Column(JSONB)
36
    carrier = Column(String)
37
    el_capacity = Column(Float)
38
    bus_id = Column(Integer)
39
    voltage_level = Column(Integer)
40
    scenario = Column(String)
41
    geom = Column(Geometry("POINT", 4326))
42
43
44
class Storages(Dataset):