-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
tm_g_regression
labels are no longer allowed out of bounds
#675
Conversation
Code Coverage Summary
Diff against main
Results for commit: 1e4e52e Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Unit Tests Summary 1 files 5 suites 0s ⏱️ Results for commit 1e4e52e. ♻️ This comment has been updated with latest results. |
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.
- Is the new encoding option necessary?
Doesn't hurt. I suppose some control may be called for, depending on the data. Then again, the app dev must set the value to suit the current dataset. But can that be avoided altogether? Can ggrepel
defaults be trusted? I would guess not.
- This could be implemented as an optional dependency
with if (requireNamespace("ggrepel", quietly) { } else { }
In practice it's never an optional dependency as ggmosaic depends directly on it (with Imports)
Dependency status in tmg
should reflect the package's role in tmg
lone, irrespective of its ties to other packages. With the current implementation ggrepel
shoudl be in Imports
.
However, an optional dependency is reasonable as only one module uses it, which is the rule of thumb in tmg
.
How about making the new argument default to NULL
and adding if (!requireNamespace("ggrepel", quietly) stop("please install ggrepel")
? It's less code and in line with other cases.
tm_g_regreesion
labels are no longer allowed out of boundstm_g_regression
labels are no longer allowed out of bounds
Co-authored-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com> Signed-off-by: André Veríssimo <211358+averissimo@users.noreply.github.com>
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.
👍
Looks good to me. I would only ask that you reorder argument checks to match the order of formal arguments and unify checks of 3-number arguments, e.g. alpha
and plot_width
.
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.
wrong button
The best way to unify the checks was to create a helper function. It ensures the structure across arguments and it's the easiest to read. note: The non-exported function is being tested directly as the package itself has few tests that won't allow to do it via public methods |
Unit Test Performance Difference
Additional test case details
Results for commit 253250f ♻️ This comment has been updated with latest results. |
Asking for a re-review as it's a big change ps. This could be applied to other functions during |
@chlebowa please ignore my previous comments since your approval. I've reverted the changes and did what you asked, these are the differences since (I'll create a new issue with my proposal of the |
Co-authored-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com> Signed-off-by: André Veríssimo <211358+averissimo@users.noreply.github.com>
…tions_process@pre-release@main * origin/pre-release@main: removed @nord tags and added return from shared_params missing comma 641 non exported functions (#680) pre-release vignettes review (#681) [skip roxygen] [skip vbump] Roxygen Man Pages Auto Update Standardise function titles similar to what we have in tmc (#691) [skip actions] Bump version to 0.2.16.9026 `tm_g_regression` labels are no longer allowed out of bounds (#675) [skip actions] Bump version to 0.2.16.9025 Remove the internal function `var_labels` in favour of `teal.data::col_labels` (#690) [skip actions] Bump version to 0.2.16.9024 Fix the silent error in `tm_a_pca` (#688)
Pull Request
Fixes #66
Changes description
ggrepel
to generate the labels for outlierstm_g_regression
and encoding panel for size of segmentReviewer considerations
if (requireNamespace("ggrepel", quietly) { <ggrepel> } else { <old behaviour> }
ggmosaic
depends directly on it (with Imports
)