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

Mission "clean test logs" - handles all kind of userwarnings/deprecation warnings #1888

Merged
merged 21 commits into from Sep 22, 2017

Conversation

Projects
None yet
3 participants
@barsch
Member

barsch commented Sep 13, 2017

WIP

@barsch barsch added this to the 1.1.0 milestone Sep 13, 2017

@barsch barsch requested a review from megies Sep 13, 2017

@megies

This comment has been minimized.

Show comment
Hide comment
@megies

megies Sep 13, 2017

Member

This is such a pain to fix, I know. Awesome that you're working on it.

I think at some point we need some check that makes sure no PR adds any more of such crap stdout output..

Maybe we could in CI use something like the following to make sure about this:

$ obspy-runtests ... 2>&1 | tee /tmp/obspy-runtests.txt
$ grep ... && exit 1
Member

megies commented Sep 13, 2017

This is such a pain to fix, I know. Awesome that you're working on it.

I think at some point we need some check that makes sure no PR adds any more of such crap stdout output..

Maybe we could in CI use something like the following to make sure about this:

$ obspy-runtests ... 2>&1 | tee /tmp/obspy-runtests.txt
$ grep ... && exit 1
@barsch

This comment has been minimized.

Show comment
Hide comment
@barsch

barsch Sep 14, 2017

Member

IMHO good to review

two remaining issues:

  1. UserWarning which I can't reproduce on Windows:

    /home/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/obspy/io/xseed/parser.py:1374: UserWarning: Epoch TW.TATO..BHE [1994-10-01T00:00:00.000000Z - 2599-12-31T23:59:59.000000Z]: Response stage 7 does not end with blockette 58. Proceed at your own risk.
    
      warnings.warn(_epoch_warn_msg(msg))
    

    see https://travis-ci.org/obspy/obspy/jobs/275014003

  2. something related to Imgur? which I also can't reproduce

    C:\Miniconda36-x64\envs\test\lib\socket.py:657: ResourceWarning: unclosed <socket.socket fd=2988, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.1.104', 1083), raddr=('151.101.184.193', 443)>
      self._sock = None
    

    see https://ci.appveyor.com/project/obspy/obspy/build/1.0.5146-master/job/xpj9cfn2a2t5wxuw

Member

barsch commented Sep 14, 2017

IMHO good to review

two remaining issues:

  1. UserWarning which I can't reproduce on Windows:

    /home/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/obspy/io/xseed/parser.py:1374: UserWarning: Epoch TW.TATO..BHE [1994-10-01T00:00:00.000000Z - 2599-12-31T23:59:59.000000Z]: Response stage 7 does not end with blockette 58. Proceed at your own risk.
    
      warnings.warn(_epoch_warn_msg(msg))
    

    see https://travis-ci.org/obspy/obspy/jobs/275014003

  2. something related to Imgur? which I also can't reproduce

    C:\Miniconda36-x64\envs\test\lib\socket.py:657: ResourceWarning: unclosed <socket.socket fd=2988, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.1.104', 1083), raddr=('151.101.184.193', 443)>
      self._sock = None
    

    see https://ci.appveyor.com/project/obspy/obspy/build/1.0.5146-master/job/xpj9cfn2a2t5wxuw

barsch and others added some commits Sep 13, 2017

prevents DeprecationWarning: object of type <class 'numpy.float64'>
cannot be safely interpreted as an integer.
removes old python 2.6 workarounds ...
I hope I didn't break anything ...
@krischer

This comment has been minimized.

Show comment
Hide comment
@krischer

krischer Sep 20, 2017

Member

I rebased on master and fixed the first warning, which I could reproduce.

I also cannot reproduce the second one:

something related to Imgur? which I also can't reproduce

C:\Miniconda36-x64\envs\test\lib\socket.py:657: ResourceWarning: unclosed <socket.socket fd=2988, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.1.104', 1083), raddr=('151.101.184.193', 443)>
self._sock = None

see https://ci.appveyor.com/project/obspy/obspy/build/1.0.5146-master/job/xpj9cfn2a2t5wxuw

Member

krischer commented Sep 20, 2017

I rebased on master and fixed the first warning, which I could reproduce.

I also cannot reproduce the second one:

something related to Imgur? which I also can't reproduce

C:\Miniconda36-x64\envs\test\lib\socket.py:657: ResourceWarning: unclosed <socket.socket fd=2988, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.1.104', 1083), raddr=('151.101.184.193', 443)>
self._sock = None

see https://ci.appveyor.com/project/obspy/obspy/build/1.0.5146-master/job/xpj9cfn2a2t5wxuw

@barsch

This comment has been minimized.

Show comment
Hide comment
@barsch

barsch Sep 22, 2017

Member

good to merge?

Member

barsch commented Sep 22, 2017

good to merge?

@megies

megies approved these changes Sep 22, 2017

Still don't see why all the raw literal string classifiers are needed, i don't see that they change things..?

Otherwise looks good to me (the one fail and error are due to local files in working dir, can be ignored):

......................................................................................................................................................................................................................................ssss................................F.............................................................................................sss.........................sss........................................................E................................................................................................................ EVRESP ERROR (... [File: <stdin>; Start date: ; Stage: 2]):
	check_channel; units mismatch between stages,
	skipping to next response now
......................ss..........................................s...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ssss...................................................................................................................................................................................................................................................................................................................................................................s.......s..s.....s...................

I still think it would be a good idea to add a regex check of stdout of obspy-runtests call during CI. Otherwise the test output is bound to get cluttered again with PRs coming in..

@barsch barsch merged commit 027802c into master Sep 22, 2017

2 of 4 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
docker-testbot docker testbot results not available yet
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@barsch barsch deleted the warnings branch Sep 22, 2017

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