rate_values default time

Đang mở
#243 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu trong ratings.py tại rate_values và so sánh hành vi được ghi trong tài liệu khi times bị bỏ qua với hành vi khi cung cấp thời gian tường minh. Tái hiện trường hợp đánh giá mới nhất bằng cả hai lệnh gọi, sau đó kiểm tra xem phần triển khai và tài liệu có thống nhất về thời gian được dùng để chọn các đánh giá hay không.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Python
Star
16
Fork
11
Merge trung bình
7 giờ 35 phút
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của HydrologicEngineeringCenter/cwms-python

Tất cả issue của HydrologicEngineeringCenter/cwms-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.