Skip to content

Change qenv as environment "type" -- adds names(qenv/qenv.error), get() and $ S3 methods - #218

Merged
averissimo merged 58 commits into
mainfrom
333_deprecate_datanames@main
Nov 8, 2024
Merged

Change qenv as environment "type" -- adds names(qenv/qenv.error), get() and $ S3 methods#218
averissimo merged 58 commits into
mainfrom
333_deprecate_datanames@main

Conversation

@averissimo

@averissimo averissimo commented Oct 28, 2024

Copy link
Copy Markdown
Contributor

Pull Request

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

@averissimo
averissimo marked this pull request as ready for review October 28, 2024 17:09
@github-actions

github-actions Bot commented Oct 28, 2024

Copy link
Copy Markdown
Contributor

Unit Tests Summary

  1 files   10 suites   1s ⏱️
124 tests 122 ✅ 2 💤 0 ❌
219 runs  217 ✅ 2 💤 0 ❌

Results for commit a5fcb9a.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Oct 28, 2024

Copy link
Copy Markdown
Contributor

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
qenv-class 👶 $+0.25$ $+7$ $0$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
qenv-class 👶 $+0.10$ creates_a_locked_environment
qenv-class 👶 $+0.03$ creates_a_locked_environment_when_.xData_is_manually_defined
qenv-class 👶 $+0.01$ initialized_qenv_s_have_different_environments
qenv-class 👶 $+0.01$ throws_error_when_.xData_is_not_an_environment
qenv-class 👶 $+0.01$ throws_error_when_code_is_not_language_or_character_object
qenv-class 👶 $+0.11$ throws_error_when_id_and_code_length_doesn_t_match
qenv_constructor 👶 $+0.01$ does_not_allow_binding_to_be_added
qenv_constructor 👶 $+0.01$ does_not_allow_binding_to_be_modified
qenv_constructor 👶 $+0.02$ is_an_environment
qenv_constructor 👶 $+0.00$ ls_all.names_TRUE_show_all_objects
qenv_constructor 👶 $+0.00$ ls_does_not_show_hidden_objects
qenv_constructor 👶 $+0.00$ names_shows_available_objets
qenv_constructor 👶 $+0.00$ names_shows_hidden_objects
qenv_constructor 👶 $+0.00$ names_shows_nothing_on_empty_environment
qenv_constructor 💀 $0.01$ $-0.01$ parent_of_qenv_environment_is_locked
qenv_constructor 💀 $0.00$ $-0.00$ parent_of_qenv_environment_is_the_parent_of_.GlobalEnv
qenv_constructor 👶 $+0.00$ via_qenv_directly
qenv_constructor 👶 $+0.00$ via_slot
qenv_eval_code 💀 $0.01$ $-0.01$ env_in_qenv_is_always_a_sibling_of.GlobalEnv
qenv_get_code 💀 $0.01$ $-0.01$ works_for_datanames_of_length_1
qenv_get_code 👶 $+0.01$ works_for_names_of_length_1
qenv_get_var 👶 $+0.01$ get_var_and_only_returns_objects_from_qenv_not_.GlobalEnv
qenv_within 👶 $+0.00$ multiline_expressions_are_evaluated
qenv_within 👶 $+0.01$ within.qenv_renturns_a_qenv_where_.xData_is_a_deep_copy_of_that_in_data_
qenv_within 💀 $0.01$ $-0.01$ within.qenv_renturns_a_qenv_where_env_is_a_deep_copy_of_that_in_data_

Results for commit eecbc6d

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Oct 28, 2024

Copy link
Copy Markdown
Contributor

badge

Code Coverage Summary

Filename                         Stmts    Miss  Cover    Missing
-----------------------------  -------  ------  -------  ---------
R/qenv-c.R                          57       2  96.49%   75, 106
R/qenv-class.R                      19       2  89.47%   42, 45
R/qenv-concat.R                     10       0  100.00%
R/qenv-constructor.R                 1       0  100.00%
R/qenv-errors.R                      4       4  0.00%    6-9
R/qenv-eval_code.R                  52       2  96.15%   99, 108
R/qenv-get_code.R                   28       0  100.00%
R/qenv-get_env.R                     3       3  0.00%    22-27
R/qenv-get_var.R                    27       0  100.00%
R/qenv-get_warnings.R               24       0  100.00%
R/qenv-join.R                        7       0  100.00%
R/qenv-length.R                      2       0  100.00%
R/qenv-show.R                        1       1  0.00%    19
R/qenv-within.R                      8       0  100.00%
R/utils-get_code_dependency.R      191       1  99.48%   283
R/utils.R                            9       0  100.00%
TOTAL                              443      15  96.61%

Diff against main

Filename                Stmts    Miss  Cover
--------------------  -------  ------  --------
R/qenv-c.R                +57      +2  +96.49%
R/qenv-class.R            +19      +2  +89.47%
R/qenv-constructor.R      -15     -13  +81.25%
R/qenv-errors.R            +4      +4  +100.00%
R/qenv-get_var.R           +8       0  +100.00%
R/qenv-join.R             -39       0  +100.00%
R/qenv-length.R            +2       0  +100.00%
R/utils.R                  -1       0  +100.00%
TOTAL                     +35      -5  +1.52%

Results for commit: a5fcb9a

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@gogonzo gogonzo self-assigned this Oct 29, 2024
Comment thread R/qenv-names.R Outdated

@gogonzo gogonzo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please test cover new functions

Comment thread NAMESPACE Outdated

@averissimo averissimo left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Some topics to discuss on this implementation

Comment thread R/qenv-eval_code.R
Comment thread R/qenv-get_var.R
Comment thread R/qenv-get_var.R
Comment thread tests/testthat/test-qenv_constructor.R
averissimo and others added 3 commits November 5, 2024 13:59
Co-authored-by: Dawid Kałędkowski <dawid.kaledkowski@gmail.com>
Signed-off-by: André Veríssimo <211358+averissimo@users.noreply.github.com>
Comment thread R/qenv-join.R Outdated
averissimo and others added 2 commits November 5, 2024 16:28
Co-authored-by: Dawid Kałędkowski <dawid.kaledkowski@gmail.com>
Signed-off-by: André Veríssimo <211358+averissimo@users.noreply.github.com>
Comment thread R/qenv-get_var.R

@gogonzo gogonzo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

Comment thread R/qenv-class.R
@averissimo
averissimo requested a review from gogonzo November 6, 2024 19:00
Comment thread tests/testthat/test-qenv-class.R
averissimo and others added 3 commits November 7, 2024 11:02
Co-authored-by: Dawid Kałędkowski <dawid.kaledkowski@gmail.com>
Signed-off-by: André Veríssimo <211358+averissimo@users.noreply.github.com>
Comment thread R/qenv-get_env.R Outdated
Comment thread README.md Outdated
averissimo and others added 3 commits November 7, 2024 15:36
Co-authored-by: Dawid Kałędkowski <dawid.kaledkowski@gmail.com>
Signed-off-by: André Veríssimo <211358+averissimo@users.noreply.github.com>
Co-authored-by: Dawid Kałędkowski <dawid.kaledkowski@gmail.com>
Signed-off-by: André Veríssimo <211358+averissimo@users.noreply.github.com>
Comment thread R/qenv-get_env.R Outdated
averissimo and others added 3 commits November 7, 2024 15:53
Signed-off-by: André Veríssimo <211358+averissimo@users.noreply.github.com>
@averissimo
averissimo merged commit e14dc64 into main Nov 8, 2024
@averissimo
averissimo deleted the 333_deprecate_datanames@main branch November 8, 2024 09:57
@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.

[Bug]: within doesn't keep integer type when using shorthand [Feature Request]: New $ method to access objs from env

2 participants