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

Fix for print when no dimension coordinate data #175

Merged
merged 1 commit into from
Mar 1, 2022

Conversation

davidhassell
Copy link
Contributor

Fixes #174

@davidhassell
Copy link
Contributor Author

(seems like I updated a joss bibtex date - by mistake? I'm not sure. We can let it go through and I'll sort it out with a commit afterwards ...)

@codecov
Copy link

codecov bot commented Feb 28, 2022

Codecov Report

Merging #175 (9a9180d) into master (140dc1b) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #175      +/-   ##
==========================================
+ Coverage   88.71%   88.72%   +0.02%     
==========================================
  Files         101      101              
  Lines       10805    10806       +1     
==========================================
+ Hits         9585     9587       +2     
+ Misses       1220     1219       -1     
Flag Coverage Δ
unittests 88.72% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cfdm/domain.py 95.68% <100.00%> (+0.51%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 140dc1b...9a9180d. Read the comment docs.

Copy link
Member

@sadielbartholomew sadielbartholomew left a comment

Choose a reason for hiding this comment

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

Perfect, thanks. Please merge.

In reviewing, I went to also check that deleting the data from any of the other constructs that take data wouldn't cause the __str__ output to error, and indeed they don't cause any issues (I checked for an auxiliary coordinate, field ancillary, cell measure and domain ancillary), so I agree with your identification that only the deletion of dimension coordinates' data caused issue (despite my issue write-up implying it could be a more general issue).

Still, if they aren't covered elsewhere, maybe we could add in some equivalent testing to the small block you added to 'test_Domain' under 'Test when dimension coordinate has no data' to cover those other constructs no having data? I can do that as a follow-up commit or PR, unless you want to add it in here?

@davidhassell
Copy link
Contributor Author

davidhassell commented Mar 1, 2022

Thanks, Sadie - let's do as you suggest in a follow up PR.

@davidhassell davidhassell merged commit 87813f9 into NCAS-CMS:master Mar 1, 2022
@davidhassell davidhassell added this to the 1.9.0.3 milestone Mar 4, 2022
@davidhassell davidhassell deleted the print-no-data branch November 14, 2022 09:01
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.

Field/domain print fails when dimension corodinate has no data
2 participants