-
Notifications
You must be signed in to change notification settings - Fork 2
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
[REVIEW] Custom assertions #40
Labels
good first issue
Good for newcomers
help wanted
Extra attention is needed
review
Some code is due for review
Projects
Comments
|
There should be some structural changes to the custom assertions:
|
|
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
good first issue
Good for newcomers
help wanted
Extra attention is needed
review
Some code is due for review
Summary
The custom assertions should be as simple as possible, follow the single responsibility principle, have descriptive names. The error messages should be informative and the corresponding variables should follow a naming convention.
Checklist
Miscellaneous assertions
is_positive_number
: Tests if a number is scalar and positive; not contained in assertthat-packageis_nonnegative_number
: Tests if a number is scalar and non-negative; not contained in assertthat-packageDiscribution assertions
is_dimension
: Tests if a number is a natural number larger than 1Marshall--Olkin assertions
is_32bit_complient_dimension
: Tests if a dimension for a Marshall--Olkin distribution is 32-bit compliant, i.e. if the number of distribution parameters will not exceed the 32-bit limit.is_mo_parameter
: Tests if a parameter vector of shock rates is a valid Marshall--Olkin parameter vector, i.e. if it has the correct length, all elements are non-negative numbers, and if the resulting marginal rates are positive.is_ex_mo_parameter
: Tests if a parameter vector of shock rates is a valid Marshall--Olkin parameter vector, i.e. if it has the correct length, all elements are non-negative numbers, and if the resulting marginal rate is positive.is_lfm_cpp_param
: Tests if a parameter list is a valid parameterisation of a Levy-frailty Marshall--Olkin model, i.e. if the rate, drift, and killing parameters are non-negative numbers and sum up to a positive number and if jump distribution is correctly parametrised.Jump distribution assertions
is_rjump_name
: Tests if the given name is a valid method to simulate jumps; jump distributions are currently limited to exponential and fixed jump distributions.is_rjump_param
: Tests if the given parameter list is valid for the given method name by performing a test run (warning: this might change the RNG state).The text was updated successfully, but these errors were encountered: