Investigate PI Web API summary timestamp alignment

Aperta
#528 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
22/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
api, data

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
56
Fork
21
Merge medio
1g 1h
PR unite (30g)
19

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di equinor/tagreader-python

Tutte le issue di equinor/tagreader-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.