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

names<- retains sorting attributes #5849

Merged
merged 3 commits into from
Dec 22, 2023
Merged

names<- retains sorting attributes #5849

merged 3 commits into from
Dec 22, 2023

Conversation

MichaelChirico
Copy link
Member

@MichaelChirico MichaelChirico commented Dec 21, 2023

Follow up to #5084
Related to #5085
Closes #5125
Closes #5126
Closes #5127
Closes #5128

Minimized successor to #5133. That PR has a lot going on that I don't follow -- for now I'm focused on fixing the broken revdeps so we can release to CRAN.

I've confirmed {CornerstoneR}, {maditr}, {getDTeval}, and {chicane} have no test failures after this fix.

Revdep {simDAG} (as noted here: #5128 (comment)) had 5 errors, this PR removes the 2 related to attributes. The remaining three are covered by #5680.

Copy link

codecov bot commented Dec 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6782251) 97.46% compared to head (bb70dd6) 97.47%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5849   +/-   ##
=======================================
  Coverage   97.46%   97.47%           
=======================================
  Files          80       80           
  Lines       14822    14823    +1     
=======================================
+ Hits        14447    14448    +1     
  Misses        375      375           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jangorecki

This comment was marked as resolved.

@@ -18111,3 +18111,11 @@ test(2238.9, NA %notin% c(1:5, NA), FALSE)

# shift actionable error on matrix input #5287
test(2239.1, shift(matrix(1:10, ncol = 1)), error="consider wrapping")

# names<- retains index and key, #5125, #5126, #5126, #5128
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work.
Could we add rest of unit tests added in #5133?
If some of them fails then possibly comment them out with explanation. So we have clarity what from #5133 is being covered.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea. I skipped originally bc I wasn't sure whether output change tests are worth copying.

I'll read more carefully and copy over the worthwhile tests.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, copied over the tests. They caught two things:

  1. colnames(x) <- is now treated the same a names(x) <-. Requires a new S3 method registration.
  2. Doing names(x) <- "..."; set(x, j=j, val=val) is fixed with a simple setalloccol(). Maybe not ideal, but a good expedient.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any tests being commented out. Does it mean we cover all tests from Matt's PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jangorecki jangorecki added this to the 1.15.0 milestone Dec 21, 2023
@MichaelChirico

This comment was marked as off-topic.

@MichaelChirico

This comment was marked as off-topic.

@MichaelChirico
Copy link
Member Author

Will go ahead and merge, but it would be helpful if some of the commenters on the original PR #5133 (@ben-schwen @ColeMiller1) could chime in on whether we're leaving something on the table vs. the original intent of that PR, in other words, what should we target as follow-up to achieve the original goals of #5133? Or should we consider the matter resolved & close that PR too?

@MichaelChirico MichaelChirico merged commit 78dee17 into master Dec 22, 2023
5 checks passed
@MichaelChirico MichaelChirico deleted the names-retain-key branch December 22, 2023 17:06
This was referenced Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

revdep maditr affected revdep getDTeval affected revdep CornerstoneR affected revdep chicane affected
2 participants