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

Improve the combination logic for overlaying an annotator #98

Merged
merged 16 commits into from
Apr 22, 2024

Conversation

hoxbro
Copy link
Member

@hoxbro hoxbro commented Apr 19, 2024

This will now make it easier to add across overlays and layouts.

image

Copy link

codspeed-hq bot commented Apr 19, 2024

CodSpeed Performance Report

Merging #98 will not alter performance

Comparing improve_combination (d772042) with main (95b4074)

Summary

✅ 6 untouched benchmarks

@hoxbro hoxbro requested a review from droumis April 19, 2024 13:22
Copy link
Member

@droumis droumis left a comment

Choose a reason for hiding this comment

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

Left some suggestions. Notably, handing rasterize-created dynamicmap alone or when in a layout.

holonote/annotate/annotator.py Show resolved Hide resolved
holonote/annotate/annotator.py Show resolved Hide resolved
holonote/annotate/annotator.py Outdated Show resolved Hide resolved
@hoxbro
Copy link
Member Author

hoxbro commented Apr 19, 2024

you are welcome to push to this PR. If you do please add test cases too.

return other * self.get_element(*other.kdims)
def _get_kdims_from_other_element(self, other):
if isinstance(other, hv.DynamicMap):
other = other.last if other.last is not None else other.callback()
Copy link
Member Author

Choose a reason for hiding this comment

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

I could imagine that other.callback() need some arguments and keyword arguments to work with streams etc.

@droumis
Copy link
Member

droumis commented Apr 22, 2024

Nice, looks good to me.

Nice to know about dmap.callback() hv.plotting.util.initialize_dynamic to activate dmap instead of hv.render and hv.opts._element_keywords("bokeh") to then filter for valid kwargs. Thanks!

@droumis droumis self-requested a review April 22, 2024 15:40
@hoxbro hoxbro merged commit d9ec31e into main Apr 22, 2024
17 checks passed
@hoxbro hoxbro deleted the improve_combination branch April 22, 2024 16:48
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