Skip to content

Conversation

@gogonzo
Copy link
Contributor

@gogonzo gogonzo commented Nov 13, 2024

closes #230
alternative to #231

instead of id being an attribute of the @code elements it is now a name of the @code elements.
Why it fits to the names(@code)?

  • id is a single value for each code element
  • id must be unique across all elements

@gogonzo gogonzo added the core label Nov 13, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Nov 13, 2024

badge

Code Coverage Summary

Filename                         Stmts    Miss  Cover    Missing
-----------------------------  -------  ------  -------  ---------
R/qenv-c.R                          55       0  100.00%
R/qenv-class.R                      12       0  100.00%
R/qenv-concat.R                      7       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                  57       2  96.49%   108, 117
R/qenv-extract.R                    30       0  100.00%
R/qenv-get_code.R                   24       0  100.00%
R/qenv-get_env.R                     3       1  66.67%   27
R/qenv-get_messages.r                5       0  100.00%
R/qenv-get_var.R                    26       0  100.00%
R/qenv-get_warnings.R                5       0  100.00%
R/qenv-join.R                        7       7  0.00%    137-151
R/qenv-length.R                      2       1  50.00%   2
R/qenv-show.R                        1       1  0.00%    19
R/qenv-within.R                      8       0  100.00%
R/utils-get_code_dependency.R      189       1  99.47%   240
R/utils.R                           30       0  100.00%
TOTAL                              466      17  96.35%

Diff against main

Filename              Stmts    Miss  Cover
------------------  -------  ------  -------
R/qenv-eval_code.R       -2       0  -0.12%
TOTAL                    -2       0  -0.02%

Results for commit: a58c187

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions
Copy link
Contributor

github-actions bot commented Nov 13, 2024

Unit Tests Summary

  1 files   12 suites   3s ⏱️
148 tests 145 ✅ 3 💤 0 ❌
228 runs  225 ✅ 3 💤 0 ❌

Results for commit a58c187.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 13, 2024

Unit Test Performance Difference

Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
qenv_extract 💀 $0.02$ $-0.02$ _.doesn_t_warn_if_name_is_in_code_but_not_in_env_secret_feature_for_unverified_teal_data
qenv_extract 👶 $+0.02$ _.doesn_t_warn_if_name_is_not_in_code_but_is_present_in_env_secret_feature_for_unverified_teal_data
qenv_extract 💀 $0.02$ $-0.02$ _._warns_if_name_is_in_code_but_not_in_env
qenv_extract 👶 $+0.02$ _._warns_if_name_is_not_in_code_but_is_present_in_env

Results for commit 867bb94

♻️ This comment has been updated with latest results.

@m7pr
Copy link
Contributor

m7pr commented Nov 13, 2024

Hey, this looks good on a first glance. I will make a through review once I'm done with decorator PR on teal

@m7pr
Copy link
Contributor

m7pr commented Nov 14, 2024

A minor comment not related to this PR, but a food for thought

id must be unique across all elements

There is a slight chance that the id will not be the same if we do sample.int(.Machine$integer.max, size = 1) but the chance is small (1/.Machine$integer.max). To make the chance be 0% I would provide hashes of the time of the evaluation

> rlang::hash(Sys.time())
[1] "bda544bca9e09b34089d8a1bd5788fa7"
> Sys.time()
[1] "2024-11-14 09:31:26 CET"

Copy link
Contributor

@m7pr m7pr left a comment

Choose a reason for hiding this comment

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

Good to go, left one comment in tests.
This is great enhancement. I think it will be easier to work with names, instead of attributes

@gogonzo
Copy link
Contributor Author

gogonzo commented Nov 14, 2024

rlang::hash(Sys.time())

This is not enough. There are few evaluation within a second, on a simple apps and fast machines you'll get duplicates.

@m7pr
Copy link
Contributor

m7pr commented Nov 14, 2024

This is not enough. There are few evaluation within a second, on a simple apps and fast machines you'll get duplicates.

Got it!

@gogonzo gogonzo merged commit 123d214 into main Nov 14, 2024
29 checks passed
@gogonzo gogonzo deleted the 230_fix_join_2 branch November 14, 2024 13:01
@github-actions github-actions bot locked and limited conversation to collaborators Nov 14, 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]: test failure on windows and linux

3 participants