Skip to content
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

Updated HiPS catalog support #308

Merged
merged 10 commits into from
Jul 23, 2021
Merged

Conversation

pkgw
Copy link
Contributor

@pkgw pkgw commented Jul 23, 2021

Overview

This PR supersedes #289, building on the improved foundation that I've been working on. Namely:

  • Unifying all modes to to use the "app" as the viewer backend
  • Here, adding foundational support for async operations

The async support turns out to require an extremely gross hack of the Jupyter kernel framework but I believe that the approach is fundamentally OK, if hacky and fragile.

Checklist

  • No test coverage :-(
  • No docs :-(

pkgw added 8 commits July 22, 2021 15:41
See the code for detailed comments. This feels extremely gross but it
seems to be working and I think it is actually a relatively good
approach to getting this to work.
Thankfully, Python's async framework makes it pretty straightforward to
wire up the message handling to support async operation. It only works
in Jupyter with our massive hack, but that's not Python's fault.
This is what all of the async work is building up to. In order to
populate HiPS catalogs on the fly, we *really* benefit from the async
framework because we have to roundtrip with the WWT frontend repeatedly.

This significantly builds on the work of @imbasimba in WorldWideTelescope#289, but builds
on the work I've been doing to unify everything with the "research app"
backend and these async foundations.
@codecov
Copy link

codecov bot commented Jul 23, 2021

Codecov Report

Merging #308 (1a240d9) into master (5c3bddd) will decrease coverage by 3.01%.
The diff coverage is 37.60%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #308      +/-   ##
==========================================
- Coverage   62.39%   59.38%   -3.02%     
==========================================
  Files          24       24              
  Lines        2295     2489     +194     
==========================================
+ Hits         1432     1478      +46     
- Misses        863     1011     +148     
Impacted Files Coverage Δ
pywwt/jupyter.py 0.00% <0.00%> (ø)
pywwt/layers.py 77.22% <46.37%> (-9.11%) ⬇️
pywwt/core.py 81.28% <50.00%> (-5.57%) ⬇️

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 5c3bddd...1a240d9. Read the comment docs.

@pkgw pkgw marked this pull request as ready for review July 23, 2021 19:45
@pkgw
Copy link
Contributor Author

pkgw commented Jul 23, 2021

YOLO.

@pkgw pkgw merged commit 66cde5d into WorldWideTelescope:master Jul 23, 2021
@pkgw pkgw deleted the catalog-hips-updated branch July 23, 2021 20:35
@pkgw pkgw mentioned this pull request Jul 23, 2021
@imbasimba
Copy link
Member

Interesting hack of the kernel :)

To make it less fragile, we should probably control the allowed versions of the kernel a bit more. At least adding a minimum version for the ipykernel. It did not work with my previous ipykernel (5.5.4), but upgrading to the latest version (6.3.1) seems to solve the problem. So somewhere inbetween this hack starts to work, probably at 6.0.

@pkgw
Copy link
Contributor Author

pkgw commented Sep 7, 2021

@imbasimba Yes, that's a good idea. I'm hoping that this approach won't turn into a maintenance nightmare, but that depends a bit on how the ipykernel code evolves :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants