Refactor code repetition in the time module

Aperta
#606 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@cdc-mitzimorris ci sta già lavorando.

Dal 1/12/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

This looks like it works!

I think there is some unnecessary repetition e.g. in get_observation_indices where I think it would be cleaner to have an int pass into a function rather than if freq == "mmwr_weekly" then that int is 5 etc.

However, maybe lets make that a small refactor issue.

Originally posted by @SamuelBrand1 in https://github.com/CDCgov/PyRenew/pull/600#pullrequestreview-3310477343

I think for sustainability it would be nice to go back through this and cut out repetition code.

Lingua principale
Python
Stelle
30
Fork
11
Merge medio
5g 4h
PR unite (30g)
9

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 CDCgov/PyRenew

Tutte le issue di CDCgov/PyRenew

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.