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

refactor!: enrichment classes #42

Merged
merged 73 commits into from
Mar 7, 2024
Merged

Conversation

leo-desbureaux-tellae
Copy link
Contributor

@leo-desbureaux-tellae leo-desbureaux-tellae commented Mar 5, 2024

  • New enrichment classes (Close Improve code #17)
    • Refactor code into SyntheticPopulationEnrichment classes, dedicated to the population enrichment process
    • Refactor code into EnrichmentSource classes, dedicated to the source data used for enrichment
    • These classes are used in composition: SyntheticPopulationEnrichment instances contain an instance of an EnrichmentSource class
    • Cleaner methods and fewer calls
  • Analysis instance creation is exposed in the new classes (Close Modality specification in analysis functions #36)
  • Use and store a random number generator in enrichment classes (Close Use random state in enrichment classes #30)
  • Improved documentation
  • Added a new test suite for new modules, removed some tests

These changes introduce questions about a potential need for even more refactoring, see #41

raise NotImplementedError instead
make analysis_table private and added property
changed modalities.py to marginal.py
changed distributions namespace for source(s) or enrichment source(s)
move QuantitativeAttributes to bhepop2.sources.base
@leo-desbureaux-tellae leo-desbureaux-tellae mentioned this pull request Mar 7, 2024
8 tasks
@leo-desbureaux-tellae leo-desbureaux-tellae merged commit cb76b19 into main Mar 7, 2024
1 check passed
@leo-desbureaux-tellae leo-desbureaux-tellae deleted the refactor/parent_class branch March 7, 2024 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modality specification in analysis functions Use random state in enrichment classes Improve code
1 participant