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

Issue #446: Remove function delete_columns() #529

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

nikosbosse
Copy link
Contributor

@nikosbosse nikosbosse commented Dec 7, 2023

Description

This PR closes #446

We have a helper function delete_columns() that safely deletes columns from a data.table. Recent changes in data.table mean that you can attempt to delete a column that doesn't exist without an error. So this PR changes instances of delete_columns() with suppressWarnings(dt[, col := NULL])

Linting CI is currently failing since #511 that fixes the variable length is not yet merged.

Checklist

  • My PR is based on a package issue and I have explicitly linked it.
  • I have included the target issue or issues in the PR title as follows: issue-number: PR title
  • I have tested my changes locally.
  • I have added or updated unit tests where necessary.
  • I have updated the documentation if required.
  • I have built the package locally and run rebuilt docs using roxygen2.
  • My code follows the established coding standards and I have run lintr::lint_package() to check for style issues introduced by my changes.
  • I have added a news item linked to this PR.
  • I have reviewed CI checks for this PR and addressed them as far as I am able.

Copy link

codecov bot commented Dec 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d761257) 81.78% compared to head (a7d12d1) 81.72%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #529      +/-   ##
===========================================
- Coverage    81.78%   81.72%   -0.06%     
===========================================
  Files           20       20              
  Lines         1713     1702      -11     
===========================================
- Hits          1401     1391      -10     
+ Misses         312      311       -1     

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

@nikosbosse nikosbosse requested a review from seabbs December 11, 2023 11:05
Copy link
Contributor

@seabbs seabbs left a comment

Choose a reason for hiding this comment

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

LGTM (note I've been waiting on this to pass CI checks hence the delay in review)

@nikosbosse nikosbosse merged commit 5c3a1f4 into develop Dec 14, 2023
10 of 11 checks passed
@nikosbosse nikosbosse deleted the remove-delete_columns branch December 14, 2023 11:20
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.

2 participants