notebooks icon indicating copy to clipboard operation
notebooks copied to clipboard

Un-exclude interm_tesscut_dss_overlay

Open eteq opened this issue 6 years ago • 17 comments
trafficstars

This is a test PR to see if taking interm_tesscut_dss_overlay out of the exclude list now allows the tests to pass. The origin of this problem was initially confusing, and at the very least maybe the update log here will help diagnose it? We shall see what the tests show...

eteq avatar Mar 20 '19 06:03 eteq

seems convert got caught up on align_multiple_visits

astro-josh avatar Mar 20 '19 13:03 astro-josh

@samanthalh , can you think of why the PNG to be renamed is non-existent in the DrizzlePac notebook? Please advise, thanks.

FileNotFoundErrorTraceback (most recent call last)
<ipython-input-7-7a75d58f34ed> in <module>
      1 #Give the 'fit residual plots' a unique name for comparison with other tests.
      2 
----> 3 os.rename('residuals_j9irw5kaq_flc.png','residuals_j9irw5kaq_flc_default.png')
      4 Image(filename='residuals_j9irw5kaq_flc_default.png', width=500, height=600)

FileNotFoundError: [Errno 2] No such file or directory: 'residuals_j9irw5kaq_flc.png' -> 'residuals_j9irw5kaq_flc_default.png'

pllim avatar Mar 20 '19 14:03 pllim

Oh, wait, that is from a DrizzlePac notebook! Sorry for the noise, @ceb8 !

pllim avatar Mar 20 '19 14:03 pllim

@pllim Glad to hear! Was going crazy not being able to find that code in the notebook.

ceb8 avatar Mar 20 '19 14:03 ceb8

@pllim, that PNG should be output by TweakReg in a previous cell. So either TweakReg isn't running for some reason or it's saving that file in a strange place that then cannot be found by the os command.

Nothing has changed about the notebook, so I can only guess that this is a difference between Travis and this new ci/circleci that is apparently now being used. I have no idea about why that would matter, though, so you'll have to ask @eteq or one of the other repo maintainers.

samanthalh avatar Mar 20 '19 14:03 samanthalh

Talking about TweakReg, @mcara , any ideas?

pllim avatar Mar 20 '19 14:03 pllim

@pllim, I really do think that it's a GitHub issue and not something going wrong with TweakReg, although of course I'd be glad to hear @mcara weigh in on the issue.

samanthalh avatar Mar 20 '19 14:03 samanthalh

I remember that we had some issues with paths that would work when individuals ran the notebook but failed when the CI tried to when we were submitting these the first time around - is it possible that os.rename() didn't rename the file? Maybe place a test line in the notebook about whether 'residuals_j9irw5kaq_flc.png' exists would help suss out whether it's TweakReg or the os.rename() function causing the issue?

If it is an issue with os.rename() then it may be necessary to add in some of the absolute path finagling we did before.

A second idea may be something similar to what we struggled with in https://github.com/spacetelescope/notebooks/pull/34 where we had to specify the input list for the output files of TweakReg to be named as expected?

catherine-martlin avatar Mar 20 '19 14:03 catherine-martlin

According to @mcara, /root/repo/notebooks/DrizzlePac/align_multiple_visits/tweakreg.log should give more ideas on what happened. @obviousrebel , how do I get that artifact out of CircleCI?

pllim avatar Mar 20 '19 16:03 pllim

I do not see any obvious issues with tweakreg itself. One thing to check is to look at the log file and see which of the input images was chosen as a reference image. IF j9irw5kaq_flc.fits was chosen as a reference image - this could cause the plots for it to not be created. By default tweakreg chooses the first input image as a reference image. So, could it be that on your test machine the input file list is in a different order compared to other machines? Just an idea to check.

mcara avatar Mar 20 '19 16:03 mcara

Try sorting input file list to ensure the same order. See if this helps improve consistency.

mcara avatar Mar 20 '19 16:03 mcara

Good point, Mihai! https://stackoverflow.com/questions/6773584/how-is-pythons-glob-glob-ordered

pllim avatar Mar 20 '19 17:03 pllim

@pllim Artifacts can be viewed here. At the top of the page you can navigate through the directories. In that folder, there are two pngs named residuals_j9irw3fwq_flc.png and residuals_j9irw4b1q_flc.png.

tweakreg log file

astro-josh avatar Mar 20 '19 17:03 astro-josh

Bingo, Mihai wins: reference image 'j9irw5kaq_flc.fits'

pllim avatar Mar 20 '19 17:03 pllim

I am trying to fix the TweakReg thingy over at #78.

pllim avatar Mar 20 '19 18:03 pllim

@eteq , if you rebase, the DrizzlePac error will not bother this PR anymore.

pllim avatar Mar 21 '19 13:03 pllim

This probably need a rebase and see if CI would still pass.

pllim avatar Sep 19 '19 19:09 pllim