Skip to content

Chardata covcheck#7137

Draft
pp-mo wants to merge 4 commits into
SciTools:FEATURE_chardatafrom
pp-mo:chardata_covcheck
Draft

Chardata covcheck#7137
pp-mo wants to merge 4 commits into
SciTools:FEATURE_chardatafrom
pp-mo:chardata_covcheck

Conversation

@pp-mo

@pp-mo pp-mo commented Jun 5, 2026

Copy link
Copy Markdown
Member

Closes #6921

Addressing coverage holes noted there
Incomplete at present

Based on code for #7101, will rebase when that is in.

scitools-ci[bot]

This comment was marked as outdated.

@pp-mo pp-mo changed the base branch from main to FEATURE_chardata June 5, 2026 10:36
@pp-mo pp-mo dismissed scitools-ci[bot]’s stale review June 5, 2026 10:39

Change exists on parent branch, will no longer appear here when that is merged

@codecov

codecov Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.37%. Comparing base (eaf35e9) to head (5ca639f).

Files with missing lines Patch % Lines
...ib/iris/fileformats/netcdf/_bytecoding_datasets.py 78.57% 3 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##           FEATURE_chardata    #7137      +/-   ##
====================================================
+ Coverage             90.24%   90.37%   +0.13%     
====================================================
  Files                    92       92              
  Lines                 25151    25775     +624     
  Branches               4698     4901     +203     
====================================================
+ Hits                  22697    23294     +597     
- Misses                 1682     1691       +9     
- Partials                772      790      +18     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pp-mo pp-mo force-pushed the chardata_covcheck branch from 5ae84cb to 0862067 Compare June 9, 2026 09:53
Comment thread lib/iris/fileformats/cf.py Outdated
Comment on lines +1347 to +1352
# Turn off *any* automatic decoding in the underlying netCDF4 dataset
ds = self._dataset
if isinstance(ds, _thread_safe_nc.DatasetWrapper):
ds._contained_instance.set_auto_chartostring(False)
else:
ds.set_auto_chartostring(False)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I know that this was already merged in #7101 , but I've just realised: wouldn't it be better to implement set_auto_chartostring within _thread_safe_nc?

@trexfeathers trexfeathers Jun 9, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The idea was that no downstream code would ever need awareness of the kind of object it was handling - the wrapper objects should behave precisely identical.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Okay I'm now checking this out -- new code testing in CI...

Looking again, I think it might be worth making tests/units...test_bytecoding_datasets a bit more comprehensive.

Maybe don't merge until I've thought about this a bit more.

@pp-mo pp-mo force-pushed the chardata_covcheck branch 2 times, most recently from f913e70 to 5ca639f Compare June 9, 2026 11:50
@pp-mo pp-mo force-pushed the chardata_covcheck branch from 5ca639f to 2916ac9 Compare June 9, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Check coverage of chardata handling code + purge unreachable

2 participants