Code Duplication    Length = 29-30 lines in 2 locations

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

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