Investigate PI Web API summary timestamp alignment

未關閉
#528 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
22/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
python
領域
api, data

研究方向

Start from the investigate-pi-summary-timestamps branch, where the demo and offline tests already exist, and read the summary timestamp handling in PIHandlerWeb alongside tagreader's MIN/MAX/AVG/RNG/STD/VAR/INT/RAW/SNAPSHOT output. Reproduce the timestamp comparison demo against a live PI server across timeTypes and intervals; the deployed run currently fails at datasource discovery with HTTP 401, so access must be resolved first. Done means documented public timestamp semantics, regression tests for extrema and partial data, and verified behavior on a live server before implementation changes.

由索引模型根據 Issue 內容生成。

描述

Problem

PIHandlerWeb currently shifts MAX summary timestamps back one sampling interval when the first returned timestamp is later than the requested start. This assumes the server returns interval-end timestamps. PI summary timestamp calculation can instead return the actual time of an extremum for both MIN and MAX, so a whole-interval shift may mislabel the data; MIN can likewise remain off the interval grid.

Investigation

  • Run the timestamp comparison demo on a PI server using numeric tags, multiple time windows, and multiple intervals. Compare the raw responses for the default timeType, EarliestTime, and MostRecentTime with tagreader output for MIN, MAX, AVG, RNG, STD, VAR, INT, RAW, and SNAPSHOT.
  • Confirm which timeType values the deployed PI Web API accepts and whether it supports a midpoint directly. Empty responses and pagination are inconclusive, not passing results.
  • Decide and document the intended public timestamp semantics. Evaluate requesting EarliestTime for all summaries instead of shifting MAX locally, including cache and backward compatibility implications. Preserve actual event timestamps when required by the chosen contract.
  • Add regression tests for extrema within intervals, extrema on boundaries, missing or partial data, and all affected summary types. Validate behavior on a live server before changing the implementation.

Evidence and status

A demo and offline tests are available on investigate-pi-summary-timestamps. Offline tests pass, but the live attempt returned HTTP 401 during datasource discovery, so deployed behavior is not yet verified.

References: PI Web API summary parameters and PI summary timestamp semantics.

主要語言
Python
星號
56
分支
21
平均合併
1 天 1 小時
30 天內合併 PR
19

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

equinor/tagreader-python 的其他 Issue

查看 equinor/tagreader-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。