radio-astro-tools / spectral-cube

Library for reading and analyzing astrophysical spectral data cubes
http://spectral-cube.rtfd.org
BSD 3-Clause "New" or "Revised" License
95 stars 61 forks source link

WIP fix for 821: test spectral smooth on windows #823

Closed keflavich closed 2 years ago

keflavich commented 2 years ago

This is a WIP: no fix has been put in place, I just made the tests more granular so we can see where the failure occurs.

Sidenote: It was extremely difficult to set up the testing environment to enable me to debug this. I had to copy-paste line-by-line code from conftest.py and test_regrid to get the cubes put in place and then loaded. This is an immense headache and makes me hate working with pytest. Is there any sane way to interactively debug pytest-based functions?

codecov-commenter commented 2 years ago

Codecov Report

Merging #823 (30de5ea) into master (b4ff491) will increase coverage by 0.01%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #823      +/-   ##
==========================================
+ Coverage   77.93%   77.95%   +0.01%     
==========================================
  Files          24       24              
  Lines        5861     5861              
==========================================
+ Hits         4568     4569       +1     
+ Misses       1293     1292       -1     
Impacted Files Coverage Δ
spectral_cube/cube_utils.py 82.59% <0.00%> (+0.31%) :arrow_up:

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 b4ff491...30de5ea. Read the comment docs.

keflavich commented 2 years ago

This is an upstream error; the kernel is getting populated differently.

keflavich commented 2 years ago

OK this isn't an error at all. Our test needs fixing.

https://github.com/astropy/astropy/pull/13299

keflavich commented 2 years ago

I had to rebase this because I branched off the wrong branch, but tests passed; it should be good to go though.

On my local branch, I get an error: https://github.com/keflavich/spectral-cube/runs/6852738789?check_suite_focus=true#step:5:124 that is caused by an outdated doctestplus. I don't know why that affects me differently from master. There may be no solution if this is a real error, though, as it affects python3.6, which is no longer supported by pretty much anyone.