Investigate PI Web API summary timestamp alignment

Ouverte
#528 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
22/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
python
Domaine
api, data

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Python
Étoiles
56
Forks
21
Merge moyen
1 j 1 h
PR mergées (30 j)
19

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de equinor/tagreader-python

Toutes les issues de equinor/tagreader-python

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.