rate_values default time

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

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

評価

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

調査の方向性

ratings.py の rate_values から始め、times を省略した場合のドキュメント上の動作と、明示的な時刻を指定した場合の動作を比較します。両方の呼び出しを使って最新の評価のケースを再現し、そのうえで、評価の選択に使用される時刻について実装とドキュメントが一致していることを確認します。

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

説明

As shown below, the documentation in ratings.py states that if times are not specified, the current time is used. However, in my experience, the latest rating curve is not being used when I leave the time out. I had to specify a time to get it to use the latest rating.

Not a big deal to add the time (probably best to always do so anyway). I just wanted to make note of this.

Parameters
----------
rating_id: string
    The rating-id (rating specification) of the the rating set to use
office_id: string
    The owning office of the rating set.
units: string
    The unit of each independent parameter separated by commas concatenated with a semicolon followed by the
    desired dependent_parameter unit (e.g., 'ft;ac-ft' or 'unit,%,ft;cfs')
values: list[list[float]]
    The independent parameter values to rate (one list for each independent parameter, in parameter order).
    For multiple independent parameters, each list must be of the same length.
times: list[integer] Optional Default = None
    A list of times (in milliseconds since 1970-01-01T00:00:00Z) for the independent parameter values.
    If None, the current time is used.
    If specified but the constains fewer times than the number of independent parameter values, the last
    time is used for all independent parameter values from that position to the end of the list.
rating_time: integer Optional Default = None
    A specific date/time to use as the "current time" of the rating. No ratings with a create date later than
    this will be used. Useful for performing historical ratings. If not specified or NULL, the current time is used.
round: boolean Optional Default = False
    Whether to round the rated values according to the rounding spec contained in the rating specification in the database
主要言語
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 を短くまとめたダイジェスト。