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

Update deephaven-plugin to latest, fixed API breaking changes #47

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

niloc132
Copy link
Member

@niloc132 niloc132 commented Aug 10, 2023

I was unable to confirm that the tests are passing, there is no command in docs or CI files that show how to run them. We used python -m unittest discover test/deephaven to try to run them (without the deephaven suffix, there is a package shadowing issue from the empty __init__.py files that possibly should be removed?).

======================================================================
ERROR: test_basic_area (plot.express.plots.test_area.AreaTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/colin/workspace/deephaven-plugin-plotly-express/test/deephaven/plot/express/plots/test_area.py", line 24, in test_basic_area
    chart = dx.area(self.source, x="X", y="Y").to_dict(self.exporter)
  File "/home/colin/workspace/deephaven-plugin-plotly-express/src/deephaven/plot/express/deephaven_figure/DeephavenFigure.py", line 168, in to_dict
    return json.loads(self.to_json(exporter))
  File "/home/colin/workspace/deephaven-plugin-plotly-express/src/deephaven/plot/express/deephaven_figure/DeephavenFigure.py", line 194, in to_json
    return json.dumps(payload)
  File "/home/colin/.pyenv/versions/3.10.11/lib/python3.10/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/home/colin/.pyenv/versions/3.10.11/lib/python3.10/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/home/colin/.pyenv/versions/3.10.11/lib/python3.10/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/home/colin/.pyenv/versions/3.10.11/lib/python3.10/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type MagicMock is not JSON serializable

----------------------------------------------------------------------
Ran 1 test in 6.449s

We did verify that the changes work by using the current version of the plotly-express plugin and installing this wheel. The above failure looks legit, a mock maybe shouldn't be serializable, but I wasn't sure how this should go.

Copy link
Member

@mofojed mofojed left a comment

Choose a reason for hiding this comment

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

@jnumainville will need to take a look at the tests when he gets back on Monday. He's also working on wiring up the tests in CI (and putting plugins in a monorepo so we don't need to make updates across N repos for N plugins).

@devinrsmith devinrsmith merged commit 7ebbd97 into deephaven:main Aug 10, 2023
1 check passed
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.

3 participants