Skip to content

Fixes warning on choices to be thrown only after prettyfying them#677

Merged
averissimo merged 11 commits into
mainfrom
394-fix_warning_choices
Feb 12, 2026
Merged

Fixes warning on choices to be thrown only after prettyfying them#677
averissimo merged 11 commits into
mainfrom
394-fix_warning_choices

Conversation

@averissimo
Copy link
Copy Markdown
Contributor

Pull Request

Fixes of #676

Changes description

  • Only check for conditions for warning after calculating "pretty" range

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 11, 2026

badge

Code Coverage Summary

Filename                        Stmts    Miss  Cover    Missing
----------------------------  -------  ------  -------  -------------------------------------------------------------------------------------------------------------------------
R/calls_combine_by.R                7       0  100.00%
R/choices_labeled.R                23       1  95.65%   34
R/count_labels.R                  126       0  100.00%
R/filter_panel_api.R               27       1  96.30%   132
R/FilteredData-utils.R             58      17  70.69%   38-43, 139, 161-170
R/FilteredData.R                  522     118  77.39%   109, 138, 186, 325, 397, 484-493, 514, 532-590, 610-613, 657, 712-728, 873, 885-905
R/FilteredDataset-utils.R          23       1  95.65%   125
R/FilteredDataset.R               264       5  98.11%   49, 154, 189, 214-215
R/FilteredDatasetDataframe.R      123       3  97.56%   87, 148, 158
R/FilteredDatasetDefault.R         18       4  77.78%   104-117
R/FilteredDatasetMAE.R            133      15  88.72%   56, 118-123, 160-165, 169-170
R/FilterPanelAPI.R                 10       0  100.00%
R/FilterState-utils.R             101       2  98.02%   264, 294
R/FilterState.R                   366      21  94.26%   91, 155, 266-267, 273-274, 328, 330, 416, 632, 675-679, 698, 762-768, 779
R/FilterStateChoices.R            349      10  97.13%   303, 426-429, 541-544, 589
R/FilterStateDate.R               221      46  79.19%   233, 361-371, 382-387, 391-396, 404-419, 438-445
R/FilterStateDatettime.R          316     206  34.81%   269, 321-559
R/FilterStateEmpty.R               53      31  41.51%   89, 99-104, 117, 129-169
R/FilterStateExpr.R                81       1  98.77%   244
R/FilterStateLogical.R            201     149  25.87%   139, 161, 221, 225-414
R/FilterStateRange.R              411     121  70.56%   264, 386, 497-504, 507-517, 520, 531-537, 548-560, 564-574, 578-580, 593-619, 634-641, 644-651, 665-682, 717-722, 732-734
R/FilterStates-utils.R             70       7  90.00%   108, 127, 188-194
R/FilterStates.R                  379      19  94.99%   63, 92-96, 208, 425, 470, 559-563, 608, 726-729
R/FilterStatesDF.R                  5       0  100.00%
R/FilterStatesMAE.R                10       1  90.00%   40
R/FilterStatesMatrix.R              7       0  100.00%
R/FilterStatesSE.R                171      47  72.51%   36, 73-75, 85-87, 119, 191-201, 213-223, 230-237, 245-252, 259
R/include_css_js.R                  5       0  100.00%
R/teal_slice.R                    108       1  99.07%   206
R/teal_slices.R                    88       5  94.32%   152-157
R/test_utils.R                     21       0  100.00%
R/utils.R                          29       0  100.00%
R/variable_types.R                 15       1  93.33%   48
R/zzz.R                            16      16  0.00%    3-46
TOTAL                            4357     849  80.51%

Diff against main

Filename                Stmts    Miss  Cover
--------------------  -------  ------  -------
R/FilterStateRange.R       +2       0  +0.14%
TOTAL                      +2       0  +0.01%

Results for commit: b7cc2e2

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 11, 2026

Unit Tests Summary

  1 files   31 suites   40s ⏱️
422 tests 407 ✅ 15 💤 0 ❌
890 runs  875 ✅ 15 💤 0 ❌

Results for commit b7cc2e2.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 11, 2026

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
FilteredData 💚 $25.27$ $-3.36$ $0$ $0$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
RangeFilterState 👶 $+0.18$ constructor_accepts_NA_NaN_values_as_part_of_numeric
RangeFilterState 👶 $+0.05$ constructor_accepts_POSIXt
RangeFilterState 👶 $+0.05$ constructor_accepts_dates
RangeFilterState 👶 $+0.05$ constructor_accepts_infinite_values_as_part_of_numeric
RangeFilterState 💀 $0.07$ $-0.07$ constructor_accepts_infinite_values_but_not_infinite_only
RangeFilterState 👶 $+0.08$ constructor_modifies_choices_and_does_not_throw_error_when_re_used
RangeFilterState 👶 $+0.05$ constructor_modifies_choices_and_throws_warning_when_manually_calculated_with_range_x_
RangeFilterState 👶 $+0.05$ constructor_modifies_choices_that_are_automatically_calculated_to_better_fit_the_tick_on_the_slider
RangeFilterState 👶 $+0.01$ constructor_throws_error_on_any_complex_values
RangeFilterState 👶 $+0.06$ constructor_throws_error_on_only_NA_values
RangeFilterState 👶 $+0.01$ constructor_throws_error_on_only_infinite_values
RangeFilterState 👶 $+0.01$ constructor_throws_error_when_no_finite_values_are_present
RangeFilterState 👶 $+0.02$ constructor_throws_error_with_non_numeric_NA

Results for commit 0110d7e

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Contributor

@llrs-roche llrs-roche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Key change I think is on https://github.com/insightsengineering/teal.slice/pull/677/changes#diff-83c9e316098506afac069a38830850c5a3bcd979de2f8eb540787de4c5af946cR288.

The app didn't produce the warnings with this patch. Thanks for adding the NEWS entry

Comment thread R/FilterStateRange.R Outdated
@llrs-roche llrs-roche self-assigned this Feb 11, 2026
Comment thread tests/testthat/test-RangeFilterState.R
@averissimo averissimo enabled auto-merge (squash) February 12, 2026 11:43
@averissimo averissimo disabled auto-merge February 12, 2026 11:43
@averissimo averissimo merged commit fdebdd5 into main Feb 12, 2026
29 checks passed
@averissimo averissimo deleted the 394-fix_warning_choices branch February 12, 2026 12:34
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants