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

Create standard ABC for wrapped Java objects #1892

Closed
devinrsmith opened this issue Jan 26, 2022 · 2 comments
Closed

Create standard ABC for wrapped Java objects #1892

devinrsmith opened this issue Jan 26, 2022 · 2 comments
Assignees
Milestone

Comments

@devinrsmith
Copy link
Member

We need a standard interface that all python wrapped Java objects can implement to make it easier for downstream code to unwrap.

Currently, pyintegration/deephaven2/server/script_session/__init__.py / unwrap_to_java_type code looks like:

    if isinstance(object, deephaven2.table.Table):
        return object.j_table
    if isinstance(object, deephaven.Plot.figure_wrapper.FigureWrapper):
        return object.figure

As we wrap more types, a generic ABC for wrapped Java types would make this sort of logic much easier. For example:

    if isinstance(object, JavaWrappedABC):
        return object.j_object
@devinrsmith
Copy link
Member Author

Chatting w/ Jianfeng, maybe something like:

class DHWrappedABC(ABC):
    @property
    @abc.abstractmethod
    def j_object(self) -> JType:
        pass

jmao-denver added a commit to jmao-denver/deephaven-core that referenced this issue Feb 16, 2022
jmao-denver added a commit that referenced this issue Feb 16, 2022
@jmao-denver
Copy link
Contributor

closed by #1825

mofojed pushed a commit that referenced this issue Mar 28, 2024
Release notes https://github.com/deephaven/web-client-ui/releases/tag/v0.71.0

# [0.71.0](deephaven/web-client-ui@v0.70.0...v0.71.0) (2024-03-28)


### Bug Fixes

* Fixed re-export ([#1894](deephaven/web-client-ui#1894)) ([#1895](deephaven/web-client-ui#1895)) ([b49b506](deephaven/web-client-ui@b49b506))
* Invalid migration of legacy partitions ([#1892](deephaven/web-client-ui#1892)) ([96298f6](deephaven/web-client-ui@96298f6))


### Features

* Change autoclosing bracket behavior to beforeWhitespace ([#1905](deephaven/web-client-ui#1905)) ([80207f4](deephaven/web-client-ui@80207f4))
* Picker - Table support for key + label columns ([#1876](deephaven/web-client-ui#1876)) ([bfbf7b1](deephaven/web-client-ui@bfbf7b1))



Co-authored-by: deephaven-internal <66694643+deephaven-internal@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants