276 handle subassignemnts with the same object#277
Conversation
Unit Tests Summary 1 files 14 suites 6s ⏱️ Results for commit 3a6ece3. ♻️ This comment has been updated with latest results. |
Unit Test Performance DifferenceAdditional test case details
Results for commit d43ebd6 ♻️ This comment has been updated with latest results. |
…neering/teal.code into 276_subassignemnets
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the code dependency tracking functionality to properly handle subassignments in R (e.g., x[1] <- value, df$col <- data). The changes fix issues with duplicate handling in dependency extraction and add comprehensive test coverage for various subassignment patterns.
Key changes:
- Improved duplicate handling when moving elements in parentheses to the right-hand side of dependency graphs
- Fixed the
move_functions_after_arrowfunction to preserve duplicates and handle edge cases properly - Added 13 new test cases covering various subassignment scenarios including bracket indexing, nested assignments, and complex expressions
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| R/utils-get_code_dependency.R | Refactored duplicate handling logic in extract_occurrence and move_functions_after_arrow functions to properly track subassignments |
| tests/testthat/test-utils-get_code_dependency.R | Added comprehensive test suite for subassignment tracking with 13 test cases covering various patterns |
| DESCRIPTION | Updated RoxygenNote version from 7.3.2 to 7.3.3 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Code Coverage SummaryDiff against mainResults for commit: 3a6ece3 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>
llrs-roche
left a comment
There was a problem hiding this comment.
Great quick fix! The tests are long and cover many cases!
Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>
Fixes #276
now gives the second line