-
Notifications
You must be signed in to change notification settings - Fork 80
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
refactor: a common interface for the set of operations shared between Table and PartitionedTableProxy #6162
base: main
Are you sure you want to change the base?
Conversation
@@ -68,7 +68,7 @@ | |||
# if we allow sphinx to generate type hints for signatures (default), it would make the generated doc cluttered and hard to read | |||
autodoc_typehints = 'none' | |||
autoclass_content = 'both' | |||
|
|||
autodoc_default_options = {'inherited-members': False} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have to see the rendered docs to have a view on this config.
py/server/deephaven/table.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I like where this is going. There are a few areas I have concerns on, but I don't have the data to assess or comment on:
- What do the rendered pydocs look like?
- I assume
TableOperations
will also be used inpydeephaven
. That is not illustrated here. Are you going to duplicate the code there, use a git symlink, create a new python package, etc. - There are a few methods that are not supported in some cases (e.g. see https://deephaven.io/core/docs/reference/table-operations/partitioned-tables/proxy/#available-methods). What is the plan? Do they get an unsupported exception if they are used? Do we do something else? etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't like how the docs were rewritten for the refactor. See below. This just sounds like two sets of docs were stacked on top of each other. It needs a rewording or something to make it ok. I'm sure we are not the first ones to deal with this, so I'm sure there are established strategies that are better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The underlying implementations of the operations are quite different between the client API and the server API. So what they can share is an abstract interface not a generic concrete class as written here. The ABC is useful to a certain degree but because the client and the server are not on parity with supported ops, we will need to add a number of 'NotImplemented' exceptions in the implementation classes. I feel the work belongs to the epic of achieving parity between the client and the server.
- The approach I think makes sense is to keep the non-shared methods as they are. This works with auto-completion and wouldn't surprise the users with an 'NotImplemented' exception at runtime
a1eda38
to
1acd511
Compare
Fixes #5233
Verified that auto complete still works correctly, static type check also works
pydocs is changed, not ideal but not sure if we can do better.