-
Notifications
You must be signed in to change notification settings - Fork 64
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
Abstract error checking #687
Merged
njtierney
merged 11 commits into
greta-dev:master
from
njtierney:abstract-error-checkers-529
Aug 16, 2024
Merged
Abstract error checking #687
njtierney
merged 11 commits into
greta-dev:master
from
njtierney:abstract-error-checkers-529
Aug 16, 2024
Conversation
This file contains 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
* Moving more checking functions into checkers.R * Using cli_abort instead of stop * update snapshots
* minor text fixing/tweaks
* check_2d_multivariate * check_2d * check_if_greta_mcmc_list * check_if_model_info * check_positive_scalar * check_scalar * check_finite * check_x_gte_y * check_numeric_length_1
* check_not_greta_array() * check_param_greta_array() * check_final_dim() * check_rows_equal() * check_is_column_array() * check_stats_dim_matches_x_dim() * check_x_matches_ncol() * check_transpose() * check_2_by_1() * check_fields_installed() * check_diagrammer_installed() * check_ncols_match() * check_greta_data_frame() * check_greta_array_type() * check_unfixed_discrete_distributions() * check_not_data_greta_arrays() * check_greta_arrays_associated_with_model() * check_nodes_all_variable() * check_initial_values_correct_dim() * check_initial_values_match_chains() * check_initials_are_numeric() * check_initials_are_named() * check_weights_dim() * check_num_distributions() * check_not_discrete_continuous() * check_not_multivariate_univariate() * check_distribution_support() * check_compatible_dimensions() * check_both_2d()
change logic in cholesky variable to clarify error catching intent
* Add `dim` argument to `check_square` so you can either pass x, and then calculate dim, or pass a dimension * check_dim_length() * check_is_distribution_node() * check_values_dim() * check_dot_nodes_scalar() * inform_if_one_set_of_initials() * check_subgraphs() * check_has_representation() * check_is_greta_array()
This is a pretty decently sized refactor of checking functions. There is still more work to be done with making these simpler and easier to understand. At the moment I'm happy to merge this in and revisit this alter at another release. The goals for that revisit/spring clean should be:
I will put the above notes into a separate issue so I can remember these things! |
* check_for_free_state_error() * check_initial_values_correct_class() * check_missing_infinite_values() * check_timeout() * check_sampling_implemented() * check_truncation_implemented() * add internal `are_intials()` function
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.
Resolves #529