Code Duplication    Length = 12-13 lines in 2 locations

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

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

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

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