Skip to content

Conversation

@pelson
Copy link
Member

@pelson pelson commented Oct 4, 2016

An alternative approach to #2133.

@pelson
Copy link
Member Author

pelson commented Oct 4, 2016

Please discuss this as part of #2133, rather than forking the conversation in this PR.

@marqh
Copy link
Member

marqh commented Oct 6, 2016

(unpinmpl) 
> python -s -m unittest iris.tests.integration.test_netcdf
Ran 20 tests in 2.010s
OK


(unpinmpl)
> python -s -m unittest iris.tests.test_netcdf
Ran 56 tests in 14.233s
OK

looking good to me :)

@marqh
Copy link
Member

marqh commented Oct 6, 2016

#2133 (comment)

@pelson
Copy link
Member Author

pelson commented Oct 6, 2016

Have updated this to behave consistently for all cases of attribute creation.

@marqh marqh self-assigned this Oct 7, 2016
@marqh
Copy link
Member

marqh commented Oct 7, 2016

@QuLogic in #2133 you requested that the test change be aimed at 1.10.x

My view is that this change is more suitable for Iris, explicitly controlling behaviour, rather than putting an 'ignore difference' pattern into our testing strategy.

Either of these would be slightly challenging to label a 'bugfix' but I feel more strongly about this one. whilst we are trying to preserve behaviour through changes in netcdf4-python, the result could be that people who already use a more up to date version of netcdf4-python than we test would see this as a behaviour change.

as such I'm not comfortable with pushing this to 1.10.x as a bug fix

please may you consider this and share with us your views on why it is so desirable to address this issue for iris 1.10?

thank you
mark

@marqh
Copy link
Member

marqh commented Oct 7, 2016

@pelson
I'm pretty happy with this change, please may we have a what's new entry for it?

thank you
mark

@pelson
Copy link
Member Author

pelson commented Oct 7, 2016

I now wish to make it clear that this is my preferred approach for addressing #2133 (comment). The behaviour change that this is addressing covers an untested netCDF4-python, and maintains the longstanding behaviour of Iris. With this change, Iris may make the following statement about saving of NetCDF attributes: "if you provide a string that cannot be encoded as ASCII, we will save it as an NC_STRING, otherwise we will save it as NC_CHAR in all cases".

Copy link
Member

@marqh marqh left a comment

Choose a reason for hiding this comment

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

ready to merge, from my p.o.v.

@pelson
Copy link
Member Author

pelson commented Oct 7, 2016

No tests were added or deleted in this PR simply because this is a "continuation of behaviour" change - essentially all functionality should continue as was originally intended at the time of writing the original functionality.

@marqh - if you are ready to merge, please merge. 👍

@marqh marqh merged commit 40d98c5 into SciTools:master Oct 7, 2016
@pelson pelson deleted the netcdf_unicode branch October 7, 2016 15:09
@QuLogic QuLogic added this to the v1.11 milestone Oct 8, 2016
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.

3 participants