Skip to content

✨ register plotly-resampler #70

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

Merged
merged 34 commits into from
Jun 17, 2022
Merged

✨ register plotly-resampler #70

merged 34 commits into from
Jun 17, 2022

Conversation

jvdd
Copy link
Member

@jvdd jvdd commented Jun 9, 2022

This PR has the following contributions;


Other minor changes

  • move & extend utils.py + add tests

@jvdd jvdd requested a review from jonasvdd June 9, 2022 09:56
@jvdd jvdd marked this pull request as draft June 9, 2022 09:59
@jonasvdd jonasvdd self-assigned this Jun 9, 2022
@jonasvdd jonasvdd added the enhancement New feature or request label Jun 9, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jun 10, 2022

Codecov Report

Merging #70 (59c70ab) into main (0fda64c) will decrease coverage by 0.35%.
The diff coverage is 98.54%.

@@            Coverage Diff             @@
##             main      #70      +/-   ##
==========================================
- Coverage   98.47%   98.11%   -0.36%     
==========================================
  Files           9       10       +1     
  Lines         589      743     +154     
==========================================
+ Hits          580      729     +149     
- Misses          9       14       +5     
Impacted Files Coverage Δ
plotly_resampler/__init__.py 71.42% <60.00%> (-28.58%) ⬇️
...tly_resampler/figure_resampler/figure_resampler.py 90.00% <100.00%> (+1.36%) ⬆️
...ler/figure_resampler/figure_resampler_interface.py 99.70% <100.00%> (+0.07%) ⬆️
...sampler/figure_resampler/figurewidget_resampler.py 98.94% <100.00%> (+0.07%) ⬆️
plotly_resampler/figure_resampler/utils.py 100.00% <100.00%> (ø)
plotly_resampler/registering.py 100.00% <100.00%> (ø)

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 0fda64c...59c70ab. Read the comment docs.

@jonasvdd
Copy link
Member

What also seems a cool feature is having the option to set register_express to always wrap with a FigureWidget or a|FigureResampler.

For example, when you work in vscode notebooks, it is rather convenient to always work with a figurewidget!

@jonasvdd jonasvdd mentioned this pull request Jun 12, 2022
5 tasks
@jonasvdd
Copy link
Member

fyi: I would opt to not override the default show behavior of the figures.

Calling show on both the FigureResampler and FigureWidgetResampler returns a static figure,

@jvdd jvdd marked this pull request as ready for review June 15, 2022 21:39
if figure is None:
figure = go.Figure()
if not is_figure(figure): # TODO: does this make sense?
figure = go.Figure(figure)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs some profiling before we decide whether this will be done.

I think you should first check whether the object is a FigureAggregator instance, otherwise it will most likely loose the current _hf_data properties

Copy link
Member

@jonasvdd jonasvdd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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

Successfully merging this pull request may close these issues.

3 participants