perspective-python 3.5.0__tar.gz → 3.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {perspective_python-3.5.0 → perspective_python-3.6.0}/Cargo.toml +3 -3
- {perspective_python-3.5.0 → perspective_python-3.6.0}/LICENSE_THIRDPARTY_cargo.yml +2 -2
- {perspective_python-3.5.0 → perspective_python-3.6.0}/PKG-INFO +1 -1
- {perspective_python-3.5.0 → perspective_python-3.6.0}/package.json +1 -1
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/__init__.py +1 -1
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/server/test_session.py +20 -1
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_table_limit.py +13 -1
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/widget/__init__.py +23 -13
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/widget/viewer/viewer.py +57 -24
- {perspective_python-3.5.0/perspective_python-3.5.0.data → perspective_python-3.6.0/perspective_python-3.6.0.data}/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/package.json +2 -2
- perspective_python-3.6.0/perspective_python-3.6.0.data/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/static/253.fe1069a8682a4d13f5aa.js +16 -0
- perspective_python-3.5.0/perspective_python-3.5.0.data/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/static/remoteEntry.95ac9fdafa3fe8016ef5.js → perspective_python-3.6.0/perspective_python-3.6.0.data/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/static/remoteEntry.4fbf018371a71a17accb.js +1 -1
- {perspective_python-3.5.0 → perspective_python-3.6.0}/pyproject.toml +1 -1
- {perspective_python-3.5.0 → perspective_python-3.6.0}/src/client/client_sync.rs +2 -44
- {perspective_python-3.5.0 → perspective_python-3.6.0}/src/client/mod.rs +1 -0
- perspective_python-3.6.0/src/client/proxy_session.rs +78 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/src/lib.rs +4 -3
- perspective_python-3.5.0/perspective_python-3.5.0.data/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/static/253.991288b24622545dd015.js +0 -16
- {perspective_python-3.5.0 → perspective_python-3.6.0}/LICENSE.md +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/README.md +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/bench/__init__.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/bench/runtime/__init__.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/bench/runtime/bench.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/bench/runtime/perspective_benchmark.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/bench/runtime/run_perspective_benchmark.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/bench/tornado/__init__.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/bench/tornado/async_server.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/bench/tornado/bench.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/bench/tornado/distributed_mode.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/bench/tornado/server/new_api.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/bench/tornado/server/old_api.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/bench/tornado/server_mode.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/build.rs +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/docs/client/to_pandas.md +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/docs/client/to_polars.md +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/docs/index.html +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/docs/lib.md +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/extension/finos-perspective-nbextension.json +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/handlers/__init__.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/handlers/aiohttp.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/handlers/starlette.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/handlers/tornado.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/templates/exported_widget.html.template +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/__init__.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/async/test_async_client.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/async/test_websocket_client.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/conftest.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/core/__init__.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/core/test_async.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/multi_threaded/__init__.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/multi_threaded/test_multi_threaded.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/server/__init__.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/server/test_server.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/__init__.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/arrow/date32.arrow +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/arrow/date64.arrow +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/arrow/dict.arrow +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/arrow/dict_update.arrow +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/arrow/int_float_str.arrow +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/arrow/int_float_str_file.arrow +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/arrow/int_float_str_update.arrow +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/object_sequence.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_delete.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_exception.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_leaks.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_ports.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_remove.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_table.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_table_arrow.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_table_datetime.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_table_infer.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_table_numpy.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_table_pandas.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_table_polars.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_to_arrow.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_to_arrow_lz4.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_to_format.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_to_polars.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_update.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_update_arrow.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_update_pandas.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_view.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_view_expression.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/test_dependencies.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/viewer/__init__.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/viewer/test_viewer.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/widget/__init__.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/widget/test_widget.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/widget/test_widget_pandas.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/widget/viewer/__init__.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/widget/viewer/validate.py +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/widget/viewer/viewer_traitlets.py +0 -0
- {perspective_python-3.5.0/perspective_python-3.5.0.data → perspective_python-3.6.0/perspective_python-3.6.0.data}/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/install.json +0 -0
- /perspective_python-3.5.0/perspective_python-3.5.0.data/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/static/253.991288b24622545dd015.js.LICENSE.txt → /perspective_python-3.6.0/perspective_python-3.6.0.data/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/static/253.fe1069a8682a4d13f5aa.js.LICENSE.txt +0 -0
- {perspective_python-3.5.0/perspective_python-3.5.0.data → perspective_python-3.6.0/perspective_python-3.6.0.data}/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/static/985.557fd483696e70b69ab8.js +0 -0
- {perspective_python-3.5.0/perspective_python-3.5.0.data → perspective_python-3.6.0/perspective_python-3.6.0.data}/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/static/style.js +0 -0
- {perspective_python-3.5.0/perspective_python-3.5.0.data → perspective_python-3.6.0/perspective_python-3.6.0.data}/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/static/third-party-licenses.json +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/src/client/client_async.rs +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/src/client/pandas.rs +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/src/client/polars.rs +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/src/client/pyarrow.rs +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/src/client/table_data.rs +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/src/client/update_data.rs +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/src/py_err.rs +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/src/server/mod.rs +0 -0
- {perspective_python-3.5.0 → perspective_python-3.6.0}/src/server/server_sync.rs +0 -0
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
[package]
|
|
14
14
|
name = "perspective-python"
|
|
15
|
-
version = "3.
|
|
15
|
+
version = "3.6.0"
|
|
16
16
|
edition = "2024"
|
|
17
17
|
description = "A data visualization and analytics component, especially well-suited for large and/or streaming datasets."
|
|
18
18
|
repository = "https://github.com/finos/perspective"
|
|
@@ -60,8 +60,8 @@ pyo3-build-config = "0.22.6"
|
|
|
60
60
|
python-config-rs = "0.1.2"
|
|
61
61
|
|
|
62
62
|
[dependencies]
|
|
63
|
-
perspective-client = { version = "3.
|
|
64
|
-
perspective-server = { version = "3.
|
|
63
|
+
perspective-client = { version = "3.6.0" }
|
|
64
|
+
perspective-server = { version = "3.6.0" }
|
|
65
65
|
macro_rules_attribute = "0.2.0"
|
|
66
66
|
async-lock = "2.5.0"
|
|
67
67
|
pollster = "0.3.0"
|
|
@@ -2905,14 +2905,14 @@ third_party_libraries:
|
|
|
2905
2905
|
|
|
2906
2906
|
END OF TERMS AND CONDITIONS
|
|
2907
2907
|
- package_name: perspective-client
|
|
2908
|
-
package_version: 3.
|
|
2908
|
+
package_version: 3.6.0
|
|
2909
2909
|
repository: https://github.com/finos/perspective
|
|
2910
2910
|
license: Apache-2.0
|
|
2911
2911
|
licenses:
|
|
2912
2912
|
- license: Apache-2.0
|
|
2913
2913
|
text: "# Apache License\n\n_Version 2.0, January 2004_ \n_<<http://www.apache.org/licenses/>>_\n\n### Terms and Conditions for use, reproduction, and distribution\n\n#### 1. Definitions\n\n“License” shall mean the terms and conditions for use, reproduction, and\ndistribution as defined by Sections 1 through 9 of this document.\n\n“Licensor” shall mean the copyright owner or entity authorized by the copyright\nowner that is granting the License.\n\n“Legal Entity” shall mean the union of the acting entity and all other entities\nthat control, are controlled by, or are under common control with that entity.\nFor the purposes of this definition, “control” means **(i)** the power, direct or\nindirect, to cause the direction or management of such entity, whether by\ncontract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of the\noutstanding shares, or **(iii)** beneficial ownership of such entity.\n\n“You” (or “Your”) shall mean an individual or Legal Entity exercising\npermissions granted by this License.\n\n“Source” form shall mean the preferred form for making modifications, including\nbut not limited to software source code, documentation source, and configuration\nfiles.\n\n“Object” form shall mean any form resulting from mechanical transformation or\ntranslation of a Source form, including but not limited to compiled object code,\ngenerated documentation, and conversions to other media types.\n\n“Work” shall mean the work of authorship, whether in Source or Object form, made\navailable under the License, as indicated by a copyright notice that is included\nin or attached to the work (an example is provided in the Appendix below).\n\n“Derivative Works” shall mean any work, whether in Source or Object form, that\nis based on (or derived from) the Work and for which the editorial revisions,\nannotations, elaborations, or other modifications represent, as a whole, an\noriginal work of authorship. For the purposes of this License, Derivative Works\nshall not include works that remain separable from, or merely link (or bind by\nname) to the interfaces of, the Work and Derivative Works thereof.\n\n“Contribution” shall mean any work of authorship, including the original version\nof the Work and any modifications or additions to that Work or Derivative Works\nthereof, that is intentionally submitted to Licensor for inclusion in the Work\nby the copyright owner or by an individual or Legal Entity authorized to submit\non behalf of the copyright owner. For the purposes of this definition,\n“submitted” means any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems, and\nissue tracking systems that are managed by, or on behalf of, the Licensor for\nthe purpose of discussing and improving the Work, but excluding communication\nthat is conspicuously marked or otherwise designated in writing by the copyright\nowner as “Not a Contribution.”\n\n“Contributor” shall mean Licensor and any individual or Legal Entity on behalf\nof whom a Contribution has been received by Licensor and subsequently\nincorporated within the Work.\n\n#### 2. Grant of Copyright License\n\nSubject to the terms and conditions of this License, each Contributor hereby\ngrants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,\nirrevocable copyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the Work and such\nDerivative Works in Source or Object form.\n\n#### 3. Grant of Patent License\n\nSubject to the terms and conditions of this License, each Contributor hereby\ngrants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,\nirrevocable (except as stated in this section) patent license to make, have\nmade, use, offer to sell, sell, import, and otherwise transfer the Work, where\nsuch license applies only to those patent claims licensable by such Contributor\nthat are necessarily infringed by their Contribution(s) alone or by combination\nof their Contribution(s) with the Work to which such Contribution(s) was\nsubmitted. If You institute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work or a\nContribution incorporated within the Work constitutes direct or contributory\npatent infringement, then any patent licenses granted to You under this License\nfor that Work shall terminate as of the date such litigation is filed.\n\n#### 4. Redistribution\n\nYou may reproduce and distribute copies of the Work or Derivative Works thereof\nin any medium, with or without modifications, and in Source or Object form,\nprovided that You meet the following conditions:\n\n- **(a)** You must give any other recipients of the Work or Derivative Works a copy of\n this License; and\n- **(b)** You must cause any modified files to carry prominent notices stating that You\n changed the files; and\n- **(c)** You must retain, in the Source form of any Derivative Works that You distribute,\n all copyright, patent, trademark, and attribution notices from the Source form\n of the Work, excluding those notices that do not pertain to any part of the\n Derivative Works; and\n- **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any\n Derivative Works that You distribute must include a readable copy of the\n attribution notices contained within such NOTICE file, excluding those notices\n that do not pertain to any part of the Derivative Works, in at least one of the\n following places: within a NOTICE text file distributed as part of the\n Derivative Works; within the Source form or documentation, if provided along\n with the Derivative Works; or, within a display generated by the Derivative\n Works, if and wherever such third-party notices normally appear. The contents of\n the NOTICE file are for informational purposes only and do not modify the\n License. You may add Your own attribution notices within Derivative Works that\n You distribute, alongside or as an addendum to the NOTICE text from the Work,\n provided that such additional attribution notices cannot be construed as\n modifying the License.\n\nYou may add Your own copyright statement to Your modifications and may provide\nadditional or different license terms and conditions for use, reproduction, or\ndistribution of Your modifications, or for any such Derivative Works as a whole,\nprovided Your use, reproduction, and distribution of the Work otherwise complies\nwith the conditions stated in this License.\n\n#### 5. Submission of Contributions\n\nUnless You explicitly state otherwise, any Contribution intentionally submitted\nfor inclusion in the Work by You to the Licensor shall be under the terms and\nconditions of this License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify the terms of\nany separate license agreement you may have executed with Licensor regarding\nsuch Contributions.\n\n#### 6. Trademarks\n\nThis License does not grant permission to use the trade names, trademarks,\nservice marks, or product names of the Licensor, except as required for\nreasonable and customary use in describing the origin of the Work and\nreproducing the content of the NOTICE file.\n\n#### 7. Disclaimer of Warranty\n\nUnless required by applicable law or agreed to in writing, Licensor provides the\nWork (and each Contributor provides its Contributions) on an “AS IS” BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,\nincluding, without limitation, any warranties or conditions of TITLE,\nNON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are\nsolely responsible for determining the appropriateness of using or\nredistributing the Work and assume any risks associated with Your exercise of\npermissions under this License.\n\n#### 8. Limitation of Liability\n\nIn no event and under no legal theory, whether in tort (including negligence),\ncontract, or otherwise, unless required by applicable law (such as deliberate\nand grossly negligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special, incidental,\nor consequential damages of any character arising as a result of this License or\nout of the use or inability to use the Work (including but not limited to\ndamages for loss of goodwill, work stoppage, computer failure or malfunction, or\nany and all other commercial damages or losses), even if such Contributor has\nbeen advised of the possibility of such damages.\n\n#### 9. Accepting Warranty or Additional Liability\n\nWhile redistributing the Work or Derivative Works thereof, You may choose to\noffer, and charge a fee for, acceptance of support, warranty, indemnity, or\nother liability obligations and/or rights consistent with this License. However,\nin accepting such obligations, You may act only on Your own behalf and on Your\nsole responsibility, not on behalf of any other Contributor, and only if You\nagree to indemnify, defend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason of your\naccepting any such warranty or additional liability.\n\n_END OF TERMS AND CONDITIONS_\n\n### APPENDIX: How to apply the Apache License to your work\n\nTo apply the Apache License to your work, attach the following boilerplate\nnotice, with the fields enclosed by brackets `[]` replaced with your own\nidentifying information. (Don't include the brackets!) The text should be\nenclosed in the appropriate comment syntax for the file format. We also\nrecommend that a file or class name and description of purpose be included on\nthe same “printed page” as the copyright notice for easier identification within\nthird-party archives.\n\n Copyright 2019 The Perspective Authors\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n"
|
|
2914
2914
|
- package_name: perspective-server
|
|
2915
|
-
package_version: 3.
|
|
2915
|
+
package_version: 3.6.0
|
|
2916
2916
|
repository: https://github.com/finos/perspective
|
|
2917
2917
|
license: Apache-2.0
|
|
2918
2918
|
licenses:
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
# ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
|
|
11
11
|
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
12
12
|
|
|
13
|
-
__version__ = "3.
|
|
13
|
+
__version__ = "3.6.0"
|
|
14
14
|
__all__ = [
|
|
15
15
|
"_jupyter_labextension_paths",
|
|
16
16
|
"Server",
|
{perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/server/test_session.py
RENAMED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
# ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
|
|
11
11
|
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
12
12
|
|
|
13
|
-
from perspective import Server, Client, ProxySession
|
|
13
|
+
from perspective import Server, Client, ProxySession, AsyncClient
|
|
14
|
+
import pytest
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
client = Server().new_local_client()
|
|
@@ -53,3 +54,21 @@ class TestProxySession(object):
|
|
|
53
54
|
assert table.size() == 3
|
|
54
55
|
table2.update([{"a": 4, "d": 5}])
|
|
55
56
|
assert table.size() == 4
|
|
57
|
+
|
|
58
|
+
@pytest.mark.asyncio
|
|
59
|
+
async def test_handle_request_async(self):
|
|
60
|
+
"""tests use of ProxySession.handle_request_async() in an AsyncClient callback"""
|
|
61
|
+
server = Server()
|
|
62
|
+
client = server.new_local_client()
|
|
63
|
+
|
|
64
|
+
def handle_response(bytes):
|
|
65
|
+
import asyncio
|
|
66
|
+
asyncio.create_task(sub_client.handle_response(bytes))
|
|
67
|
+
|
|
68
|
+
sub_session = ProxySession(client, handle_response)
|
|
69
|
+
sub_client = AsyncClient(sub_session.handle_request_async, sub_session.close)
|
|
70
|
+
table = await sub_client.table(data, name="table1")
|
|
71
|
+
table2 = client.open_table("table1")
|
|
72
|
+
assert (await table.size()) == 3
|
|
73
|
+
table2.update([{"a": 4, "d": 5}])
|
|
74
|
+
assert (await table.size()) == 4
|
{perspective_python-3.5.0 → perspective_python-3.6.0}/perspective/tests/table/test_table_limit.py
RENAMED
|
@@ -17,6 +17,18 @@ Table = client.table
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
class TestTableInfer(object):
|
|
20
|
+
def test_table_limit_wraparound_does_not_respect_partial_none(self):
|
|
21
|
+
t = Table({"a": "float", "b": "float"}, limit=3)
|
|
22
|
+
t.update([{"a": 10}, {"b": 1}, {"a": 20}, {"a": None, "b": 2}])
|
|
23
|
+
d1 = t.view().to_json()
|
|
24
|
+
|
|
25
|
+
t2 = Table({"a": "float", "b": "float"}, limit=3)
|
|
26
|
+
t2.update([{"a": 10}, {"b": 1}, {"a": 20}, {"b": 2}])
|
|
27
|
+
d2 = t2.view().to_json()
|
|
28
|
+
|
|
29
|
+
assert d1[0] == d2[0]
|
|
30
|
+
assert d1[1:] == d2[1:]
|
|
31
|
+
|
|
20
32
|
def test_table_limit_wraparound_does_not_respect_partial(self):
|
|
21
33
|
t = Table({"a": "float", "b": "float"}, limit=3)
|
|
22
34
|
t.update([{"a": 10}, {"b": 1}, {"a": 20}, {"a": 10, "b": 2}])
|
|
@@ -26,7 +38,7 @@ class TestTableInfer(object):
|
|
|
26
38
|
t2.update([{"a": 10}, {"b": 1}, {"a": 20}, {"b": 2}])
|
|
27
39
|
d2 = t2.view().to_columns()
|
|
28
40
|
|
|
29
|
-
assert d1
|
|
41
|
+
assert d1 != d2
|
|
30
42
|
|
|
31
43
|
def test_table_limit_with_json(self):
|
|
32
44
|
t = Table({"a": [1, 2, 3]}, limit=1)
|
|
@@ -15,6 +15,7 @@ import logging
|
|
|
15
15
|
import os
|
|
16
16
|
import re
|
|
17
17
|
import importlib.metadata
|
|
18
|
+
import inspect
|
|
18
19
|
|
|
19
20
|
from string import Template
|
|
20
21
|
from ipywidgets import DOMWidget
|
|
@@ -25,6 +26,7 @@ __version__ = re.sub(
|
|
|
25
26
|
"(rc|alpha|beta)", "-\\1.", importlib.metadata.version("perspective-python")
|
|
26
27
|
)
|
|
27
28
|
|
|
29
|
+
__all__ = ["PerspectiveWidget"]
|
|
28
30
|
|
|
29
31
|
class PerspectiveWidget(DOMWidget, PerspectiveViewer):
|
|
30
32
|
""":class`~perspective.PerspectiveWidget` allows for Perspective to be used
|
|
@@ -82,9 +84,12 @@ class PerspectiveWidget(DOMWidget, PerspectiveViewer):
|
|
|
82
84
|
preserves pivots and applies them. See `PerspectiveViewer.__init__` for
|
|
83
85
|
arguments that transform the view shown in the widget.
|
|
84
86
|
|
|
87
|
+
If an `AsyncTable` is passed in, then certain widget methods like
|
|
88
|
+
`update()` and `delete()` return coroutines which must be awaited.
|
|
89
|
+
|
|
85
90
|
Args:
|
|
86
|
-
data (:obj:`Table`|:obj:`
|
|
87
|
-
`perspective.Table` instance, a `perspective.
|
|
91
|
+
data (:obj:`Table`|:obj:`AsyncTable`|:obj:`dict`|:obj:`list`|:obj:`pandas.DataFrame`|:obj:`bytes`|:obj:`str`): a
|
|
92
|
+
`perspective.Table` instance, a `perspective.AsyncTable` instance, or
|
|
88
93
|
a dataset to be loaded in the widget.
|
|
89
94
|
|
|
90
95
|
Keyword Arguments:
|
|
@@ -152,27 +157,30 @@ class PerspectiveWidget(DOMWidget, PerspectiveViewer):
|
|
|
152
157
|
if limit is not None:
|
|
153
158
|
self._options.update({"limit": limit})
|
|
154
159
|
|
|
155
|
-
self.load(data, **self._options)
|
|
160
|
+
loading = self.load(data, **self._options)
|
|
161
|
+
if inspect.isawaitable(loading):
|
|
162
|
+
import asyncio
|
|
163
|
+
asyncio.create_task(loading)
|
|
156
164
|
|
|
157
165
|
def load(self, data, **options):
|
|
158
166
|
"""Load the widget with data."""
|
|
159
167
|
# Viewer will ignore **options if `data` is a Table or View.
|
|
160
|
-
super(PerspectiveWidget, self).load(data, **options)
|
|
168
|
+
return super(PerspectiveWidget, self).load(data, **options)
|
|
161
169
|
|
|
162
170
|
def update(self, data):
|
|
163
171
|
"""Update the widget with new data."""
|
|
164
|
-
super(PerspectiveWidget, self).update(data)
|
|
172
|
+
return super(PerspectiveWidget, self).update(data)
|
|
165
173
|
|
|
166
174
|
def clear(self):
|
|
167
175
|
"""Clears the widget's underlying `Table`."""
|
|
168
|
-
super(PerspectiveWidget, self).clear()
|
|
176
|
+
return super(PerspectiveWidget, self).clear()
|
|
169
177
|
|
|
170
178
|
def replace(self, data):
|
|
171
179
|
"""Replaces the widget's `Table` with new data conforming to the same
|
|
172
180
|
schema. Does not clear user-set state. If in client mode, serializes
|
|
173
181
|
the data and sends it to the browser.
|
|
174
182
|
"""
|
|
175
|
-
super(PerspectiveWidget, self).replace(data)
|
|
183
|
+
return super(PerspectiveWidget, self).replace(data)
|
|
176
184
|
|
|
177
185
|
def delete(self, delete_table=True):
|
|
178
186
|
"""Delete the Widget's data and clears its internal state.
|
|
@@ -181,10 +189,11 @@ class PerspectiveWidget(DOMWidget, PerspectiveViewer):
|
|
|
181
189
|
delete_table (`bool`): whether the underlying `Table` will be
|
|
182
190
|
deleted. Defaults to True.
|
|
183
191
|
"""
|
|
184
|
-
super(PerspectiveWidget, self).delete(delete_table)
|
|
192
|
+
ret = super(PerspectiveWidget, self).delete(delete_table)
|
|
185
193
|
|
|
186
194
|
# Close the underlying comm and remove widget from the front-end
|
|
187
195
|
self.close()
|
|
196
|
+
return ret
|
|
188
197
|
|
|
189
198
|
@observe("value")
|
|
190
199
|
def handle_message(self, widget, content, buffers):
|
|
@@ -201,18 +210,19 @@ class PerspectiveWidget(DOMWidget, PerspectiveViewer):
|
|
|
201
210
|
if content["type"] == "connect":
|
|
202
211
|
client_id = content["client_id"]
|
|
203
212
|
logging.debug("view {} connected", client_id)
|
|
204
|
-
|
|
205
|
-
|
|
213
|
+
|
|
214
|
+
def send_response(msg):
|
|
215
|
+
self.send(
|
|
206
216
|
{"type": "binary_msg", "client_id": client_id}, [msg]
|
|
207
217
|
)
|
|
208
|
-
)
|
|
218
|
+
self._sessions[client_id] = self.new_proxy_session(send_response)
|
|
209
219
|
elif content["type"] == "binary_msg":
|
|
210
220
|
[binary_msg] = buffers
|
|
211
221
|
client_id = content["client_id"]
|
|
212
222
|
session = self._sessions[client_id]
|
|
213
|
-
logging.debug("view {} message {}", client_id, len(binary_msg))
|
|
214
223
|
if session is not None:
|
|
215
|
-
|
|
224
|
+
import asyncio
|
|
225
|
+
asyncio.create_task(session.handle_request_async(binary_msg))
|
|
216
226
|
else:
|
|
217
227
|
logging.error("No session for client_id {}".format(client_id))
|
|
218
228
|
elif content["type"] == "hangup":
|
|
@@ -136,27 +136,27 @@ class PerspectiveViewer(PerspectiveTraitlets, object):
|
|
|
136
136
|
|
|
137
137
|
@property
|
|
138
138
|
def client(self):
|
|
139
|
-
"""Returns the ``perspective.Client`` under management by the viewer."""
|
|
139
|
+
"""Returns the ``perspective.Client`` or ``perspective.AsyncClient`` under management by the viewer."""
|
|
140
140
|
return self._client
|
|
141
141
|
|
|
142
142
|
@property
|
|
143
143
|
def table(self):
|
|
144
|
-
"""Returns the ``perspective.Table`` under management by the viewer."""
|
|
144
|
+
"""Returns the ``perspective.Table`` or ``perspective.AsyncTable`` under management by the viewer."""
|
|
145
145
|
return self._table
|
|
146
146
|
|
|
147
|
+
def is_async(self):
|
|
148
|
+
"""Returns whether this widget has an async interface or synchronous"""
|
|
149
|
+
return isinstance(self._table, perspective.perspective.AsyncTable)
|
|
150
|
+
|
|
147
151
|
def load(self, data, **options):
|
|
148
|
-
"""Given a ``perspective.Table``, a ``perspective.
|
|
152
|
+
"""Given a ``perspective.Table``, a ``perspective.AsyncTable``,
|
|
149
153
|
or data that can be handled by ``perspective.Table``, pass it to the
|
|
150
154
|
viewer. Like `__init__`, load accepts a `perspective.Table`, a dataset,
|
|
151
155
|
or a schema.
|
|
152
156
|
|
|
153
|
-
``load()`` resets the state of the viewer
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
ignored as the options already set on the ``Table`` take precedence.
|
|
157
|
-
|
|
158
|
-
* If a ``perspective.View`` is loaded, the options on the
|
|
159
|
-
``perspective.Table`` linked to the view take precedence.
|
|
157
|
+
``load()`` resets the state of the viewer: if a ``perspective.Table``
|
|
158
|
+
has already been loaded, ``**options`` is ignored as the options
|
|
159
|
+
already set on the ``Table`` take precedence.
|
|
160
160
|
|
|
161
161
|
If data is passed in, a ``perspective.Table`` is automatically created
|
|
162
162
|
by this method, and the options passed to ``**config`` are extended to
|
|
@@ -165,21 +165,31 @@ class PerspectiveViewer(PerspectiveTraitlets, object):
|
|
|
165
165
|
sort, etc.) is cleared to prevent applying settings on columns that
|
|
166
166
|
don't exist.
|
|
167
167
|
|
|
168
|
+
When a ``perspective.AsyncTable`` is loaded, the widget's interface
|
|
169
|
+
becomes async. Methods which operate on the underlying Perspective
|
|
170
|
+
view, inclusive of the ``load()`` call itself, return coroutine values
|
|
171
|
+
which must be awaited.
|
|
172
|
+
|
|
173
|
+
Loading a ``perspective.Table`` or plain data will make the interface
|
|
174
|
+
synchronous again.
|
|
175
|
+
|
|
168
176
|
Args:
|
|
169
|
-
data (:obj:`Table`|:obj:`
|
|
170
|
-
`perspective.Table` instance, a `perspective.
|
|
171
|
-
a dataset to be loaded in the viewer.
|
|
177
|
+
data (:obj:`Table`|:obj:`AsyncTable`|:obj:`dict`|:obj:`list`|:obj:`pandas.DataFrame`|:obj:`bytes`|:obj:`str`): a
|
|
178
|
+
`perspective.Table` instance, a `perspective.AsyncTable`
|
|
179
|
+
instance, or a dataset to be loaded in the viewer.
|
|
172
180
|
|
|
173
181
|
Keyword Arguments:
|
|
174
182
|
name (:obj:`str`): An optional name to reference the table by so it can
|
|
175
183
|
be accessed from the front-end. If not provided, a name will
|
|
176
184
|
be generated.
|
|
177
185
|
index (:obj:`str`): A column name to be used as the primary key.
|
|
178
|
-
Ignored if a ``Table`` or ``
|
|
186
|
+
Ignored if a ``Table`` or ``AsyncTable`` is supplied.
|
|
179
187
|
limit (:obj:`int`): A upper limit on the number of rows in the Table.
|
|
180
188
|
Cannot be set at the same time as `index`. Ignored if a
|
|
181
|
-
``Table`` or ``
|
|
189
|
+
``Table`` or ``AsyncTable`` is supplied.
|
|
182
190
|
|
|
191
|
+
Returns:
|
|
192
|
+
coro (:obj:`coroutine`): when `AsyncTable` is passed, the `load()` call must be awaited
|
|
183
193
|
"""
|
|
184
194
|
name = options.pop("name", str(random()))
|
|
185
195
|
|
|
@@ -187,11 +197,21 @@ class PerspectiveViewer(PerspectiveTraitlets, object):
|
|
|
187
197
|
if self.table is not None:
|
|
188
198
|
self.reset()
|
|
189
199
|
|
|
190
|
-
if isinstance(data, perspective.perspective.
|
|
200
|
+
if isinstance(data, perspective.perspective.AsyncTable):
|
|
201
|
+
self._table = data
|
|
202
|
+
async def load_table():
|
|
203
|
+
self._client = await self.table.get_client()
|
|
204
|
+
self.table_name = self.table.get_name()
|
|
205
|
+
# If the user does not set columns to show, synchronize viewer state
|
|
206
|
+
# with dataset.
|
|
207
|
+
if len(self.columns) == 0:
|
|
208
|
+
self.columns = await self.table.columns()
|
|
209
|
+
|
|
210
|
+
return load_table()
|
|
211
|
+
elif isinstance(data, perspective.perspective.Table):
|
|
191
212
|
self._table = data
|
|
192
213
|
self._client = data.get_client()
|
|
193
|
-
|
|
194
|
-
elif isinstance(data, perspective.perspective.View):
|
|
214
|
+
elif isinstance(data, perspective.perspective.View) or isinstance(data, perspective.perspective.AsyncView):
|
|
195
215
|
raise TypeError(
|
|
196
216
|
"Views cannot be loaded directly, load a table or raw data instead"
|
|
197
217
|
)
|
|
@@ -204,8 +224,6 @@ class PerspectiveViewer(PerspectiveTraitlets, object):
|
|
|
204
224
|
if len(self.columns) == 0:
|
|
205
225
|
self.columns = self.table.columns()
|
|
206
226
|
|
|
207
|
-
# Assigning to this traitlet signals the frontend viewer to connect to the
|
|
208
|
-
# table we're hosting.
|
|
209
227
|
self.table_name = self.table.get_name()
|
|
210
228
|
|
|
211
229
|
def update(self, data):
|
|
@@ -213,16 +231,22 @@ class PerspectiveViewer(PerspectiveTraitlets, object):
|
|
|
213
231
|
This function follows the semantics of `Table.update()`, and will be
|
|
214
232
|
affected by whether an index is set on the underlying table.
|
|
215
233
|
|
|
234
|
+
When this widget has loaded an ``AsyncTable``, returns a coroutine
|
|
235
|
+
which must be awaited.
|
|
236
|
+
|
|
216
237
|
Args:
|
|
217
238
|
data (:obj:`dict`|:obj:`list`|:obj:`pandas.DataFrame`): the
|
|
218
239
|
update data for the table.
|
|
240
|
+
|
|
241
|
+
Returns:
|
|
242
|
+
coro (:obj:`coroutine`): when async, must be awaited
|
|
219
243
|
"""
|
|
220
|
-
self.table.update(data)
|
|
244
|
+
return self.table.update(data)
|
|
221
245
|
|
|
222
246
|
def clear(self):
|
|
223
247
|
"""Clears the rows of this viewer's ``Table``."""
|
|
224
248
|
if self.table is not None:
|
|
225
|
-
self.table.clear()
|
|
249
|
+
return self.table.clear()
|
|
226
250
|
|
|
227
251
|
def replace(self, data):
|
|
228
252
|
"""Replaces the rows of this viewer's `Table` with new data.
|
|
@@ -230,9 +254,12 @@ class PerspectiveViewer(PerspectiveTraitlets, object):
|
|
|
230
254
|
Args:
|
|
231
255
|
data (:obj:`dict`|:obj:`list`|:obj:`pandas.DataFrame`): new data
|
|
232
256
|
to set into the table - must conform to the table's schema.
|
|
257
|
+
|
|
258
|
+
Returns:
|
|
259
|
+
coro (:obj:`coroutine`): when async, must be awaited
|
|
233
260
|
"""
|
|
234
261
|
if self.table is not None:
|
|
235
|
-
self.table.replace(data)
|
|
262
|
+
return self.table.replace(data)
|
|
236
263
|
|
|
237
264
|
def save(self):
|
|
238
265
|
"""Get the viewer's attributes as a dictionary, symmetric with `restore`
|
|
@@ -300,11 +327,17 @@ class PerspectiveViewer(PerspectiveTraitlets, object):
|
|
|
300
327
|
Args:
|
|
301
328
|
delete_table (:obj:`bool`) : whether the underlying `Table` will be
|
|
302
329
|
deleted. Defaults to True.
|
|
330
|
+
|
|
331
|
+
Returns:
|
|
332
|
+
coro (:obj:`coroutine`): when async and `delete_table` is `True`,
|
|
333
|
+
must be awaited
|
|
303
334
|
"""
|
|
335
|
+
ret = None
|
|
304
336
|
if delete_table:
|
|
305
337
|
# Delete table
|
|
306
|
-
self.table.delete()
|
|
338
|
+
ret = self.table.delete()
|
|
307
339
|
self.table_name = None
|
|
308
340
|
self._table = None
|
|
309
341
|
|
|
310
342
|
self.reset()
|
|
343
|
+
return ret
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/perspective-jupyterlab",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "A Jupyterlab extension for the Perspective library, designed to be used with perspective-python.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/**/*",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"_build": {
|
|
76
|
-
"load": "static/remoteEntry.
|
|
76
|
+
"load": "static/remoteEntry.4fbf018371a71a17accb.js",
|
|
77
77
|
"extension": "./extension",
|
|
78
78
|
"style": "./style"
|
|
79
79
|
}
|