niosh-mining / obsplus

A Pandas-Centric ObsPy Expansion Pack
GNU Lesser General Public License v3.0
38 stars 8 forks source link

np.int Deprecation #226

Closed sboltz closed 3 years ago

sboltz commented 3 years ago

This PR addresses the pending deprecation of numpy.int. Changes should be backwards compatible, though IDEs that support type hints might flag the use of numpy.int as an unexpected type.

codecov-io commented 3 years ago

Codecov Report

Merging #226 (645552f) into master (5ccea18) will increase coverage by 0.01%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #226      +/-   ##
==========================================
+ Coverage   97.84%   97.85%   +0.01%     
==========================================
  Files          38       39       +1     
  Lines        4588     4616      +28     
  Branches      661      661              
==========================================
+ Hits         4489     4517      +28     
  Misses         44       44              
  Partials       55       55              
Flag Coverage Δ
unittests 97.85% <ø> (+0.01%) :arrow_up:

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

Impacted Files Coverage Δ
obsplus/constants.py 100.00% <ø> (ø)
obsplus/utils/waveforms.py 97.76% <ø> (ø)
obsplus/__init__.py 100.00% <0.00%> (ø)

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 5ccea18...645552f. Read the comment docs.

d-chambers commented 3 years ago

This looks good and should have very little effect on existing codes.

One question though, what is this warnings_output.txt that is getting a bunch of additions in the source control? It looks like something we should be ignoring. Also, why so many more additions with this change?

sboltz commented 3 years ago

One question though, what is this warnings_output.txt that is getting a bunch of additions in the source control? It looks like something we should be ignoring. Also, why so many more additions with this change?

Oh shoot. I didn't actually mean to commit that. The tests for obsplus currently spit out 4000+ warnings, so I had dumped them into a file to search for the issue I was trying to correct. Thoughts on the best way to walk that back?

d-chambers commented 3 years ago

Just remove it then push a new commit. When we merge we squash all the commits into one so there will be no record of it once it lands in master.

Now another thing (for another PR) is to address the warnings... I had it down to zero when we first released obsplus, any idea where they are coming from? There are probably just a few very noisy sources of warnings.

sboltz commented 3 years ago

Sounds good. It looks like the majority of them are deprecation warnings about np.object within the tables module and another about ipykernel. Not sure there's anything we can do about that right now except just wait for them to fix their code, unless we want to explicitly silence them.

I did notice another one that I can fix in this PR regarding np.float, though, so I'll go ahead and take care of that.