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

fixes bug in way SDC info is displayed via prettify_table #202

Conversation

jim-smith
Copy link
Contributor

@jim-smith jim-smith commented Mar 22, 2024

Bug arises due to the fact that prettify_table() use spaces to parse header data into column names
Problem then arise when values of a field have spaces in them - so erroneous columns are created.

Fixed by replacing spaces with underscores in column names.
In practice this does not affect the main output - just the display of the SDC 'masks' table to the user

notebooks.test.ipynb has a number of cells that show this fix in action.
Functionality is tested via an addition to the testing of prettify_table() in test_initial.py

Copy link

codecov bot commented Mar 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.63%. Comparing base (444209b) to head (6f7b561).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #202   +/-   ##
=======================================
  Coverage   99.63%   99.63%           
=======================================
  Files           9        9           
  Lines        1092     1093    +1     
=======================================
+ Hits         1088     1089    +1     
  Misses          4        4           

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

@mahaalbashir mahaalbashir merged commit 2d09424 into main Mar 28, 2024
6 checks passed
@mahaalbashir mahaalbashir deleted the 200-prettify_tablestringdata-messes-column-parsing-if-first-variable-value-has-spaces branch March 28, 2024 14:05
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.

prettify_tablestring(data): messes column parsing if first variable value has spaces
2 participants