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

Adds names() function and deprecates datanames() #347

Merged
merged 13 commits into from
Nov 8, 2024

Conversation

averissimo
Copy link
Contributor

@averissimo averissimo commented Oct 28, 2024

Pull Request

Blockers

Changes description

  • Adds names() function
    • Setter is implemented but throws warning (does nothing)
  • Deprecates datanames() getter and setter
  • Adapt tests to new API
  • Update NEWS
  • Review documentation
  • Review vignettes

@gogonzo gogonzo self-assigned this Oct 29, 2024
R/teal_data-names.R Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Nov 5, 2024

badge

Code Coverage Summary

Filename                     Stmts    Miss  Cover    Missing
-------------------------  -------  ------  -------  --------------------
R/cdisc_data.R                   1       0  100.00%
R/deprecated.R                  71      65  8.45%    19-380
R/dummy_function.R               2       2  0.00%    14-15
R/formatters_var_labels.R       61       0  100.00%
R/join_key.R                    38       0  100.00%
R/join_keys-c.R                 12       0  100.00%
R/join_keys-extract.R          128       0  100.00%
R/join_keys-names.R             15       0  100.00%
R/join_keys-parents.R           30       0  100.00%
R/join_keys-print.R             45       0  100.00%
R/join_keys-utils.R             73       3  95.89%   35-38
R/join_keys.R                   21       0  100.00%
R/teal_data-class.R             14       0  100.00%
R/teal_data-get_code.R          13       8  38.46%   114-120, 124
R/teal_data-names.R              8       1  87.50%   31
R/teal_data-show.R               4       4  0.00%    14-19
R/teal_data.R                   31      16  48.39%   33, 36-42, 52-58, 61
R/testhat-helpers.R             26       0  100.00%
R/topological_sort.R            32       0  100.00%
R/verify.R                      42      11  73.81%   67, 97-101, 104-108
TOTAL                          667     110  83.51%

Diff against main

Filename               Stmts    Miss  Cover
-------------------  -------  ------  --------
R/deprecated.R           +14      +8  +8.45%
R/join_keys.R             -1       0  +100.00%
R/teal_data-class.R      -12      -1  +3.85%
R/teal_data-names.R       +8      +1  +87.50%
R/teal_data.R             +1       0  +1.72%
TOTAL                    +10      +8  -1.43%

Results for commit: 04fd26e

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

Copy link
Contributor

github-actions bot commented Nov 5, 2024

Unit Tests Summary

  1 files   13 suites   1s ⏱️
158 tests 158 ✅ 0 💤 0 ❌
213 runs  213 ✅ 0 💤 0 ❌

Results for commit 33de31f.

Copy link
Contributor

github-actions bot commented Nov 5, 2024

Unit Tests Summary

  1 files   13 suites   1s ⏱️
158 tests 158 ✅ 0 💤 0 ❌
213 runs  213 ✅ 0 💤 0 ❌

Results for commit 04fd26e.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Nov 5, 2024

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
datanames 💀 $0.17$ $-0.17$ $-17$ $0$ $0$ $0$
test_data-names 👶 $+0.13$ $+12$ $0$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
datanames 💀 $0.00$ $-0.00$ datanames_are_set_in_topological_order_in_constructor_if_join_keys_are_specified
datanames 💀 $0.00$ $-0.00$ datanames_called_on_qenv.error_does_not_change_qenv.error
datanames 💀 $0.00$ $-0.00$ datanames_called_on_qenv.error_returns_NULL
datanames 💀 $0.01$ $-0.01$ datanames_can_set_value_of_datanames
datanames 💀 $0.00$ $-0.00$ datanames_do_not_return_parent_if_in_constructor_it_was_provided_in_join_keys_but_do_not_exists_in_env
datanames 💀 $0.00$ $-0.00$ datanames_do_not_return_parent_if_join_keys_were_provided_and_parent_did_not_exists_in_env
datanames 💀 $0.00$ $-0.00$ datanames_return_parent_if_in_constructor_it_was_provided_in_join_keys_and_exists_in_env
datanames 💀 $0.01$ $-0.01$ datanames_return_parent_if_join_keys_were_provided_and_parent_exists_in_env
datanames 💀 $0.01$ $-0.01$ datanames_return_topological_order_of_datasets_after_datanames_are_called_after_join_keys
datanames 💀 $0.01$ $-0.01$ datanames_return_topological_order_of_datasets_once_join_keys_are_specified
datanames 💀 $0.02$ $-0.02$ datanames_returns_contents_of_datanames_slot
datanames 💀 $0.01$ $-0.01$ datanames_supports_qenv.error_class
datanames 💀 $0.08$ $-0.08$ only_names_of_existing_variables_are_accepted
datanames 💀 $0.00$ $-0.00$ variables_not_in_datanames_are_omitted
teal_data 👶 $+0.02$ teal_data_.xData_is_locked._Not_able_to_modify_add_or_remove_bindings
teal_data 💀 $0.02$ $-0.02$ teal_data_env_is_locked._Not_able_to_modify_add_or_remove_bindings
teal_data 💀 $0.01$ $-0.01$ teal_data_initializes_teal_data_object_with_datanames_taken_from_passed_objects
teal_data 💀 $0.00$ $-0.00$ teal_data_initializes_teal_data_object_with_datanames_taken_only_from_passed_objects_and_not_join_keys
teal_data 👶 $+0.01$ teal_data_initializes_teal_data_object_with_names_taken_only_from_passed_objects_and_not_join_keys
teal_data 💀 $0.00$ $-0.00$ teal_data_initializes_teal_data_object_without_datanames_taken_from_join_keys_if_objects_did_not_exist_in_env
teal_data 👶 $+0.01$ teal_data_initializes_teal_data_object_without_names_taken_from_join_keys_if_objects_did_not_exist_in_env
test_data-names 👶 $+0.01$ names_are_set_in_topological_order_in_constructor_if_join_keys_are_specified
test_data-names 👶 $+0.04$ names_called_on_teal_data_does_not_change_it
test_data-names 👶 $+0.01$ names_do_not_return_parent_if_in_constructor_it_was_provided_in_join_keys_but_do_not_exists_in_env
test_data-names 👶 $+0.01$ names_do_not_return_parent_if_join_keys_were_provided_and_parent_did_not_exists_in_env
test_data-names 👶 $+0.01$ names_return_parent_if_in_constructor_it_was_provided_in_join_keys_and_exists_in_env
test_data-names 👶 $+0.01$ names_return_parent_if_join_keys_were_provided_and_parent_exists_in_env
test_data-names 👶 $+0.01$ names_return_topological_order_of_datasets_after_new_objects_are_added_after_join_keys
test_data-names 👶 $+0.02$ names_return_topological_order_of_datasets_once_join_keys_are_specified
test_data-names 👶 $+0.01$ names_returns_list_of_objects_in_teal_data
test_data-names 👶 $+0.01$ names_supports_qenv.error_class
test_data-names 👶 $+0.01$ variables_with_dot_prefix_are_omitted

Results for commit 5657be8

♻️ This comment has been updated with latest results.

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.

I exhausted all comments here. Accept with a minor comment which you can address or not 👍

R/teal_data-class.R Outdated Show resolved Hide resolved
.pre-commit-config.yaml Outdated Show resolved Hide resolved
averissimo added a commit to insightsengineering/teal.code that referenced this pull request Nov 8, 2024
…`, `get()` and `$` S3 methods (#218)

# Pull Request

- Part of insightsengineering/teal.data#333
- Fixes #221 
- closes #164
- Companion of insightsengineering/teal.data#347

#### Changes description

- `qenv` S4 class inherits from `environment` data class
- Removes `@env` slot in favor of `qenv`
- Replace all instances of `@env` with `@.xData` (slot created by parent
class)
- All functions/methods that work for `environment` class are supported
natively in `qenv`

---------

Signed-off-by: André Veríssimo <[email protected]>
Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Dawid Kałędkowski <[email protected]>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
@averissimo averissimo merged commit 3d899ee into main Nov 8, 2024
29 checks passed
@averissimo averissimo deleted the 333_deprecate_datanames@main branch November 8, 2024 09:58
@github-actions github-actions bot locked and limited conversation to collaborators Nov 8, 2024
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.

[Feature Request]: Don't use @datanames anymore
2 participants