store_timeseries fails if version datetime has unspecified timezone

オープン
#186 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
api, data

調査の方向性

cwms/timeseries/timeseries.py の 250-253 行付近にある timeseries_df_to_json 関数から始めます。タイムゾーンのない version datetime を使って store_timeseries を再現し、その後、完成した動作でそれを拒否すべきか UTC とみなすべきかを判断して文書化します。シリアライズされた version に想定されるタイムゾーンマーカーがないために store が暗黙的に失敗しなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

If a timeseries version is not a datetime object that has a specified timezone, the store will fail because there is no "Z" at the end.

May want to consider putting a check in the timeseries_df_to_json function that checks if the datetime object has a timezone specified and throw an error or assume UTC.

https://github.com/HydrologicEngineeringCenter/cwms-python/blob/509ae4050d592631942c03e564dd85e8bd22810b/cwms/timeseries/timeseries.py#L250C1-L253C32

主要言語
Python
スター
16
フォーク
11
平均マージ
7時間 35分
マージ済み PR(30日)
3

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

HydrologicEngineeringCenter/cwms-python のほかの issue

HydrologicEngineeringCenter/cwms-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。