Code Duplication    Length = 12-13 lines in 2 locations

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

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

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

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