Limit the level of class inherintance to two.

Offen
#616 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
15/100
Issue-Typ
Refactoring
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet

Rechercherichtung

The inheritance chain runs through BaseSelector and BaseRecursiveSelector down to RecursiveFeatureAddition, with the shared base classes in the _base_transformer section. Start by mapping every class that sits more than two levels below BaseEstimator, TransformerMixin and GetFeatureNamesOutMixin. Done means a design agreed in the thread that brings each class within two levels, with the existing tests still passing.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Is your feature request related to a problem? Please describe.
Currently, some feature-engine classes have more than two levels of inheritance, e.g. classes that are derived from the BaseRecursiveSelector() class.

BaseEstimator(), TransformerMixin(), and GetFeatureNamesOutMixin() --> BaseSelector() --> BaseRecursiveSelector() --> RecursiveFeatureAddition()

This many levels of abstraction significantly increase the difficulty for people to contribute.

Describe the solution you'd like
Let's limit the codebase to two levels of inheritance. There can be multiple base transformers in the _base_transformer section than each other section - e.g., discretisation, encoding, and timeseries - are limited to one base transformer.

Describe alternatives you've considered
feature-engine currently applies an alternative, i.e., more than 2 levels of inheritance, and we see the challenges that it is causing.

Vorherrschende Sprache
Python
Sterne
2.3k
Forks
391
Ø Merge
11 Std. 34 Min.
Gemergte PRs (30 T.)
11

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus feature-engine/feature_engine

Alle Issues in feature-engine/feature_engine

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.