Conversation
-Implemented `add_backticks` helper to wrap variable names containing spaces, fixing `numexpr` syntax errors -Updated `get_queries` to apply backticks to row and column identifiers -Removed obsolete string manipulation in `crosstab_with_totals`
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #321 +/- ##
==========================================
+ Coverage 99.76% 99.92% +0.16%
==========================================
Files 9 9
Lines 1253 1269 +16
==========================================
+ Hits 1250 1268 +18
+ Misses 3 1 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
for more information, see https://pre-commit.ci
|
Do we need a unit test to confirm this works and make sure nobody breaks it in the future? It would be nice to have type hints in all the functions to help readability and help confirm behaviour with mypy, but I see lots of them missing all over the code base (not just here) - @jim-smith that might be a good first task for someone - along with lots of refactoring and test improvements? |
…add tests for add_backticks and rounded_survival_table
for more information, see https://pre-commit.ci
- Added import for rounded_survival_table at module level (fixes PLC0415) - Added test_add_backticks() to test the backticks helper function - Added test_rounded_survival_table() to test survival table rounding - All tests pass with 99% coverage
Resolved merge conflict: kept top-level import for rounded_survival_table and removed inline import from test function.
|
@JessUWE I've approve and merged in the PR that provides a test for the rounded_survival_table() |
|
@JessUWE but the rest of the code is a sensible and better refactored handling of the issue this PR addresses |
…ble-names-contain-spaces
add_backtickshelper to wrap variable names containing spaces, fixingnumexprsyntax errorsget_queriesto apply backticks to row and column identifierscrosstab_with_totals