Skip to content

Conversation

@maartenbreddels
Copy link
Collaborator

Description

This allows blocking a call, while still responding to widgets, which is useful for exporting figures, e.g.:

exp_plg = cubeviz.plugins['Export']
slice_plg = cubeviz.plugins['Slice']
# for wave in (6.0, 6.1, 6.2):
for wave in (5.5e-7, 7.0e-7, 1e-6):
    slice_plg.value = wave
    for viewer in exp_plg.viewer.choices:#[1:2]:
        exp_plg.viewer = viewer
        exp_plg.filename = f"export/slice_{wave}_{viewer}.png"
        print("saving to", exp_plg.filename)
        exp_plg.export(overwrite=True)#, block=True)

This requires an optional dependency on jupyter_ui_poll

If block=True is not passed, an error will be shown

@github-actions github-actions bot added the plugin Label for plugins common to multiple configurations label Nov 4, 2025
@kecnry kecnry added this to the 4.5 milestone Nov 11, 2025
@maartenbreddels maartenbreddels force-pushed the feat_blocking_export branch 2 times, most recently from bb615cf to 6ab8cad Compare November 25, 2025 16:27
@kecnry
Copy link
Member

kecnry commented Dec 2, 2025

143 and AssertionError: assert 'SpecutilsSpectrumParser' == 'FITSParser' errors are unrelated and should be random, so I'll try rerunning tests to see if we can get them passing.

@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

❌ Patch coverage is 53.33333% with 70 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.90%. Comparing base (40f6dbc) to head (552d653).
⚠️ Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
jdaviz/async_utils.py 54.65% 39 Missing ⚠️
jdaviz/configs/default/plugins/export/export.py 51.56% 31 Missing ⚠️

❌ Your patch check has failed because the patch coverage (53.33%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3868      +/-   ##
==========================================
- Coverage   88.28%   87.90%   -0.38%     
==========================================
  Files         198      203       +5     
  Lines       27241    27567     +326     
==========================================
+ Hits        24049    24233     +184     
- Misses       3192     3334     +142     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin Label for plugins common to multiple configurations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants