Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Refactor duplicated OrderedDict/DataFrame return logic in clearsky models

Aberta
#2,682 5 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
50/100
Tipo de issue
Refatoração
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
python
Domínio
data

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Python
Estrelas
1.7k
Forks
1.2k
Merge médio
3d 18h
PRs com merge (30d)
13

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de pvlib/pvlib-python

Todas as issues de pvlib/pvlib-python

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.