detect_clearsky and prilliman fail on DST days, kimber fails on tz-naive data (since #2924)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
pvlib/tools.py の _get_sample_intervals から始めてください。これは detect_clearsky と prilliman が共有しています。また、pvlib/soiling.py の kimber 関数も確認してください。ここではインデックスを tz_convert(None) で変換しています。issue にある 2 つの再現手順を実行し、エラーを確認してください。完了の条件は、夏時間の切り替えをまたぐタイムゾーン付きインデックスとタイムゾーンなしインデックスの両方で、両方の再現がエラーなく実行されることです。また、test_clearsky.py、test_soiling.py、test_temperature.py、test_tools.py の既存テストがすべて通ることです。
索引モデルが issue の本文から書いたものです。
説明
On main (0f6631a, pandas 3.1.0), both of these worked before #2924 and now raise:
import pandas as pd
import pvlib
loc = pvlib.location.Location(49.28, -123.12, tz='America/Vancouver')
times = pd.date_range('2026-03-07', '2026-03-10', freq='1min',
tz=loc.tz, inclusive='left')
ghi = loc.get_clearsky(times)['ghi']
pvlib.clearsky.detect_clearsky(ghi, ghi)
# NotImplementedError: algorithm does not yet support unequal time intervals...
rain = pd.Series(0.0, index=pd.date_range('2026-01-01', periods=720, freq='h'))
pvlib.soiling.kimber(rain)
# TypeError: Cannot convert tz-naive timestamps, use tz_localize to localize
In _get_sample_intervals, tz_localize(None) turns the index into local clock time, so the 1-minute data gets a 61-minute step where the clocks change. temperature.prilliman uses the same helper, so it fails the same way.
kimber uses tz_convert(None), which raises on a tz-naive index:
What I'd suggest: subtract the timestamps directly. That gives elapsed time for both naive and tz-aware indexes.
# tools._get_sample_intervals
deltas = (times[1:] - times[:-1]) / pd.Timedelta('60s')
# soiling.kimber
timestep_interval = rainfall.index[1] - rainfall.index[0]
day_fraction = timestep_interval / pd.Timedelta(hours=24)
Plus two tests: detect_clearsky on a DST day should match the same data in UTC, and kimber with a tz-naive index should match the existing expected output.
I tried this locally:
- both new tests fail on main and pass with the change;
test_clearsky.py,test_soiling.py,test_temperature.pyandtest_tools.pypass on pandas 3.1.0 and 2.3.3;- on the commit before #2924 (d6075f6), both examples run fine.
I didn't find an existing issue for this. Happy to open a PR if this sounds right.
AI disclosure: I used Claude Code (an AI coding agent) to find and trace this, run the examples and tests on my machine, and draft this note.
@echedey-ls @kandersolar
- 主要言語
- Python
- スター
- 1.7k
- フォーク
- 1.2k
- 平均マージ
- 3日 6時間
- マージ済み PR(30日)
- 12
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pvlib/pvlib-python のほかの issue
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
pvlib/pvlib-python#2921 · コメント 2 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Possibility of beam irradiance from behind plane of array再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pvlib/pvlib-python#2903 · コメント 5 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
use offset parameter instead of calculating bday in cdrom対応中かも @chenyi6758-source が 16 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
pvlib/pvlib-python#2902 ·
メンテナーはふだん 1 日以内に返信
-
Add an example or documentation on using 'bhi' from ERA5再び着手できるかも @anshurajbisoyi98-ctrl が 31 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 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 が 268 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンapi easy
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
pvlib/pvlib-python#2653 · コメント 6 件 ·
メンテナーはふだん 1 日以内に返信
pvlib/pvlib-python の issue をすべて見る
似ている issue
-
Backend issue lists report in-patch warnings and out-of-patch errors as not publishable対応中かも @RaphaelFakhri が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mozilla/code-review#3794 ·
メンテナーはふだん 1 日以内に返信
-
[oblt-aw][autodoc] Update docs that still describe the security registry as empty対応中かも @github-actions が今日担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
[Bug] adb backup script reports "Done" & exits 0 when the backup fails対応中かも @bhattmanthan が今日担当しました。 オープンrequest-issue-assignment
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
agent-ui bug p2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
correction metadata
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
acl-org/acl-anthology#10768 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信