Investigate PI Web API summary timestamp alignment

Offen
#528 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
22/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
python
Bereich
api, data

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Python
Sterne
56
Forks
21
Ø Merge
1 T. 1 Std.
Gemergte PRs (30 T.)
19

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus equinor/tagreader-python

Alle Issues in equinor/tagreader-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.