Code Duplication    Length = 12-13 lines in 2 locations

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):

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

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