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
def create_tables():

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

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