[OpenSTEF 4.0] Improved timezone handling/verifications

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

I maintainer di solito rispondono entro 2 giorni

@charanteja25 ci sta già lavorando.

Dal 15/10/2026.

  • #1146 di @charanteja25 — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
data, testing

Direzione di ricerca

Start with the BenchmarkTarget fields benchmark_start, benchmark_stop and train_start in the openstef-beam benchmark code, and trace where naive datetimes get converted into timezone-aware ones. The issue proposes a design choice (enforce timezones everywhere versus infer them from data) that a maintainer should settle before any edit. Done would be a clear error or warning for a missing timezone plus a functional test covering mixed timezones in backtesting.

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

Descrizione

localization OpenSTEF 4.0 to refine

Is your feature request related to a problem? Please describe.
While working on a benchmark script in openstef-beam, I found that not specifying a timezone within the datetime in any of the benchmark_start, benchmark_stop or train_start fields of BenchmarkTarget caused timezone errors further downstream that were difficult to trace back. To me it was not clear this was needed, and feels a bit unintuitive providing a timezone for a configuration like when the benchmark stops. Thinking a bit further ahead, I can foresee quite some timezone related issues, which can be quite frustrating to the user. Lets think a bit about how we can make OpenSTEF 4.0 timezone robust!

Describe the solution you'd like
There are different ways to go about this, but I would like to start by proposing the following:

  • We could enforce the usage of timezones everywhere, and for any place a timezone is not provided, a warning is logged or an error is thrown at front, making it clear for the user where a timezone might be missing
  • Lets add some (functional?) tests that verify basic OpenSTEF operations (e.g. backtesting) work as expected with complex timezone situations, like when different timezones are provided for measurements and features.

Describe alternatives you've considered
We could also allow timezone unaware datetimes for certain fields like benchmark_start, and then infer the timezone based on the data. I think this will fail though when the user uses multiple different timezones within a single dataset.

Lingua principale
Python
Stelle
169
Fork
59
Merge medio
4g 15h
PR unite (30g)
8

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 OpenSTEF/openstef

Tutte le issue di OpenSTEF/openstef

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.