Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Refactor duplicated OrderedDict/DataFrame return logic in clearsky models

Aperta
#2,682 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
50/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
data

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
1.7k
Fork
1.2k
Merge medio
3g 18h
PR unite (30g)
13

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pvlib/pvlib-python

Tutte le issue di pvlib/pvlib-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.