finos / perspective

A data visualization and analytics component, especially well-suited for large and/or streaming datasets.
https://perspective.finos.org/
Apache License 2.0
7.72k stars 1.04k forks source link

Fix incorrect WebSocket example in Python documentation #2599

Closed Somi2002 closed 2 months ago

Somi2002 commented 2 months ago

Description of Issue

The Python documentation on the Perspective website provided an incorrect WebSocket example under the Tornado section. The example had a few critical issues:

These errors would cause confusion for users trying to implement Perspective with Tornado WebSockets, as the provided code would not function as intended.

Solution

This pull request addresses the issues by correcting the example code. Here are the specific changes made:

Testing the Fix

To test the fix, I set up a local Tornado server using the corrected code and verified that the WebSocket connection was established successfully and the Perspective viewer loaded and displayed data as expected.

These corrections ensure that the example provided in the documentation is accurate and functional, thus improving the reliability of the documentation and helping prevent implementation issues for future users.

texodus commented 2 months ago

@Somi2002 Thanks for the PR!

This example is indeed broken, but this PR does not fix it - and it also changes the behavior to use a slower path for loading (via .to_json()). Additionally, Perspective now requires DCO signoff via the -s commit flag for all PRs.

Ergo, closing - we'll fix this in the 2.10.1 release.