Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Refactor duplicated OrderedDict/DataFrame return logic in clearsky models

Offen
#2,682 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
50/100
Issue-Typ
Refactoring
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
data

Rechercherichtung

Start in clearsky.py at the TODO inside bird(), then read ineichen and simplified_solis to compare the repeated OrderedDict-or-DataFrame return code. Design a small decorator for that pattern and apply it to the three functions. Done means the boilerplate is gone, the return types for both input kinds are unchanged, and the existing clearsky tests still pass. The design is open, so agree on the decorator's shape with maintainers first.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

While reading clearsky.py, I noticed this TODO comment in bird():

TODO: be DRY, use decorator to wrap methods that need to return either
OrderedDict or DataFrame instead of repeating this boilerplate code

A few clearsky model functions (ineichen, simplified_solis, bird) repeat the same pattern of returning either an OrderedDict or a DataFrame depending on the input type.

It might be cleaner to introduce a small decorator to handle this logic and remove the duplicated boilerplate.

Happy to work on this if it sounds good.

Vorherrschende Sprache
Python
Sterne
1.7k
Forks
1.2k
Ø Merge
3 T. 18 Std.
Gemergte PRs (30 T.)
13

Entwicklungsumgebung

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 pvlib/pvlib-python

Alle Issues in pvlib/pvlib-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

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