CDCgov / CDCgov/PyRenew

Refactor code repetition in the time module

Open
#606 0 comments 0 reactions 1 assignee View on GitHub

@cdc-mitzimorris is already working on this.

Since Dec 1, 2025.

Dominant language
Python
Stars
29
Forks
9
Avg merge
9d 9h
Merged PRs (30d)
8

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.