Create unit tests for get_x_y_annotation_columns#152
Open
stemangiola wants to merge 5 commits intomasterfrom
Open
Create unit tests for get_x_y_annotation_columns#152stemangiola wants to merge 5 commits intomasterfrom
stemangiola wants to merge 5 commits intomasterfrom
Conversation
Co-authored-by: mangiolastefano <mangiolastefano@gmail.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds comprehensive unit tests for get_x_y_annotation_columns to validate its behavior across various data scenarios.
- Introduces helper functions to generate basic and complex test datasets
- Covers empty, single-row, grouped, list, factor, numeric, real-world-like, and edge-case inputs
- Verifies output structure, column orientations, and annotation filtering
Comments suppressed due to low confidence (2)
tests/testthat/test-get_x_y_annotation_columns.R:66
- [nitpick] Test descriptions use mixed casing and phrasing. Standardize all
test_thatdescriptions (e.g., consistently start with the function name in backticks) for better readability.
test_that("get_x_y_annotation_columns handles complex data correctly", {
tests/testthat/test-get_x_y_annotation_columns.R:293
- Consider adding negative tests for invalid inputs (e.g., non-existent x, y, or abundance columns) to verify that the function raises appropriate errors.
})
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Updated the get_x_y_annotation_columns function to improve column orientation handling and ensure the abundance column is included in both orientations. - Refactored test cases to use the tidyHeatmap namespace and added tests for boolean row-specific annotations in rectangular data. - Improved test data creation for better clarity and consistency across various scenarios.
…-50e5' of https://github.com/stemangiola/tidyHeatmap into cursor/create-unit-tests-for-get-x-y-annotation-columns-50e5
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add unit tests for
get_x_y_annotation_columnsas a prerequisite for feature development.