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

Add support for rangemappingtable to handle non contiguous ranges (#5) #8

Conversation

inpowell
Copy link
Owner

Solves #5

@inpowell inpowell requested a review from PeterM74 August 19, 2024 23:46
@inpowell inpowell linked an issue Aug 19, 2024 that may be closed by this pull request
@inpowell inpowell force-pushed the 5-add-support-for-rangemappingtable-to-handle-non-contiguous-ranges branch from 60bf1de to cb51ca7 Compare August 19, 2024 23:48
@PeterM74
Copy link
Collaborator

Non-contiguous update working for me. I submitted a small update as it looks like one of the other updates added a warning to convert_tabular. Annoyingly this warning is one of the timed warnings that only appears once in a time period (as it disappeared when I ran the test again) so I imagine the warning disappeared when you ran the final tests on the PR. Checks are now passing without warnings.

ℹ Testing modulartabler
✔ | F W  S  OK | Context
✔ |          7 | cell_suppression [1.1s]                                                   
✔ |         38 | mapping_table                                                             
✔ |   1      5 | tables_long                                                               
───────────────────────────────────────────────────────────────────────────────────────────
Warning (test-tables_long.R:42:3): convert_tabular converts a semi-long table correctly
Use of .data in tidyselect expressions was deprecated in tidyselect 1.2.0.
ℹ Please use `".valname"` instead of `.data$.valname`
Backtrace:
     ▆
  1. └─modulartabler::convert_tabular(...) at test-tables_long.R:42:2
  2.   ├─dplyr::arrange(...) at modulartabler/R/tables_long.R:119:4
  3.   ├─dplyr::select(...)
  4.   └─dplyr:::select.data.frame(...)
  5.     └─tidyselect::eval_select(expr(c(...)), data = .data, error_call = error_call)
  6.       └─tidyselect:::eval_select_impl(...)
  7.         ├─tidyselect:::with_subscript_errors(...)
  8.         │ └─rlang::try_fetch(...)
  9.         │   └─base::withCallingHandlers(...)
 10.         └─tidyselect:::vars_select_eval(...)
 11.           └─tidyselect:::walk_data_tree(expr, data_mask, context_mask)
 12.             └─tidyselect:::eval_c(expr, data_mask, context_mask)
 13.               └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
 14.                 └─tidyselect:::walk_data_tree(new, data_mask, context_mask)
 15.                   └─tidyselect:::expr_kind(expr, context_mask, error_call)
 16.                     └─tidyselect:::call_kind(expr, context_mask, error_call)
───────────────────────────────────────────────────────────────────────────────────────────

══ Results ════════════════════════════════════════════════════════════════════════════════
Duration: 2.6 s

[ FAIL 0 | WARN 1 | SKIP 0 | PASS 50 ]

Copy link
Collaborator

@PeterM74 PeterM74 left a comment

Choose a reason for hiding this comment

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

Issue #5 fixed. Added optional fix to warning in convert_tabular()

@inpowell
Copy link
Owner Author

Hmm, unfortunately that change was required to fix an R CMD check NOTE -- this one... looks like neither of our solutions has been perfect.

@PeterM74
Copy link
Collaborator

Hmm, unfortunately that change was required to fix an R CMD check NOTE -- this one... looks like neither of our solutions has been perfect.

Damn, a good reminder to check the check properly! Thanks for catching, happy with this to be merged.

@inpowell inpowell merged commit 2a91a59 into master Aug 21, 2024
5 checks passed
@PeterM74 PeterM74 deleted the 5-add-support-for-rangemappingtable-to-handle-non-contiguous-ranges branch August 21, 2024 23:14
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.

Add support for RangeMappingTable to handle non-contiguous ranges
2 participants