Refactor duplicated OrderedDict/DataFrame return logic in clearsky models
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Python
- 星标
- 1.7k
- 派生
- 1.2k
- 平均合并
- 3 天 18 小时
- 30 天内合并 PR
- 13
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pvlib/pvlib-python 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
pvlib/pvlib-python#2903 · 5 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
use offset parameter instead of calculating bday in cdrom可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 1/5 1 小时以内 新手友好度 92/100
pvlib/pvlib-python#2902 ·
维护者通常 1 天内回复
-
Add an example or documentation on using 'bhi' from ERA5可能重新可做 @anshurajbisoyi98-ctrl 于 14 天前认领,目前没有进行中的 PR。 未关闭
难度 2/5 1-3 小时 新手友好度 66/100
pvlib/pvlib-python#2880 · 2 条评论 ·
维护者通常 1 天内回复
-
Use "long-wave" rather than "infra-red" to refer to thermal radiation.可能重新可做 @Rahi-padwal 于 252 天前认领,目前没有进行中的 PR。 未关闭api easy
难度 2/5 1-3 小时 新手友好度 62/100
pvlib/pvlib-python#2653 · 6 条评论 ·
维护者通常 1 天内回复
-
question
难度 1/5 1-3 小时 新手友好度 72/100
pvlib/pvlib-python#2637 · 10 条评论 ·
维护者通常 1 天内回复
查看 pvlib/pvlib-python 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
SwiftKickMobile/skai#84 ·
-
难度 1/5 1 小时以内 新手友好度 82/100
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
jxxghp/MoviePilot#7070 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
flop-labs/technocore-chat#997 ·
维护者通常 1 天内回复
-
tunneld on Windows: Wi-Fi devices are not discovered because uvicorn runs on a ProactorEventLoop未关闭
难度 2/5 1-3 小时 新手友好度 76/100
doronz88/pymobiledevice3#2051 ·
维护者通常 1 天内回复