rate_values default time

未关闭
#243 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
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 分钟
30 天内合并 PR
3

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

HydrologicEngineeringCenter/cwms-python 的其他 Issue

查看 HydrologicEngineeringCenter/cwms-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。