Code Duplication    Length = 15-17 lines in 4 locations

src/egon/data/datasets/DSM_cts_ind.py 4 locations

@@ 132-148 (lines=17) @@
129
    e_min = Column(ARRAY(Float))
130
131
132
class EgonDemandregioSitesIndElectricityDsmTimeseries(Base):
133
    target = config.datasets()["DSM_CTS_industry"]["targets"][
134
        "demandregio_ind_sites_dsm"
135
    ]
136
137
    __tablename__ = target["table"]
138
    __table_args__ = {"schema": target["schema"]}
139
140
    industrial_sites_id = Column(Integer, primary_key=True, index=True)
141
    scn_name = Column(String, primary_key=True, index=True)
142
    bus = Column(Integer)
143
    application = Column(String)
144
    p_set = Column(ARRAY(Float))
145
    p_max = Column(ARRAY(Float))
146
    p_min = Column(ARRAY(Float))
147
    e_max = Column(ARRAY(Float))
148
    e_min = Column(ARRAY(Float))
149
150
151
class EgonSitesIndLoadCurvesIndividualDsmTimeseries(Base):
@@ 151-166 (lines=16) @@
148
    e_min = Column(ARRAY(Float))
149
150
151
class EgonSitesIndLoadCurvesIndividualDsmTimeseries(Base):
152
    target = config.datasets()["DSM_CTS_industry"]["targets"][
153
        "ind_sites_loadcurves_individual"
154
    ]
155
156
    __tablename__ = target["table"]
157
    __table_args__ = {"schema": target["schema"]}
158
159
    site_id = Column(Integer, primary_key=True, index=True)
160
    scn_name = Column(String, primary_key=True, index=True)
161
    bus = Column(Integer)
162
    p_set = Column(ARRAY(Float))
163
    p_max = Column(ARRAY(Float))
164
    p_min = Column(ARRAY(Float))
165
    e_max = Column(ARRAY(Float))
166
    e_min = Column(ARRAY(Float))
167
168
169
# Code
@@ 114-129 (lines=16) @@
111
    e_min = Column(ARRAY(Float))
112
113
114
class EgonOsmIndLoadCurvesIndividualDsmTimeseries(Base):
115
    target = config.datasets()["DSM_CTS_industry"]["targets"][
116
        "ind_osm_loadcurves_individual_dsm"
117
    ]
118
119
    __tablename__ = target["table"]
120
    __table_args__ = {"schema": target["schema"]}
121
122
    osm_id = Column(Integer, primary_key=True, index=True)
123
    scn_name = Column(String, primary_key=True, index=True)
124
    bus = Column(Integer)
125
    p_set = Column(ARRAY(Float))
126
    p_max = Column(ARRAY(Float))
127
    p_min = Column(ARRAY(Float))
128
    e_max = Column(ARRAY(Float))
129
    e_min = Column(ARRAY(Float))
130
131
132
class EgonDemandregioSitesIndElectricityDsmTimeseries(Base):
@@ 97-111 (lines=15) @@
94
95
96
# Datasets
97
class EgonEtragoElectricityCtsDsmTimeseries(Base):
98
    target = config.datasets()["DSM_CTS_industry"]["targets"][
99
        "cts_loadcurves_dsm"
100
    ]
101
102
    __tablename__ = target["table"]
103
    __table_args__ = {"schema": target["schema"]}
104
105
    bus = Column(Integer, primary_key=True, index=True)
106
    scn_name = Column(String, primary_key=True, index=True)
107
    p_set = Column(ARRAY(Float))
108
    p_max = Column(ARRAY(Float))
109
    p_min = Column(ARRAY(Float))
110
    e_max = Column(ARRAY(Float))
111
    e_min = Column(ARRAY(Float))
112
113
114
class EgonOsmIndLoadCurvesIndividualDsmTimeseries(Base):