Skip to content

Files

Latest commit

956488c · Feb 12, 2025

History

History
324 lines (180 loc) · 7.76 KB

NEWS.md

File metadata and controls

324 lines (180 loc) · 7.76 KB

News for version 0.7.1

dbc::handle_args_inplace

Further robustification of how missing x is reported.

News for version 0.7.0

dbc

Marked is_data.frame/table (snail.case) for future removal. New functions *_is_data_frame_with_required_names.

News for version 0.6.0

dbc

is_lt / is_lte / is_gt / is_gte functions now ignore NA values. Formerly NA values caused failures even in functions such as dbc::assert_is_integer_gtzero_vector which should allow them.

News for version 0.5.6

dbc::handle_args_inplace

Fixed dbc::handle_args_inplace handling of case where x_nm was missing. It raised an incomprehensible error, ironically when trying to emit the error message concerning the missing x_nm.

News for version 0.5.5

dbc

New functions dbc::*_is_subset_of_data_frame_* and dbc::*_is_subset_of_data_table_*.

News for version 0.5.4

dbc

dbc::*_is_nonNA_* funs now pass all objects that are not vectors (e.g. lists, language objects). Only vectors are tested with is.na.

dbc::report_is_one_of

dbc::report_is_one_of gains arg arg_list.

News for version 0.5.3

dbc

dbc::*_is_uniquely_named_* funs now pass objects of length zero. E.g. dbc::test_is_uniquely_named(list()) == TRUE.

News for version 0.5.2

dbc::handle_arg_call

dbc::handle_arg_call robustified in the same way as dbc::handle_arg_x_nm, and additionally it looks at each parent.frame(i) for i = c(2L, 3L, 1L) (yes, in that order).

dbc::handle_arg_call

dbc::handle_arg_call returns the call from sys.calls() that has the corresponding environment in sys.frames() as env if call cannot be otherwise determined. If even that fails, return quote(could_not_determine_call).

dbc::handle_arg_x_nm

dbc::handle_arg_x_nm now more robust as it also looks at the environments surrounding env (the one preceding and one proceeding it in the list of environments gotten by looping through parent.frame(i)).

dbc::handle_args_inplace

dbc::handle_args_inplace gains optional arg env.

News for version 0.5.1

dbc::handle_args_inplace

dbc::handle_args_inplace now also handles y_nm.

News for version 0.5.0

dbc

Improved some assertion error messages --- avoided term "mis-specified".

dbc

All generated assertion functions no longer create reports and pass those to dbc::report_to_assertion. Instead generated assertion functions use stop directly. This reduced wall clock time used in evaluation by ~90%.

dbc::assert

New exported function dbc::assert. Evaluate arbitrary assertion expressions.

dbc::assertion_eval

New function dbc::assertion_eval. Assertion functions generated based on expressions make use of this.

dbc::assertion_raise

New function dbc::assertion_raise. This is used every time dbc raises an error over an assertion that did not pass.

dbc::expression_eval

New fun dbc::expression_eval. Every assertion expression in dbc is evaluated by this function.

dbc::generate_function_from_expressions

New exported function dbc::generate_function_from_expressions. It is used to produce all generated functions in dbc that are based on expressions.

dbc::generate_report_function_wrapper

New exported function dbc::generate_report_function_wrapper. This function is used to generate all report function wrappers in dbc.

dbc::generate_report_function_wrapper_script

New exported function dbc::generate_report_function_wrapper_script. This function is used to produce all generated report wrapper functions in dbc.

dbc::generate_script_from_expressions

New exported function dbc::generate_script_from_expressions. This function is used to produce all generated expression-based functions in dbc.

dbc::handle_arg_x_nm

dbc::handle_arg_x_nm now redacts x_nm if it is longer than 50 characters.

dbc::handle_args_inplace

New exported function dbc::handle_args_inplace.

dbc::interpolate

New exported fun dbc::interpolate.

dbc::report

New exported function dbc::report. Evaluate arbitrary report expressions.

dbc::report_is

dbc::report_is now only accepts objects of type call and list. A list is assumed to contain calls.

dbc::report_is_data_frame

New fun dbc::report_data_table_has_no_duplicates and derivatives.

dbc::test

New exported function dbc::test. Evaluate arbitrary test expressions.

News for version 0.4.17

dbc::report_to_assertion

Made assertion fail messages a bit prettier by surrounding object names and expressions with [`] instead of ["].

News for version 0.4.16

dbc

All generated assertion, report and test functions now check whether x is missing and raise an informative error. There were edge cases where x was attempted to be evaluated only in a call to eval which resulted in cryptic error messages --- now those can no longer occur.

News for version 0.4.15

dbc

All generated assertion functions now pass call to dbc::report_to_assertion arg raise_error_call. Therefore, now an error message begins with the call of the guilty function instead of the assertion function.

dbc::report_is_one_of

dbc::report_is_one_of now always returns a report data.frame with only one row. All is_one_of assertion funs are now generated instead of being manually generated. Their error messages have therefore changed.

News for version 0.4.14

dbc::handle_arg_assertion_type

New function [dbc::handle_arg_assertion_type]. Currently returns assertion_type as-is, except assertion_type = NULL is replaced with assertion_type <- dbc::assertion_type_default(). Raises an error if assertion_type is not NULL nor one of dbc::assertion_types().

dbc::report_to_assertion

[dbc::report_to_assertion] now accepts (and has as default) assertion_type = NULL. Arg assertion_type is handled by [dbc::handle_arg_assertion_type].

Every assertion function with assertion_type argument now has as default value NULL.

News for version 0.4.13

dbc

Improved *_vector_elems_are_in_set funs: assertion failure message also shows first ten elems of set.

News for version 0.4.12

dbc::assertion_type_default

New fun dbc::assertion_type_default. This returns the default value for the assertion_type arg used by all funs that have that arg.

News for version 0.4.11

dbc::report_data_table_has_no_duplicates

New fun dbc::report_data_table_has_no_duplicates and derivatives.

News for version 0.4.10

dbc::report_is_all_equal

New fun dbc::report_is_all_equal. Generated correspoding assertion funs.

dbc::report_is_identical

New fun dbc::report_is_identical. Generated correspoding assertion funs.

News for version 0.4.9

dbc::assertion_types

Added new assertion type "none". This was added for convenience: using assertion_type = "none" means that the assertion is not performed. This can save computation time.

News for version 0.4.8

dbc::report_has_class

dbc::report_has_class and dbc::report_inherits error message improved for when required_class is improper.

dbc::report_inherits

dbc::report_has_class and dbc::report_inherits error message improved for when required_class is improper.

News for version 0.4.7

dbc::report_is

dbc::report_is and all corresponding assertion functions now handle string and expression inputs more robustly.

dbc::report_is_like_template

New fun dbc::report_is_like_template. Generated correspoding assertion funs. Compare an object's names, class, and length to a template. Recursive for lists.

News for version 0.4.6

dbc::report_is

dbc::report_is gains arg env it is passed to dbc::expressions_to_report, so that's where x will be evaluated.