Code Duplication    Length = 29-30 lines in 2 locations

src/egon/data/datasets/power_plants/mastr.py 2 locations

@@ 118-147 (lines=30) @@
115
    geom = Column(Geometry("POINT", 4326), index=True, nullable=True)
116
117
118
class EgonPowerPlantsWind(Base):
119
    __tablename__ = "egon_power_plants_wind"
120
    __table_args__ = {"schema": "supply"}
121
122
    id = Column(Integer, Sequence("pp_wind_seq"), primary_key=True)
123
    bus_id = Column(Integer, nullable=True)  # Grid district id
124
    gens_id = Column(String, nullable=True)  # EinheitMastrNummer
125
126
    status = Column(String, nullable=True)  # EinheitBetriebsstatus
127
    commissioning_date = Column(DateTime, nullable=True)  # Inbetriebnahmedatum
128
    postcode = Column(String(5), nullable=True)  # Postleitzahl
129
    city = Column(String(50), nullable=True)  # Ort
130
    municipality = Column(String, nullable=True)  # Gemeinde
131
    federal_state = Column(String(31), nullable=True)  # Bundesland
132
    zip_and_municipality = Column(String, nullable=True)
133
134
    site_type = Column(String(17), nullable=True)  # Lage
135
    manufacturer_name = Column(String(100), nullable=True)  # Hersteller
136
    type_name = Column(String(100), nullable=True)  # Typenbezeichnung
137
    hub_height = Column(Float, nullable=True)  # Nabenhoehe
138
    rotor_diameter = Column(Float, nullable=True)  # Rotordurchmesser
139
140
    capacity = Column(Float, nullable=True)  # Nettonennleistung
141
    feedin_type = Column(String(47), nullable=True)  # Einspeisungsart
142
    voltage_level = Column(Integer, nullable=True)
143
    voltage_level_inferred = Column(Boolean, nullable=True)
144
145
    geometry_geocoded = Column(Boolean)
146
147
    geom = Column(Geometry("POINT", 4326), index=True, nullable=True)
148
149
150
class EgonPowerPlantsBiomass(Base):
@@ 150-178 (lines=29) @@
147
    geom = Column(Geometry("POINT", 4326), index=True, nullable=True)
148
149
150
class EgonPowerPlantsBiomass(Base):
151
    __tablename__ = "egon_power_plants_biomass"
152
    __table_args__ = {"schema": "supply"}
153
154
    id = Column(Integer, Sequence("pp_biomass_seq"), primary_key=True)
155
    bus_id = Column(Integer, nullable=True)  # Grid district id
156
    gens_id = Column(String, nullable=True)  # EinheitMastrNummer
157
158
    status = Column(String, nullable=True)  # EinheitBetriebsstatus
159
    commissioning_date = Column(DateTime, nullable=True)  # Inbetriebnahmedatum
160
    postcode = Column(String(5), nullable=True)  # Postleitzahl
161
    city = Column(String(50), nullable=True)  # Ort
162
    municipality = Column(String, nullable=True)  # Gemeinde
163
    federal_state = Column(String(31), nullable=True)  # Bundesland
164
    zip_and_municipality = Column(String, nullable=True)
165
166
    technology = Column(String(45), nullable=True)  # Technologie
167
    fuel_name = Column(String(52), nullable=True)  # Hauptbrennstoff
168
    fuel_type = Column(String(19), nullable=True)  # Biomasseart
169
170
    capacity = Column(Float, nullable=True)  # Nettonennleistung
171
    th_capacity = Column(Float, nullable=True)  # ThermischeNutzleistung
172
    feedin_type = Column(String(47), nullable=True)  # Einspeisungsart
173
    voltage_level = Column(Integer, nullable=True)
174
    voltage_level_inferred = Column(Boolean, nullable=True)
175
176
    geometry_geocoded = Column(Boolean)
177
178
    geom = Column(Geometry("POINT", 4326), index=True, nullable=True)
179
180
181
class EgonPowerPlantsHydro(Base):