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

silence intended UserWarnings in tests #3078

Closed
tv3141 opened this issue Jun 26, 2018 · 2 comments
Closed

silence intended UserWarnings in tests #3078

tv3141 opened this issue Jun 26, 2018 · 2 comments

Comments

@tv3141
Copy link
Contributor

tv3141 commented Jun 26, 2018

The testing logs contain hundreds of UserWarnings. The vast majority seems to be:

/home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/scitools_iris-2.1.0.dev0-py3.6.egg/iris/fileformats/_pyke_rules/compiled_krb/fc_rules_cf_fc.py:2029: 
UserWarning: Gracefully filling 'lat' dimension coordinate masked points

and

/home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/scitools_iris-2.1.0.dev0-py3.6.egg/iris/coords.py:1210: 
UserWarning: Collapsing a non-contiguous coordinate. Metadata may not be fully descriptive for 'latitude'.

Expected warnings that are intended should be silenced. As an example, Improver has a decorator that does this.

If there are no objections I will have a go at creating a pull request.

@pelson
Copy link
Member

pelson commented Jul 12, 2018

I think it is time that we considered silencing these warnings by default in all cases, TBH. Would you be interested in having a go at seeing what that actually looks like in practice? To be clear, I'm not suggesting we remove the warnings, I'm suggesting that they are silenced by default (like the standard DeprecationWarning in python).

@tv3141
Copy link
Contributor Author

tv3141 commented Jul 13, 2018

I can have a look at this. Do you prefer disabling UserWarnings only for testing, or in general?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants