Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming The Infections Seeding Initialization #261

Merged
merged 10 commits into from
Jul 12, 2024

Conversation

AFg6K7h4fhy2
Copy link
Collaborator

This PR clarifies naming for $I_{v:0}$, i.e. the seeded infections, by framing the variable for infections seeding in terms of "initialization" versus "seeding", which, in most instances, is perceived by users as the value for pseudo-random number generation reproducibility.

@AFg6K7h4fhy2 AFg6K7h4fhy2 linked an issue Jul 11, 2024 that may be closed by this pull request
@AFg6K7h4fhy2 AFg6K7h4fhy2 self-assigned this Jul 11, 2024
@AFg6K7h4fhy2 AFg6K7h4fhy2 added the clean up Good code that could be better label Jul 11, 2024
@AFg6K7h4fhy2 AFg6K7h4fhy2 added this to the N Sprint milestone Jul 11, 2024
Copy link

codecov bot commented Jul 11, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 2 lines in your changes missing coverage. Please review.

Project coverage is 92.69%. Comparing base (6f3a5a8) to head (877e00a).

Files Patch % Lines
model/src/pyrenew/latent/infections.py 75.00% 1 Missing ⚠️
model/src/pyrenew/latent/infectionswithfeedback.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #261   +/-   ##
=======================================
  Coverage   92.69%   92.69%           
=======================================
  Files          40       40           
  Lines         904      904           
=======================================
  Hits          838      838           
  Misses         66       66           
Flag Coverage Δ
unittests 92.69% <88.88%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AFg6K7h4fhy2 AFg6K7h4fhy2 marked this pull request as ready for review July 11, 2024 13:58
Copy link
Collaborator

@damonbayer damonbayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @AFg6K7h4fhy2! I think we should perform more renaming throughout. For instance, InfectionSeedingProcess should be InfectionInitializationProcess. In general, you should search the whole repo for seed and make sure it is only used in the context of RNG seeds. @dylanhmorris do you agree?

@AFg6K7h4fhy2
Copy link
Collaborator Author

AFg6K7h4fhy2 commented Jul 11, 2024

Thanks @AFg6K7h4fhy2! I think we should perform more renaming throughout. For instance, InfectionSeedingProcess should be InfectionInitializationProcess. In general, you should search the whole repo for seed and make sure it is only used in the context of RNG seeds. @dylanhmorris do you agree?

I agree. I held off because I didn't want to decide unilaterally. Beyond InfectionSeedingProcess, I am thinking any other place where we have "Infection" and "Seeding" not in reference to pseudo-random number usage are place worth using "Initialization" or "Initial".

@dylanhmorris
Copy link
Collaborator

Thanks @AFg6K7h4fhy2! I think we should perform more renaming throughout. For instance, InfectionSeedingProcess should be InfectionInitializationProcess. In general, you should search the whole repo for seed and make sure it is only used in the context of RNG seeds. @dylanhmorris do you agree?

I do. @AFg6K7h4fhy2, I think you can assume initialization is the agreed-upon substitute for seeding throughout.

@AFg6K7h4fhy2
Copy link
Collaborator Author

I do. @AFg6K7h4fhy2, I think you can assume initialization is the agreed-upon substitute for seeding throughout.

Sounds good, I will edit this after I get through #241

@AFg6K7h4fhy2
Copy link
Collaborator Author

AFg6K7h4fhy2 commented Jul 12, 2024

@damonbayer Mind taking a look here while I resolve the conflicts?

I changed InfectionSeedingMethod, InfectionSeedingProcess, and post_seed_infections to InfectionInitializationMethod, InfectionInitializationProcess, and post_initialized_infections, respectively.

@damonbayer
Copy link
Collaborator

damonbayer commented Jul 12, 2024

Thanks @AFg6K7h4fhy2! I prefer post_initialization_infections over post_initialized_infections.

The documentation, for example docs/source/msei_reference/latent.rst, also needs to be changed.

@AFg6K7h4fhy2
Copy link
Collaborator Author

Thanks @AFg6K7h4fhy2! I prefer post_initialization_infections over post_initialized_infections.

The documentation, for example docs/source/msei_reference/latent.rst, also needs to be changed.

Will do on post_initialized_infectionspost_initialization_infections. Good catch on the ./docs/ changes. I think I was one level off when doing Command-Shift-F.

@damonbayer
Copy link
Collaborator

I think we also want to rename the InfectionInitializationMethods (e.g., SeedInfectionsExponentialGrowth -> InitializeInfectionsExponentialGrowth).

@AFg6K7h4fhy2
Copy link
Collaborator Author

I think we also want to rename the InfectionInitializationMethods (e.g., SeedInfectionsExponentialGrowth -> InitializeInfectionsExponentialGrowth).

I was thinking that since they were subclasses the connection with seeding infections shouldn't be completely removed, but I see the point. Will change.

@damonbayer damonbayer self-requested a review July 12, 2024 22:01
Copy link
Collaborator

@damonbayer damonbayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks @AFg6K7h4fhy2!

@damonbayer damonbayer merged commit 7bd2250 into main Jul 12, 2024
7 of 8 checks passed
@damonbayer damonbayer deleted the 206-UPX3-naming-infection-seeding-process branch July 12, 2024 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clean up Good code that could be better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should we call the infection seeding process "seeding"?
3 participants