Open
Conversation
Added a module for representing distributions that can be used throughout gempyor. Started with `DistributionABC` as and abstract base for all distributions. Implemented `FixedDistribution` and `NormalDistribution` using that ABC. Finally, exposed a field discriminated type to easily create distributions from config.
Added a representation for uniform distributions to `gempyor.distributions`.
Added a representation of a poisson distribution to `gempyor.distributions`
Added a representation for binomial distribution to `gempyor.distributions`.
Added a lognormal distribution to `gempyor.distributions`.
Added a truncated normal distribution to `gempyor.distributions`.
Added a representation for gamma distributions to `gempyor.distributions`
Added a representation for Weibull distributions to `gempyor.distributions`. Also, fixed a return type hint error.
Unit tests and validation for the `NormalDistribution` class in `gempyor_pkg/tests/distributions/`
Unit tests and validation for the `FixedDistribution` class in `gmepyor_pkg/tests/distributions/`. Also removal of an unused parameter in the `FixedDistribution` `.sample()` method.
Unit tests and validation for the `UniformDistribution` class in `gempyor_pkg/tests/distributions/`. Also linting from a previous commit I forgot to add.
Unit tests and validation for the `LognormalDistribution` class in `gempyor_pkg/tests/distributions/` + a fix for an issue that I created in `2c5fce5`
Add tests for the `TruncatedNormalDistribution` class from `gempyor.distributions`. Also, formatting fixes and bound fixes.
Unit tests and validation for `PoissonDIstribution` class in `gempyor.distributions`. Also, formatting and bounds fixes.
Unit tests and validation for the `BinomialDistribution` class in `gempyor.distributions`. Also a bounds fix in `distributions.py`.
Unit tests and validation for the `GammaDistribution` class of `gempyor.distributions`. Also, a bounds fix in `distributions.py`.
Unit tests and validation for the `WeibullDistribution` class of `gempyor.distributions`. Also, bounds and formatting fixes.
Co-authored-by: Timothy Willard <9395586+TimothyWillard@users.noreply.github.com>
Co-authored-by: Timothy Willard <9395586+TimothyWillard@users.noreply.github.com>
Add `BetaDistribution`, de-duplicate `rng` code, remove unnecessary `rng` tests.
…dependency. `test_spatial_groups()` relies on an inference config file used in the "slow" groups.
These tests are duplicates, which gets addressed in #570 , but for now we need to add both to the slow group to allow workflow success.
Remove old "slow" group, add timing feature to workflow for testing purposes (to be removed later).
Remove temporary time marker to ensure the test timing is appropriate.
Take 10 samples rather than 1 to reduce the risk of an identical series of samples being drawn (causing a test failure when arrays are compared).
use pydantic capabilities for default_factory Co-authored-by: Timothy Willard <9395586+TimothyWillard@users.noreply.github.com>
…ion_from_confuse_config()` This code is presently broken.
…ion_from_confuse_config()` This code is presently broken.
…ttps://github.com/HopkinsIDD/flepiMoP into incorporate-gem.distributions-into-gem.parameters
Add new `__call__` syntactic sugar to `Distributions`.
Co-authored-by: Timothy Willard <9395586+TimothyWillard@users.noreply.github.com>
Co-authored-by: Timothy Willard <9395586+TimothyWillard@users.noreply.github.com>
…ttps://github.com/HopkinsIDD/flepiMoP into incorporate-gem.distributions-into-gem.parameters
Co-authored-by: Timothy Willard <9395586+TimothyWillard@users.noreply.github.com>
…ttps://github.com/HopkinsIDD/flepiMoP into incorporate-gem.distributions-into-gem.parameters
Co-authored-by: Carl A. B. Pearson <pearsonca@users.noreply.github.com>
Co-authored-by: Carl A. B. Pearson <pearsonca@users.noreply.github.com>
…-into-gem.parameters Incorporate `gempyor.distributions` into `gempyor.parameters`
This reverts commit b24e9a3.
Pulled the script that generates info on the flepiMoP install out of `bin/flepimop-install` into its own `bin/flepimop-install-info` for standalone use. Also updated installation script to also install the tests for the R packages.
Created a custom `flepimop-install` action and incorporated it into the gempyor, flepicommon, and inference CI workflows. This custom action takes care of: * Installing apt packages required by some of the R dependencies, * Installing miniconda, * Either pulling a conda venv from cache or installing flepiMoP with the standard install scripts with a user specified python/R version, and * Displaying install information for debugging purposes.
Added a step to the gempyor CI workflow to run doctests as well as fixed the current state of doctests throughout the gempyor package. Mostly quick fixes, more detailed and higher quality examples will be required in follow ups.
Add spacing to list item entries so IDEs are a bit less confused when viewing the file. Addresses #485.
* Removed the trigger whenever there is a push to the `dev` branch for the GitHub actions, in practice results in actions being ran twice on PR from `dev` into `main`. * Split the slow gempyor tests out into their own job that depends on the fast tests job and only runs with python 3.11. Running the slow tests with all python versions is not needed.
Extracted out the custom R pkg installer into its own `bin/flepimop-install-r-pkgs` script. This is helpful, because: 1. It helps to modularize `bin/flepimop-install` a little bit more for maintainability, and 2. Assists with development of R packages by making them easier to reinstall for testing. R does not have an `--editable` install like python does so edits to `flepimop-inference-*` require reinstall.
Follow up to #585 to account for the arguments of `gempyor.seir.write_seir` taking the out dataframe instead of the states, leaving it to the user to call `gempyor.seir.states2DF`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR is a running accumulation of changes to merge from
devintomainthat will be merged at a to be decided release cycle.News
Breaking Changes
New Features
confusehandler topydanticobjects, Creategempyor.distributionsmodule #575.Bug Fixes
UnboundLocalErrorerror that could arise ifwrite_csvandwrite_parquetwere both set to false but the SEIR model was simulated viagempyor.seir.onerun_SEIR, FixUnboundLocalErrorerror inonerun_SEIR#585 & Adjustment forgempyor.seir.write_seirargs #589.Notes
gempyortests CI was slit into "slow" and "not slow" unit tests to provide faster feedback on PRs, Splitgempyor CIworkflow into "not slow" and "slow" test groups #580.flepiMoPvia conda, doctests forgempyor, correctedenvironment.ymlformatting`, and split "slow" and "not slow" unit tests into separate jobs GitHub actions CI improvements #581.