Code Duplication    Length = 15-17 lines in 4 locations

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

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