Code Duplication    Length = 29-30 lines in 2 locations

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

@@ 91-120 (lines=30) @@
88
    geom = Column(Geometry("POINT", 4326), index=True, nullable=True)
89
90
91
class EgonPowerPlantsWind(Base):
92
    __tablename__ = "egon_power_plants_wind"
93
    __table_args__ = {"schema": "supply"}
94
95
    id = Column(Integer, Sequence("pp_wind_seq"), primary_key=True)
96
    bus_id = Column(Integer, nullable=True)  # Grid district id
97
    gens_id = Column(String, nullable=True)  # EinheitMastrNummer
98
99
    status = Column(String, nullable=True)  # EinheitBetriebsstatus
100
    commissioning_date = Column(DateTime, nullable=True)  # Inbetriebnahmedatum
101
    postcode = Column(String(5), nullable=True)  # Postleitzahl
102
    city = Column(String(50), nullable=True)  # Ort
103
    municipality = Column(String, nullable=True)  # Gemeinde
104
    federal_state = Column(String(31), nullable=True)  # Bundesland
105
    zip_and_municipality = Column(String, nullable=True)
106
107
    site_type = Column(String(17), nullable=True)  # Lage
108
    manufacturer_name = Column(String(100), nullable=True)  # Hersteller
109
    type_name = Column(String(100), nullable=True)  # Typenbezeichnung
110
    hub_height = Column(Float, nullable=True)  # Nabenhoehe
111
    rotor_diameter = Column(Float, nullable=True)  # Rotordurchmesser
112
113
    capacity = Column(Float, nullable=True)  # Nettonennleistung
114
    feedin_type = Column(String(47), nullable=True)  # Einspeisungsart
115
    voltage_level = Column(Integer, nullable=True)
116
    voltage_level_inferred = Column(Boolean, nullable=True)
117
118
    geometry_geocoded = Column(Boolean)
119
    geom = Column(Geometry("POINT", 4326), index=True, nullable=True)
120
121
122
class EgonPowerPlantsBiomass(Base):
123
    __tablename__ = "egon_power_plants_biomass"
@@ 122-150 (lines=29) @@
119
    geom = Column(Geometry("POINT", 4326), index=True, nullable=True)
120
121
122
class EgonPowerPlantsBiomass(Base):
123
    __tablename__ = "egon_power_plants_biomass"
124
    __table_args__ = {"schema": "supply"}
125
126
    id = Column(Integer, Sequence("pp_biomass_seq"), primary_key=True)
127
    bus_id = Column(Integer, nullable=True)  # Grid district id
128
    gens_id = Column(String, nullable=True)  # EinheitMastrNummer
129
130
    status = Column(String, nullable=True)  # EinheitBetriebsstatus
131
    commissioning_date = Column(DateTime, nullable=True)  # Inbetriebnahmedatum
132
    postcode = Column(String(5), nullable=True)  # Postleitzahl
133
    city = Column(String(50), nullable=True)  # Ort
134
    municipality = Column(String, nullable=True)  # Gemeinde
135
    federal_state = Column(String(31), nullable=True)  # Bundesland
136
    zip_and_municipality = Column(String, nullable=True)
137
138
    technology = Column(String(45), nullable=True)  # Technologie
139
    main_fuel = Column(String(52), nullable=True)  # Hauptbrennstoff
140
    fuel_type = Column(String(19), nullable=True)  # Biomasseart
141
142
    capacity = Column(Float, nullable=True)  # Nettonennleistung
143
    th_capacity = Column(Float, nullable=True)  # ThermischeNutzleistung
144
    feedin_type = Column(String(47), nullable=True)  # Einspeisungsart
145
    voltage_level = Column(Integer, nullable=True)
146
    voltage_level_inferred = Column(Boolean, nullable=True)
147
148
    geometry_geocoded = Column(Boolean)
149
    geom = Column(Geometry("POINT", 4326), index=True, nullable=True)
150
151
152
class EgonPowerPlantsHydro(Base):
153
    __tablename__ = "egon_power_plants_hydro"