-
-
Notifications
You must be signed in to change notification settings - Fork 4
fix: decouple visual styling from tbl_hierarchical_rate_by_grade to prevent Cartesian join explosion #228
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
Open
Melkiades
wants to merge
62
commits into
main
Choose a base branch
from
js/fix-cartesian-join-explosion
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+536
−75
Open
fix: decouple visual styling from tbl_hierarchical_rate_by_grade to prevent Cartesian join explosion #228
Changes from 29 commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
0c9712f
fix: decouple visual styling from tbl_hierarchical_rate_by_grade to p…
Melkiades 2a4a0fa
fix: decouple visual styling from tbl_hierarchical_rate_by_grade to p…
Melkiades 6f13108
fix: add idempotency guard, robust metadata lookup, and double-call test
Melkiades 450e0dd
fix: add idempotency guard, robust metadata lookup, and double-call test
Melkiades 8becdc8
docs: update @details to match Find() lookup
Melkiades 9c30ff7
docs: update @details to match Find() lookup
Melkiades fc7795e
docs and md
Melkiades 02b4a8e
docs and md
Melkiades b23ab6d
snapshot
Melkiades ed63de6
snapshot
Melkiades 74c8419
fix: wrap bare string vars with all_of() in tbl_mmrm to silence tidys…
Melkiades c2d8a7e
fix: wrap bare string vars with all_of() in tbl_mmrm to silence tidys…
Melkiades 76f4c0b
fix: wrap bare string vars with all_of() in tbl_mmrm to silence tidys…
jszczypinski a71cc92
fix: wrap bare string vars with all_of() in tbl_mmrm to silence tidys…
jszczypinski 1bd231c
refactor: move add_grade_column() into tbl_hierarchical_rate_by_grade.R
jszczypinski 3b65517
refactor: move add_grade_column() into tbl_hierarchical_rate_by_grade.R
jszczypinski cc636c2
style: place @rdname directly above @export for add_grade_column
jszczypinski a8ca796
style: place @rdname directly above @export for add_grade_column
jszczypinski 25d76ee
Merge branch 'js/fix-cartesian-join-explosion' of github.com:insights…
Melkiades a594068
Merge branch 'js/fix-cartesian-join-explosion' of github.com:insights…
Melkiades 8307e4b
fix: wrap bare string vars with all_of() in tbl_mmrm to silence tidys…
Melkiades fd5912f
fix: wrap bare string vars with all_of() in tbl_mmrm to silence tidys…
Melkiades 6ebd3f1
refactor: move add_grade_column() into tbl_hierarchical_rate_by_grade.R
Melkiades 7f07717
refactor: move add_grade_column() into tbl_hierarchical_rate_by_grade.R
Melkiades 0985155
style: place @rdname directly above @export for add_grade_column
Melkiades 83afb76
style: place @rdname directly above @export for add_grade_column
Melkiades f6f6561
fix
Melkiades a74067c
fix
Melkiades 061b591
Merge branch 'js/fix-cartesian-join-explosion' of github.com:insights…
Melkiades 6f583c9
Merge branch 'js/fix-cartesian-join-explosion' of github.com:insights…
Melkiades 280fe3e
test: cover character grade with missing grade group levels (lines 16…
jszczypinski 48990aa
test: cover character grade with missing grade group levels (lines 16…
jszczypinski 0af0743
fix
Melkiades 004db2b
fix
Melkiades 9dbcb27
Merge branch 'main' into js/fix-cartesian-join-explosion
Melkiades 773da96
Merge branch 'main' into js/fix-cartesian-join-explosion
Melkiades 4d37232
Merge branch 'main' into js/fix-cartesian-join-explosion
Melkiades eb1dc20
Merge branch 'main' into js/fix-cartesian-join-explosion
Melkiades a0ebb77
Apply suggestion from @Melkiades
Melkiades d4b5b40
Apply suggestion from the reviewer
Melkiades e8125a5
Merge branch 'js/fix-cartesian-join-explosion' of github.com:insights…
Melkiades 3d5c5cc
Merge branch 'js/fix-cartesian-join-explosion' of github.com:insights…
Melkiades 937eca4
fix: use .data$label to resolve R CMD check NOTE
Melkiades 1e233a4
fix: use .data$label to resolve R CMD check NOTE
Melkiades 0a33d5f
fix snaps on local
Melkiades f5cc741
fix snaps on local
Melkiades 7122153
test: tighten assertions and add local_wide_snapshot() helper
Melkiades 12600ad
test: tighten assertions and add local_wide_snapshot() helper
Melkiades 359feaa
fix tests
Melkiades 649ca75
fix tests
Melkiades f98eccb
Merge branch 'main' into js/fix-cartesian-join-explosion
Melkiades d05454a
Merge branch 'main' into js/fix-cartesian-join-explosion
Melkiades f42c7e2
update tbl_hierarchical_rate_by_grade snapshots after main merge
Melkiades 92af30f
update tbl_hierarchical_rate_by_grade snapshots after main merge
Melkiades da0f144
add NEWS entry for add_grade_column() (#226)
Melkiades 8c7f6de
add NEWS entry for add_grade_column() (#226)
Melkiades ecd2958
Merge branch 'main' into js/fix-cartesian-join-explosion
Melkiades a6da1a5
snaps
Melkiades f45e9b3
Merge branch 'main' into js/fix-cartesian-join-explosion
Melkiades 939e500
Merge branch 'main' into js/fix-cartesian-join-explosion
Melkiades 76ef8f4
merge
Melkiades 56339db
address reviewer comments on PR #228
Melkiades File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # add_grade_column() errors when custom_info is missing | ||
|
|
||
| Code | ||
| add_grade_column(tbl) | ||
| Condition | ||
| Error in `add_grade_column()`: | ||
| ! No custom_info metadata found on the input table. | ||
| i Ensure the table was created with `tbl_hierarchical_rate_by_grade()`. | ||
|
|
||
| # add_grade_column() errors on non-gtsummary input | ||
|
|
||
| Code | ||
| add_grade_column(data.frame(x = 1)) | ||
| Condition | ||
| Error in `add_grade_column()`: | ||
| ! `x` must be a <gtsummary> object. | ||
|
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is added with
tbl_hierarchical_rate_by_grade()if it must be called also after any merging?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair question! They share the help page because add_grade_column() only works on output from tbl_hierarchical_rate_by_grade() — it reads the custom_info metadata that function stores. So they are tightly coupled, just called at different points in the pipeline. Added a paragraph to the docs explaining this relationship.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this graph describes the situation I think it should be a stand alone function:
flowchart LR %% Data Nodes and Functions A["1. Build Table<br>(tbl_hierarchical_rate_by_grade())"] B["2. Merge Tables (Optional)<br>(tbl_merge() / tbl_with_pools())"] C["3. Finalize Table<br>(add_grade_column())"] %% Data Flow A --> B B --> C A -->CIn any case please add a link/
@seealsofromtbl_with_pools()to the help page ofadd_grade_column().