Skip to content
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

471 remove CodeClass from FilteredData #488

Merged
merged 11 commits into from
Nov 22, 2023
Merged

Conversation

chlebowa
Copy link
Contributor

@chlebowa chlebowa commented Nov 15, 2023

Removed private fields $code and $check from FilteredData class and all associated methods.
Removed code and check arguments from init_filtered_data.default.

companion

@chlebowa chlebowa added the core label Nov 15, 2023
@chlebowa chlebowa linked an issue Nov 15, 2023 that may be closed by this pull request
@chlebowa chlebowa marked this pull request as ready for review November 22, 2023 08:51
@chlebowa chlebowa requested a review from gogonzo November 22, 2023 08:51
Copy link
Contributor

github-actions bot commented Nov 22, 2023

Unit Tests Summary

    1 files    28 suites   23s ⏱️
363 tests 363 ✔️ 0 💤 0
833 runs  833 ✔️ 0 💤 0

Results for commit 6fadc0b.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Nov 22, 2023

badge

Code Coverage Summary

Filename                      Stmts    Miss  Cover    Missing
--------------------------  -------  ------  -------  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
R/calls_combine_by.R              8       0  100.00%
R/choices_labeled.R              49      14  71.43%   22, 33, 38, 48-53, 65, 69-73
R/count_labels.R                 98       0  100.00%
R/filter_panel_api.R             37       2  94.59%   92, 104
R/FilteredData-utils.R          121      21  82.64%   107-112, 205, 227-236, 296-299
R/FilteredData.R                575     227  60.52%   89-92, 157, 316, 464-472, 541-550, 572, 593-634, 652-655, 671, 712-745, 760-762, 766-772, 798-826, 848-850, 854-856, 859-870, 874-883, 885-911, 929-999, 1035, 1058-1080
R/FilteredDataset-utils.R        20       1  95.00%   133
R/FilteredDataset.R             179      67  62.57%   50, 149, 198-204, 232-289, 329-331
R/FilteredDatasetDefault.R      121       9  92.56%   69, 131, 141, 145, 228-232
R/FilteredDatasetMAE.R          134      37  72.39%   27, 113-118, 157-162, 166-167, 187-209
R/FilterPanelAPI.R               10       0  100.00%
R/FilterState-utils.R           101       2  98.02%   262, 290
R/FilterState.R                 361      61  83.10%   88, 212, 230-234, 241-242, 256-257, 263-264, 312, 314, 316, 368, 412, 644, 687-712, 723-742, 777-783, 792-798
R/FilterStateChoices.R          338     106  68.64%   302-305, 317, 360, 384-391, 395-412, 441, 456-467, 479-487, 491-520, 541-544, 547-550, 561-582, 595-596, 606
R/FilterStateDate.R             212     129  39.15%   219, 272-430
R/FilterStateDatettime.R        307     199  35.18%   256, 309-541
R/FilterStateEmpty.R             53      31  41.51%   82, 92-97, 111, 125-166
R/FilterStateExpr.R              75      62  17.33%   138-262
R/FilterStateLogical.R          196     144  26.53%   127, 150, 210, 213-399
R/FilterStateRange.R            410     105  74.39%   254, 378, 506-510, 513-523, 526, 538-544, 555-567, 571-581, 585-587, 601-628, 643, 646, 661-678, 713-718, 728-730
R/FilterStates-utils.R           70       9  87.14%   102, 121, 179-185, 207, 234
R/FilterStates.R                364      30  91.76%   76-80, 189, 320-329, 417-420, 463, 548-552, 597, 718-721
R/FilterStatesDF.R                5       0  100.00%
R/FilterStatesMAE.R              10       1  90.00%   39
R/FilterStatesMatrix.R            3       0  100.00%
R/FilterStatesSE.R              211     157  25.59%   34, 69-71, 81-83, 107-114, 122-129, 152-300
R/include_css_js.R                5       5  0.00%    12-16
R/teal_slice.R                  107       2  98.13%   135, 201
R/teal_slices.R                 139       6  95.68%   144-149, 334
R/test_utils.R                   21       0  100.00%
R/utils.R                        49       2  95.92%   101-102
R/variable_types.R               48      33  31.25%   41-46, 56, 69-104
R/zzz.R                          16      16  0.00%    3-47
TOTAL                          4453    1478  66.81%

Diff against main

Filename                  Stmts    Miss  Cover
----------------------  -------  ------  --------
R/FilteredData-utils.R       -2       0  -0.28%
R/FilteredData.R            -16       0  -1.07%
R/zzz.R                      +1      +1  +100.00%
TOTAL                       -17      +1  -0.15%

Results for commit: 6fadc0b

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

Copy link
Contributor

github-actions bot commented Nov 22, 2023

Unit Test Performance Difference

Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
FilteredData 💀 $0.02$ $-0.02$ FilteredData_preserves_the_check_field_when_check_is_TRUE
FilteredData 💀 $0.02$ $-0.02$ constructor_accepts_check_to_be_a_flag
FilteredData 💀 $0.02$ $-0.02$ constructor_accepts_code_to_be_CodeClass_or_NULL
FilteredData 💀 $0.00$ $-0.00$ get_code_returns_a_string_when_FilteredData_has_no_code
FilteredData 💀 $0.01$ $-0.01$ get_code_returns_the_code_passed_to_CodeClass_set_code
init_filtered_data 💀 $0.01$ $-0.01$ init_filtered_data.default_accepts_NULL_passed_to_code
init_filtered_data 💀 $0.01$ $-0.01$ init_filtered_data.default_asserts_check_is_logical_1_
init_filtered_data 💀 $0.01$ $-0.01$ init_filtered_data.default_asserts_code_is_CodeClass_

Results for commit e6e7bbf

♻️ This comment has been updated with latest results.

@gogonzo gogonzo self-assigned this Nov 22, 2023
Copy link
Contributor

@gogonzo gogonzo left a comment

Choose a reason for hiding this comment

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

code and check are still in the documentation of init_filtered_data but they are ignored. Please fix @param check and @param code and write there that they are deprecated

NEWS.md Show resolved Hide resolved
R/FilteredData-utils.R Show resolved Hide resolved
@chlebowa
Copy link
Contributor Author

code and check are still in the documentation of init_filtered_data but they are ignored. Please fix @param check and @param code and write there that they are deprecated

They have to stay because of other methods and the generic. Will be removed along with old classes.

Copy link
Contributor

@gogonzo gogonzo 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

@chlebowa chlebowa enabled auto-merge (squash) November 22, 2023 12:22
@chlebowa chlebowa merged commit 8bc3293 into main Nov 22, 2023
24 checks passed
@chlebowa chlebowa deleted the 471_remove_code_class@main branch November 22, 2023 13:46
walkowif pushed a commit to walkowif/teal that referenced this pull request Dec 5, 2023
Preprocessing code is no longer kept in `FilteredData$code` but attached
to a `FilteredData` as an attribute.
Necessary adjustments were made in `teal_data_to_filtered_data` and in
`get_datasets_code`.

[companion](insightsengineering/teal.slice#488)

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove CodeClass from FilteredData
2 participants