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 摘要。