WorldWideTelescope / toasty

Break large images into "tile pyramids", with a focus on the all-sky TOAST format.
https://toasty.readthedocs.io/
MIT License
0 stars 4 forks source link

Add tunneled "view" capability #87

Closed pkgw closed 2 years ago

pkgw commented 2 years ago

Scratching a personal itch: this adds a -t option to the toasty view command that makes it work on remote hosts! It will automatically do all of the SSH magic to get the right thing to happen.

The trickiest part here was getting it so that the remote HTTP server would shut down reliably. As far as I can tell, the best way to do that is by having it periodically print out messages to stdout, which will raise EPIPE if/when the connection drops. This is the new --heartbeat option added to wwtdatatool serve.

I don't see how we're going to make this testable automatically, so ... sorry.

pkgw commented 2 years ago

@Carifio24 If you have the chance, would you be able to give this a review?

codecov[bot] commented 2 years ago

Codecov Report

Merging #87 (7b8e89b) into master (9c49c5c) will decrease coverage by 1.94%. The diff coverage is 4.90%.

@@            Coverage Diff             @@
##           master      #87      +/-   ##
==========================================
- Coverage   77.34%   75.39%   -1.95%     
==========================================
  Files          23       23              
  Lines        3703     3804     +101     
==========================================
+ Hits         2864     2868       +4     
- Misses        839      936      +97     
Impacted Files Coverage Δ
toasty/cli.py 64.30% <4.90%> (-16.13%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Carifio24 commented 2 years ago

@pkgw Sure! I'll let you know if I have any questions.

Carifio24 commented 2 years ago

So after getting SSH connection sharing set up (had never played with that before), this seems to be working for me between my laptop and desktop (including the wwtdatatool process being shut down on the remote machine when I terminate locally). Very cool!

I was using a FITS image that I happened to have (a W5 image that's used in some glue examples). Do you have any suggestions for some other good test cases (or where I could find them)? I'd like to try this out with a few more examples.

pkgw commented 2 years ago

There are a few more example files in https://github.com/WorldWideTelescope/pywwt-notebooks/tree/master/data . I don't think I have a big example file handy, though.

pkgw commented 2 years ago

Docs build failing due to an expired certificate for dotnetfoundation.org, and Codecov is completely right but we're going to plunge on ahead anyway.