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

261 multiple improvements to get_code function and it's documentation #263

Merged
merged 47 commits into from
Jan 24, 2024

Conversation

m7pr
Copy link
Contributor

@m7pr m7pr commented Jan 22, 2024

Close #216

EDIT
Close #261

@m7pr m7pr added the core label Jan 22, 2024
@m7pr m7pr changed the title 261 get code fun definition@main 261 get_code for function definition and @linksto tag combination Jan 22, 2024
@m7pr m7pr changed the title 261 get_code for function definition and @linksto tag combination 261 get_code for function definition and @linksto tag combination Jan 22, 2024
@chlebowa
Copy link
Contributor

Wrong link?

@m7pr m7pr marked this pull request as ready for review January 22, 2024 08:48
Copy link
Contributor

github-actions bot commented Jan 22, 2024

badge

Code Coverage Summary

Filename                         Stmts    Miss  Cover    Missing
-----------------------------  -------  ------  -------  ------------------
R/cdisc_data.R                       1       1  0.00%    38
R/default_cdisc_join_keys.R         11      11  0.00%    16-34
R/deprecated.R                      57      57  0.00%    19-344
R/dummy_function.R                   2       2  0.00%    14-15
R/formatters_var_labels.R           36      11  69.44%   60, 69-80
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                 25       1  96.00%   69
R/teal_data-datanames.R             10       0  100.00%
R/teal_data-get_code.R              14       0  100.00%
R/teal_data-show.R                   4       4  0.00%    14-19
R/teal_data.R                       22       9  59.09%   31, 40-46, 49
R/testhat-helpers.R                 26       0  100.00%
R/topological_sort.R                32       0  100.00%
R/utils-get_code_dependency.R      166       1  99.40%   258
R/verify.R                          42      11  73.81%   63, 93-97, 100-104
R/zzz.R                             10      10  0.00%    4-16
TOTAL                              820     121  85.24%

Diff against main

Filename                         Stmts    Miss  Cover
-----------------------------  -------  ------  -------
R/utils-get_code_dependency.R      +38      +1  -0.60%
TOTAL                              +38      +1  +0.59%

Results for commit: 1cb250c

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

Copy link
Contributor

github-actions bot commented Jan 22, 2024

Unit Test Performance Difference

Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
get_code 💀 $0.01$ $-0.01$ Can_t_detect_occurrence_of_function_definition_when_a_formal_is_named_the_same_as_a_function
get_code 💀 $0.01$ $-0.01$ _linksto_cause_to_return_this_line_for_affected_binding
get_code 💀 $0.01$ $-0.01$ _linksto_gets_extracted_if_it_s_a_side_effect_on_a_dependent_object
get_code 👶 $+0.01$ linksto_gets_extracted_if_it_s_a_side_effect_on_a_dependent_object_even_of_a_dependent_object
get_code 💀 $0.01$ $-0.01$ _linksto_gets_extracted_if_it_s_a_side_effect_on_a_dependent_object_of_a_dependent_object
get_code 👶 $+0.01$ _linksto_makes_a_line_being_returned_for_an_affected_binding
get_code 👶 $+0.01$ _linksto_returns_the_line_for_an_affected_binding_even_if_the_object_did_not_exist_in_the_same_iteration_of_eval_code
get_code 💀 $0.01$ $-0.01$ _linksto_returns_this_line_for_affected_binding_even_if_object_is_not_specificed_created_in_the_same_eval_code
get_code 💀 $0.01$ $-0.01$ _linksto_returns_this_line_for_affected_binding_if_object_is_not_specificed_in_the_same_element_of_code
get_code 💀 $0.03$ $-0.03$ _linksto_tag_indicate_affected_object_if_object_is_assigned_anywhere_in_a_code
get_code 👶 $+0.01$ data_call_is_returned_when_data_name_is_provided_as_a_character
get_code 👶 $+0.01$ data_call_is_returned_when_data_name_is_provided_as_is
get_code 👶 $+0.01$ detects_cooccurrence_properly_even_if_all_objects_are_on_lhs
get_code 👶 $+0.01$ detects_every_assign_calls_even_if_not_evaluated_if_there_is_only_one_assignment_in_this_line
get_code 👶 $+0.01$ detects_function_usage_of_the_assignment_operator
get_code 👶 $+0.01$ detects_occurrence_of_a_function_definition_when_a_formal_is_named_the_same_as_a_function
get_code 👶 $+0.01$ detects_occurrence_of_a_function_definition_with_a_linksto_usage
get_code 👶 $+0.02$ detects_occurrence_of_the_function_object
get_code 👶 $+0.01$ does_not_break_if_code_is_separated_by_
get_code 👶 $+0.01$ does_not_break_if_code_uses_quote_
get_code 👶 $+0.02$ does_not_fall_into_a_loop
get_code 👶 $+0.00$ does_not_ignore_occurrence_in_function_body_if_object_exsits_in_env
get_code 👶 $+0.01$ extracts_code_of_a_parent_binding_but_only_those_evaluated_before_coocurence
get_code 👶 $+0.04$ extracts_the_code_for_assign_where_x_is_a_literal_string
get_code 👶 $+0.00$ extracts_the_code_for_assign_where_x_is_variable
get_code 👶 $+0.02$ extracts_the_code_of_a_binding_from_character_vector_containing_simple_code
get_code 👶 $+0.01$ extracts_the_code_of_a_parent_binding_if_used_as_an_arg_in_a_function_call
get_code 👶 $+0.01$ extracts_the_code_when_using_
get_code 👶 $+0.01$ extracts_the_code_without_downstream_usage
get_code 💀 $0.01$ $-0.01$ get_call_data_call_is_returned_when_data_name_is_provided_as_character
get_code 💀 $0.01$ $-0.01$ get_call_returns_data_call_for_a_datanames_specified_asis
get_code 💀 $0.01$ $-0.01$ get_code_does_not_break_if_code_is_separated_by_
get_code 👶 $+0.01$ get_code_does_not_break_if_linksto_is_put_in_the_last_line
get_code 💀 $0.01$ $-0.01$ get_code_returns_result_of_length_1_for_non_empty_input
get_code 💀 $0.04$ $-0.04$ get_code_with_datanames_can_extract_the_code_for_assign_function
get_code 💀 $0.00$ $-0.00$ get_code_with_datanames_can_extract_the_code_for_assign_function_where_x_is_variable
get_code 💀 $0.02$ $-0.02$ get_code_with_datanames_can_extract_the_code_for_objects_assigned_with_data_function
get_code 💀 $0.01$ $-0.01$ get_code_with_datanames_can_extract_the_code_when_using_
get_code 💀 $0.01$ $-0.01$ get_code_with_datanames_detects_cooccurrence_properly_even_if_all_objects_are_on_rhs
get_code 💀 $0.01$ $-0.01$ get_code_with_datanames_detects_every_assign_calls_even_if_not_evaluated
get_code 💀 $0.01$ $-0.01$ get_code_with_datanames_detects_occurrence_of_the_function_object
get_code 💀 $0.02$ $-0.02$ get_code_with_datanames_does_not_fall_into_a_loop
get_code 💀 $0.00$ $-0.00$ get_code_with_datanames_does_not_ignore_occurrence_in_function_body_if_object_exsits_in_env
get_code 💀 $0.02$ $-0.02$ get_code_with_datanames_extracts_code_of_a_binding_from_character_vector_containing_simple_code
get_code 💀 $0.01$ $-0.01$ get_code_with_datanames_extracts_code_of_a_parent_binding_but_only_those_evaluated_before_coocurence
get_code 💀 $0.01$ $-0.01$ get_code_with_datanames_extracts_code_of_a_parent_binding_if_used_as_an_arg_in_fun_call
get_code 💀 $0.01$ $-0.01$ get_code_with_datanames_handles_code_without_symbols_in_RHS
get_code 💀 $0.04$ $-0.04$ get_code_with_datanames_handles_empty_code_slot
get_code 💀 $0.02$ $-0.02$ get_code_with_datanames_ignores_occurrence_in_function_definition
get_code 💀 $0.02$ $-0.02$ get_code_with_datanames_ignores_occurrence_in_function_definition_in_lapply
get_code 💀 $0.04$ $-0.04$ get_code_with_datanames_ignores_occurrence_in_function_definition_without_curly_brackets
get_code 💀 $0.01$ $-0.01$ get_code_with_datanames_is_possible_to_output_the_code_for_multiple_objects
get_code 💀 $0.01$ $-0.01$ get_code_with_datanames_returns_custom_function_calls_on_object
get_code 💀 $0.08$ $-0.08$ get_code_with_datanames_understands_usage_and_do_not_treat_rhs_of_as_objects_only_lhs_
get_code 💀 $0.01$ $-0.01$ get_code_with_datanames_warns_if_binding_doesn_t_exist_in_code
get_code 💀 $0.01$ $-0.01$ get_code_works_for_datanames_of_length_1
get_code 👶 $+0.04$ handles_empty_code_slot
get_code 👶 $+0.01$ handles_the_code_without_symbols_on_rhs
get_code 👶 $+0.02$ ignores_occurrence_in_a_function_definition
get_code 👶 $+0.02$ ignores_occurrence_in_a_function_definition_in_lapply
get_code 👶 $+0.04$ ignores_occurrence_in_function_definition_without_curly_brackets
get_code 💀 $0.01$ $-0.01$ lines_affecting_parent_evaluated_after_co_occurrence_are_not_included_in_get_code_with_datanamesoutput
get_code 💀 $0.02$ $-0.02$ lines_affecting_parent_evaluated_after_co_occurrence_are_not_included_in_get_code_with_datanamesoutput_when_using_linksto
get_code 👶 $+0.02$ lines_affecting_parent_evaluated_after_co_occurrence_are_not_included_in_output_when_using_linksto
get_code 👶 $+0.01$ returns_result_of_length_1_for_non_empty_input
get_code 👶 $+0.07$ understands_usage_and_do_not_treat_rhs_of_as_objects_only_lhs_
get_code 👶 $+0.01$ warns_if_binding_doesn_t_exist_in_code
get_code 👶 $+0.04$ works_for_assign_detection_no_matter_how_many_parametrers_were_provided_in_assignq_
get_code 👶 $+0.01$ works_for_datanames_of_length_1

Results for commit b70a424

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Jan 22, 2024

Unit Tests Summary

  1 files   14 suites   1s ⏱️
175 tests 173 ✅ 2 💤 0 ❌
243 runs  241 ✅ 2 💤 0 ❌

Results for commit 1cb250c.

♻️ This comment has been updated with latest results.

R/teal_data-get_code.R Outdated Show resolved Hide resolved
m7pr and others added 2 commits January 24, 2024 13:56
Co-authored-by: Dawid Kałędkowski <[email protected]>
Signed-off-by: Marcin <[email protected]>
@m7pr m7pr mentioned this pull request Jan 24, 2024
Closed
@m7pr m7pr changed the title 261 get_code for function definition and @linksto tag combination 261 multiple improvements to get_code function and it's documentation Jan 24, 2024
@chlebowa
Copy link
Contributor

@gogonzo As far I am concerned this is ready to merge. Unless you feel the docs require more work, please approve.

@m7pr
Copy link
Contributor Author

m7pr commented Jan 24, 2024

Hey @gogonzo any final words on this one?

This PR initially fixed issues catched at #261 but we also were able to do below during this PR

@chlebowa
Copy link
Contributor

this is ready to merge

Pending unit tests, of course.

@m7pr
Copy link
Contributor Author

m7pr commented Jan 24, 2024

on it

m7pr added 2 commits January 24, 2024 14:51
…call. fix_comments needs to be changed since it assumed first row contains comments that were suprisingly pushed from other call to another one. now fix_comments needs to verify two rows
@m7pr
Copy link
Contributor Author

m7pr commented Jan 24, 2024

Should be fixed with 3ef0707

This PR is an aggregator of multiple other PRs. It occurred one indepdent PR provided features that broke features provided independently in another one :)

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.

👍 time to go

@m7pr m7pr merged commit ca761c2 into main Jan 24, 2024
23 checks passed
@m7pr m7pr deleted the 261_get_code_fun_definition@main branch January 24, 2024 15:03
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.

[Bug]: get_code doesn't return dependencies of the lines with # @linksto
3 participants