perspective-python 3.1.0__tar.gz → 3.1.2__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.
Files changed (223) hide show
  1. {perspective_python-3.1.0 → perspective_python-3.1.2}/Cargo.lock +30 -11
  2. {perspective_python-3.1.0 → perspective_python-3.1.2}/Cargo.toml +8 -0
  3. {perspective_python-3.1.0 → perspective_python-3.1.2}/PKG-INFO +1 -1
  4. {perspective_python-3.1.0/rust/perspective-python → perspective_python-3.1.2}/perspective/__init__.py +1 -1
  5. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/Cargo.toml +13 -4
  6. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/build.rs +13 -2
  7. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/client/set_loop_callback.md +2 -2
  8. perspective_python-3.1.2/rust/perspective-client/docs/expressions.md +141 -0
  9. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/table/remove_delete.md +2 -1
  10. perspective_python-3.1.2/rust/perspective-client/docs/table.md +281 -0
  11. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/column_paths.md +4 -2
  12. perspective_python-3.1.2/rust/perspective-client/docs/view/delete.md +3 -0
  13. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view.md +28 -37
  14. perspective_python-3.1.2/rust/perspective-client/package.json +18 -0
  15. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/src/rust/client.rs +21 -10
  16. perspective_python-3.1.2/rust/perspective-client/src/rust/config/expressions.rs +519 -0
  17. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/src/rust/config/filters.rs +5 -12
  18. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/src/rust/config/mod.rs +4 -3
  19. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/src/rust/config/view_config.rs +1 -1
  20. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/src/rust/lib.rs +5 -2
  21. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/src/rust/utils/mod.rs +2 -0
  22. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/src/rust/view.rs +2 -1
  23. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/Cargo.toml +8 -12
  24. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/docs/index.html +12 -1
  25. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/docs/lib.md +11 -16
  26. {perspective_python-3.1.0 → perspective_python-3.1.2/rust/perspective-python}/perspective/__init__.py +1 -1
  27. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/src/client/python.rs +1 -2
  28. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-server/Cargo.toml +4 -4
  29. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-server/build/main.rs +39 -2
  30. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-server/build/psp.rs +49 -51
  31. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-server/src/local_client.rs +2 -2
  32. perspective_python-3.1.0/rust/perspective-client/docs/table.md +0 -25
  33. perspective_python-3.1.0/rust/perspective-client/docs/view/delete.md +0 -1
  34. perspective_python-3.1.0/rust/perspective-client/src/rust/config/expressions.rs +0 -104
  35. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/extension/finos-perspective-nbextension.json +0 -0
  36. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/handlers/__init__.py +0 -0
  37. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/handlers/aiohttp.py +0 -0
  38. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/handlers/starlette.py +0 -0
  39. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/handlers/tornado.py +0 -0
  40. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/templates/exported_widget.html.template +0 -0
  41. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/__init__.py +0 -0
  42. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/conftest.py +0 -0
  43. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/core/__init__.py +0 -0
  44. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/core/test_async.py +0 -0
  45. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/server/__init__.py +0 -0
  46. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/server/test_server.py +0 -0
  47. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/server/test_session.py +0 -0
  48. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/__init__.py +0 -0
  49. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/arrow/date32.arrow +0 -0
  50. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/arrow/date64.arrow +0 -0
  51. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/arrow/dict.arrow +0 -0
  52. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/arrow/dict_update.arrow +0 -0
  53. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/arrow/int_float_str.arrow +0 -0
  54. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/arrow/int_float_str_file.arrow +0 -0
  55. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/arrow/int_float_str_update.arrow +0 -0
  56. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/object_sequence.py +0 -0
  57. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/test_delete.py +0 -0
  58. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/test_exception.py +0 -0
  59. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/test_leaks.py +0 -0
  60. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/test_ports.py +0 -0
  61. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/test_remove.py +0 -0
  62. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/test_table.py +0 -0
  63. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/test_table_arrow.py +0 -0
  64. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/test_table_datetime.py +0 -0
  65. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/test_table_infer.py +0 -0
  66. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/test_table_limit.py +0 -0
  67. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/test_table_numpy.py +0 -0
  68. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/test_table_pandas.py +0 -0
  69. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/test_to_arrow.py +0 -0
  70. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/test_to_arrow_lz4.py +0 -0
  71. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/test_to_format.py +0 -0
  72. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/test_update.py +0 -0
  73. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/test_update_arrow.py +0 -0
  74. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/test_update_pandas.py +0 -0
  75. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/test_view.py +0 -0
  76. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/table/test_view_expression.py +0 -0
  77. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/test_dependencies.py +0 -0
  78. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/viewer/__init__.py +0 -0
  79. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/viewer/test_validate.py +0 -0
  80. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/viewer/test_viewer.py +0 -0
  81. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/widget/__init__.py +0 -0
  82. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/widget/test_widget.py +0 -0
  83. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/tests/widget/test_widget_pandas.py +0 -0
  84. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/widget/__init__.py +0 -0
  85. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/widget/viewer/__init__.py +0 -0
  86. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/widget/viewer/validate.py +0 -0
  87. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/widget/viewer/viewer.py +0 -0
  88. {perspective_python-3.1.0 → perspective_python-3.1.2}/perspective/widget/viewer/viewer_traitlets.py +0 -0
  89. {perspective_python-3.1.0 → perspective_python-3.1.2}/pyproject.toml +0 -0
  90. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/client/get_hosted_table_names.md +0 -0
  91. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/client/open_table.md +0 -0
  92. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/client/system_info.md +0 -0
  93. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/client/table.md +0 -0
  94. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/client/terminate.md +0 -0
  95. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/client.md +0 -0
  96. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/index.html +0 -0
  97. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/table/clear.md +0 -0
  98. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/table/columns.md +0 -0
  99. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/table/delete.md +0 -0
  100. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/table/get_client.md +0 -0
  101. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/table/get_features.md +0 -0
  102. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/table/get_index.md +0 -0
  103. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/table/get_limit.md +0 -0
  104. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/table/get_num_views.md +0 -0
  105. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/table/make_port.md +0 -0
  106. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/table/on_delete.md +0 -0
  107. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/table/remove.md +0 -0
  108. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/table/replace.md +0 -0
  109. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/table/schema.md +0 -0
  110. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/table/size.md +0 -0
  111. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/table/update.md +0 -0
  112. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/table/validate_expressions.md +0 -0
  113. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/table/view.md +0 -0
  114. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/collapse.md +0 -0
  115. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/dimensions.md +0 -0
  116. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/expand.md +0 -0
  117. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/expression_schema.md +0 -0
  118. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/get_config.md +0 -0
  119. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/get_min_max.md +0 -0
  120. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/num_columns.md +0 -0
  121. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/num_rows.md +0 -0
  122. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/on_delete.md +0 -0
  123. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/on_update.md +0 -0
  124. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/remove_delete.md +0 -0
  125. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/remove_update.md +0 -0
  126. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/schema.md +0 -0
  127. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/set_depth.md +0 -0
  128. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/to_arrow.md +0 -0
  129. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/to_columns.md +0 -0
  130. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/to_columns_string.md +0 -0
  131. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/to_csv.md +0 -0
  132. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/to_json.md +0 -0
  133. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/docs/view/to_json_string.md +0 -0
  134. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/src/rust/config/aggregates.rs +0 -0
  135. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/src/rust/config/column_type.rs +0 -0
  136. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/src/rust/config/plugin.rs +0 -0
  137. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/src/rust/config/sort.rs +0 -0
  138. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/src/rust/session.rs +0 -0
  139. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/src/rust/table.rs +0 -0
  140. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/src/rust/table_data.rs +0 -0
  141. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/src/rust/utils/clone.rs +0 -0
  142. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/src/rust/utils/logging.rs +0 -0
  143. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/src/rust/utils/tests/clone.rs +0 -0
  144. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-client/src/rust/utils/tests/mod.rs +0 -0
  145. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/README.md +0 -0
  146. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/bench/__init__.py +0 -0
  147. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/bench/runtime/__init__.py +0 -0
  148. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/bench/runtime/bench.py +0 -0
  149. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/bench/runtime/perspective_benchmark.py +0 -0
  150. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/bench/runtime/run_perspective_benchmark.py +0 -0
  151. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/bench/tornado/__init__.py +0 -0
  152. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/bench/tornado/async_server.py +0 -0
  153. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/bench/tornado/bench.py +0 -0
  154. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/bench/tornado/distributed_mode.py +0 -0
  155. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/bench/tornado/server/new_api.py +0 -0
  156. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/bench/tornado/server/old_api.py +0 -0
  157. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/bench/tornado/server_mode.py +0 -0
  158. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/build.rs +0 -0
  159. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/handlers/__init__.py +0 -0
  160. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/handlers/aiohttp.py +0 -0
  161. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/handlers/starlette.py +0 -0
  162. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/handlers/tornado.py +0 -0
  163. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/__init__.py +0 -0
  164. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/conftest.py +0 -0
  165. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/core/__init__.py +0 -0
  166. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/core/test_async.py +0 -0
  167. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/server/__init__.py +0 -0
  168. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/server/test_server.py +0 -0
  169. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/server/test_session.py +0 -0
  170. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/__init__.py +0 -0
  171. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/object_sequence.py +0 -0
  172. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/test_delete.py +0 -0
  173. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/test_exception.py +0 -0
  174. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/test_leaks.py +0 -0
  175. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/test_ports.py +0 -0
  176. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/test_remove.py +0 -0
  177. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/test_table.py +0 -0
  178. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/test_table_arrow.py +0 -0
  179. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/test_table_datetime.py +0 -0
  180. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/test_table_infer.py +0 -0
  181. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/test_table_limit.py +0 -0
  182. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/test_table_numpy.py +0 -0
  183. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/test_table_pandas.py +0 -0
  184. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/test_to_arrow.py +0 -0
  185. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/test_to_arrow_lz4.py +0 -0
  186. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/test_to_format.py +0 -0
  187. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/test_update.py +0 -0
  188. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/test_update_arrow.py +0 -0
  189. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/test_update_pandas.py +0 -0
  190. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/test_view.py +0 -0
  191. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/table/test_view_expression.py +0 -0
  192. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/test_dependencies.py +0 -0
  193. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/viewer/__init__.py +0 -0
  194. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/viewer/test_validate.py +0 -0
  195. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/viewer/test_viewer.py +0 -0
  196. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/widget/__init__.py +0 -0
  197. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/widget/test_widget.py +0 -0
  198. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/tests/widget/test_widget_pandas.py +0 -0
  199. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/widget/__init__.py +0 -0
  200. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/widget/viewer/__init__.py +0 -0
  201. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/widget/viewer/validate.py +0 -0
  202. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/widget/viewer/viewer.py +0 -0
  203. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/perspective/widget/viewer/viewer_traitlets.py +0 -0
  204. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/src/client/client_sync.rs +0 -0
  205. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/src/client/mod.rs +0 -0
  206. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/src/client/pandas.rs +0 -0
  207. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/src/client/pyarrow.rs +0 -0
  208. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/src/lib.rs +0 -0
  209. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/src/server/mod.rs +0 -0
  210. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-python/src/server/server_sync.rs +0 -0
  211. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-server/docs/architecture.dot +0 -0
  212. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-server/docs/architecture.sub1.dot +0 -0
  213. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-server/docs/architecture.sub1.svg +0 -0
  214. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-server/docs/architecture.sub2.dot +0 -0
  215. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-server/docs/architecture.sub2.svg +0 -0
  216. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-server/docs/architecture.sub3.dot +0 -0
  217. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-server/docs/architecture.sub3.svg +0 -0
  218. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-server/docs/architecture.svg +0 -0
  219. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-server/docs/lib.md +0 -0
  220. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-server/src/ffi.rs +0 -0
  221. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-server/src/lib.rs +0 -0
  222. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-server/src/local_session.rs +0 -0
  223. {perspective_python-3.1.0 → perspective_python-3.1.2}/rust/perspective-server/src/server.rs +0 -0
@@ -1783,7 +1783,7 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
1783
1783
 
1784
1784
  [[package]]
1785
1785
  name = "perspective"
1786
- version = "3.1.0"
1786
+ version = "3.1.2"
1787
1787
  dependencies = [
1788
1788
  "async-lock",
1789
1789
  "axum",
@@ -1823,7 +1823,7 @@ dependencies = [
1823
1823
 
1824
1824
  [[package]]
1825
1825
  name = "perspective-client"
1826
- version = "3.1.0"
1826
+ version = "3.1.2"
1827
1827
  dependencies = [
1828
1828
  "async-lock",
1829
1829
  "futures",
@@ -1845,7 +1845,7 @@ dependencies = [
1845
1845
 
1846
1846
  [[package]]
1847
1847
  name = "perspective-js"
1848
- version = "3.1.0"
1848
+ version = "3.1.2"
1849
1849
  dependencies = [
1850
1850
  "anyhow",
1851
1851
  "base64 0.13.1",
@@ -1874,15 +1874,26 @@ dependencies = [
1874
1874
 
1875
1875
  [[package]]
1876
1876
  name = "perspective-lint"
1877
- version = "3.1.0"
1877
+ version = "3.1.2"
1878
1878
  dependencies = [
1879
1879
  "glob",
1880
1880
  "yew-fmt",
1881
1881
  ]
1882
1882
 
1883
+ [[package]]
1884
+ name = "perspective-metadata"
1885
+ version = "0.0.0"
1886
+ dependencies = [
1887
+ "perspective-client",
1888
+ "perspective-js",
1889
+ "perspective-server",
1890
+ "perspective-viewer",
1891
+ "ts-rs",
1892
+ ]
1893
+
1883
1894
  [[package]]
1884
1895
  name = "perspective-python"
1885
- version = "3.1.0"
1896
+ version = "3.1.2"
1886
1897
  dependencies = [
1887
1898
  "async-lock",
1888
1899
  "cmake",
@@ -1902,7 +1913,7 @@ dependencies = [
1902
1913
 
1903
1914
  [[package]]
1904
1915
  name = "perspective-server"
1905
- version = "3.1.0"
1916
+ version = "3.1.2"
1906
1917
  dependencies = [
1907
1918
  "async-lock",
1908
1919
  "base64 0.22.1",
@@ -1912,12 +1923,13 @@ dependencies = [
1912
1923
  "num_cpus",
1913
1924
  "perspective-client",
1914
1925
  "regex",
1926
+ "shlex",
1915
1927
  "tracing",
1916
1928
  ]
1917
1929
 
1918
1930
  [[package]]
1919
1931
  name = "perspective-viewer"
1920
- version = "3.1.0"
1932
+ version = "3.1.2"
1921
1933
  dependencies = [
1922
1934
  "anyhow",
1923
1935
  "async-lock",
@@ -2666,6 +2678,12 @@ dependencies = [
2666
2678
  "lazy_static",
2667
2679
  ]
2668
2680
 
2681
+ [[package]]
2682
+ name = "shlex"
2683
+ version = "1.3.0"
2684
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2685
+ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
2686
+
2669
2687
  [[package]]
2670
2688
  name = "signal-hook-registry"
2671
2689
  version = "1.4.2"
@@ -3125,10 +3143,11 @@ dependencies = [
3125
3143
 
3126
3144
  [[package]]
3127
3145
  name = "ts-rs"
3128
- version = "9.0.1"
3146
+ version = "10.0.0"
3129
3147
  source = "registry+https://github.com/rust-lang/crates.io-index"
3130
- checksum = "b44017f9f875786e543595076374b9ef7d13465a518dd93d6ccdbf5b432dde8c"
3148
+ checksum = "3a2f31991cee3dce1ca4f929a8a04fdd11fd8801aac0f2030b0fa8a0a3fef6b9"
3131
3149
  dependencies = [
3150
+ "lazy_static",
3132
3151
  "serde_json",
3133
3152
  "thiserror",
3134
3153
  "ts-rs-macros",
@@ -3136,9 +3155,9 @@ dependencies = [
3136
3155
 
3137
3156
  [[package]]
3138
3157
  name = "ts-rs-macros"
3139
- version = "9.0.1"
3158
+ version = "10.0.0"
3140
3159
  source = "registry+https://github.com/rust-lang/crates.io-index"
3141
- checksum = "c88cc88fd23b5a04528f3a8436024f20010a16ec18eb23c164b1242f65860130"
3160
+ checksum = "0ea0b99e8ec44abd6f94a18f28f7934437809dd062820797c52401298116f70e"
3142
3161
  dependencies = [
3143
3162
  "proc-macro2 1.0.83",
3144
3163
  "quote 1.0.36",
@@ -12,6 +12,14 @@
12
12
 
13
13
  [workspace]
14
14
  resolver = "2"
15
+ default-members = [
16
+ "rust/perspective",
17
+ "rust/perspective-client",
18
+ "rust/perspective-js",
19
+ "rust/perspective-python",
20
+ "rust/perspective-server",
21
+ "rust/perspective-viewer",
22
+ ]
15
23
  members = ["rust/perspective-python"]
16
24
 
17
25
  [profile.dev]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: perspective-python
3
- Version: 3.1.0
3
+ Version: 3.1.2
4
4
  Classifier: Development Status :: 5 - Production/Stable
5
5
  Classifier: Programming Language :: Rust
6
6
  Classifier: Programming Language :: Python :: Implementation :: CPython
@@ -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.1.0"
13
+ __version__ = "3.1.2"
14
14
  __all__ = [
15
15
  "_jupyter_labextension_paths",
16
16
  "Server",
@@ -12,7 +12,7 @@
12
12
 
13
13
  [package]
14
14
  name = "perspective-client"
15
- version = "3.1.0"
15
+ version = "3.1.2"
16
16
  authors = ["Andrew Stein <steinlink@gmail.com>"]
17
17
  edition = "2021"
18
18
  description = "A data visualization and analytics component, especially well-suited for large and/or streaming datasets."
@@ -35,8 +35,17 @@ rustdoc-args = ["--html-in-header", "docs/index.html"]
35
35
 
36
36
  [features]
37
37
  default = []
38
- external-proto = ["protobuf-src"]
39
- external-protoc = []
38
+
39
+ # Should the project build the `proto.rs` via protoc from source or assume it
40
+ # already exists?
41
+ generate-proto = []
42
+ # Should the project build protobuf from source? If not, building this crate
43
+ # requires PROTOC be set in the environment
44
+ protobuf-src = ["dep:protobuf-src"]
45
+
46
+ # When generating metadata, we can't rely on its existence - so enable this
47
+ # to skip metadata generation. This currently only affects docs.
48
+ omit_metadata = []
40
49
 
41
50
  [lib]
42
51
  crate-type = ["rlib"]
@@ -66,5 +75,5 @@ default-features = false
66
75
  features = ["prost-derive", "std"]
67
76
 
68
77
  [dependencies.ts-rs]
69
- version = "9.0.1"
78
+ version = "10.0.0"
70
79
  features = ["serde-json-impl", "no-serde-warnings"]
@@ -24,7 +24,7 @@ fn prost_build() -> Result<()> {
24
24
  // This source file is included at `publish` time, but not `sbuild` time
25
25
  // because it is initially generated from the `perspective.proto` definition
26
26
  // in the C++ source.
27
- if std::env::var("CARGO_FEATURE_EXTERNAL_PROTO").is_ok() {
27
+ if std::env::var("CARGO_FEATURE_GENERATE_PROTO").is_ok() {
28
28
  println!("cargo:warning=MESSAGE Building in development mode");
29
29
  let root_dir_env = std::env::var("PSP_ROOT_DIR").expect("Must set PSP_ROOT_DIR");
30
30
  let root_dir = Path::new(root_dir_env.as_str());
@@ -36,8 +36,19 @@ fn prost_build() -> Result<()> {
36
36
 
37
37
  println!("cargo:rerun-if-changed={}", proto_file.to_str().unwrap());
38
38
 
39
- #[cfg(feature = "external-proto")]
39
+ // prost_build reads PROTOC from the environment. When the `protobuf-src`
40
+ // feature is enabled, the build script sets PROTOC to the one built by
41
+ // that crate. When protobuf-src is disabled, builders must set PROTOC
42
+ // in the environment to a protocol buffer compiler.
43
+ #[cfg(feature = "protobuf-src")]
40
44
  std::env::set_var("PROTOC", protobuf_src::protoc());
45
+ #[cfg(not(feature = "protobuf-src"))]
46
+ if std::env::var("PROTOC").is_err() {
47
+ panic!(
48
+ "generate-proto is enabled and protobuf-src is disabled. PROTOC must be set in \
49
+ the environment to the path of a protocol buffer compiler"
50
+ )
51
+ }
41
52
 
42
53
  prost_build::Config::new()
43
54
  // .bytes(["ViewToArrowResp.arrow", "from_arrow"])
@@ -3,5 +3,5 @@ which may be invoked by the Perspective runtime when updates occur. If provided
3
3
  a _loop callback_ function via [`Client::set_loop_callback`], such callback
4
4
  function invocations be passed to the _loop callback_ instead.
5
5
 
6
- [`Client::set_loop_callback`] can be used to control scheduling/conflation
7
- (e.g. by adding a delay), as well as executor integration.
6
+ [`Client::set_loop_callback`] can be used to control scheduling/conflation (e.g.
7
+ by adding a delay), as well as executor integration.
@@ -0,0 +1,141 @@
1
+ Perspective supports _expression columns_, which are virtual columns calculated
2
+ as part of the [`crate::View`], optionally using values from its underlying
3
+ [`crate::Table`]'s columns. Such expression columns are defined in Perspective's
4
+ expression language, an extended version of
5
+ [ExprTK](https://github.com/ArashPartow/exprtk), which is itself quite similar
6
+ (in design and features) to expressions in Excel.
7
+
8
+ ## UI
9
+
10
+ Expression columns can be created in `<perspective-viewer>` by clicking the "New
11
+ Column" button at the bottom of the column list, or via the API by adding the
12
+ expression to the `expressions` config key when calling `viewer.restore()`.
13
+
14
+ By default, such expression columns are not "used", and will appear above the
15
+ `Table`'s other deselected columns in the column list, with an additional set of
16
+ buttons for:
17
+
18
+ - _Editing_ the column's expression. Doing so will update the definitions of
19
+ _all_ usage of the expression column.
20
+ - _Deleting_ the column. Clicking `Reset` (or calling the `reset()` method)
21
+ will not delete expressions unless the `Shift` key is held (or `true`
22
+ parameter supplied, respectively). This button only appears if the
23
+ expression column i unused.
24
+
25
+ To use the column, just drag/select the column as you would a normal column,
26
+ e.g. as a "Filter", "Group By", etc. Expression columns will recalculate
27
+ whenever their dependent columns update.
28
+
29
+ ## Perspective Extensions to ExprTK
30
+
31
+ ExprTK has its own
32
+ [excellent documentation](http://www.partow.net/programming/exprtk/) which
33
+ covers the core langauge in depth, which is an excellent place to start in
34
+ learning the basics. In addition to these features, Perspective adds a few of
35
+ its own custom extensions and syntax.
36
+
37
+ #### Static Typing
38
+
39
+ In addition to `float` values which ExprTK supports natively, Perspective's
40
+ expression language also supports Perspective's other types `date`, `datetime`,
41
+ `integer`, `boolean`; as well as rudimentary type-checking, which will report an
42
+ <span>error</span> when the values/columns supplied as arguments cannot be
43
+ resolved to the expected type, e.g. `length(x)` expects an argument `x` of type
44
+ `string` and is not a valid expression for an `x` of another type. Perspective
45
+ supplies a set of _cast_ functions for converting between types where possible
46
+ e.g. `string(x)` to cast a variable `x` to a `string`.
47
+
48
+ #### Expression Column Name
49
+
50
+ Expressions can be _named_ by providing a comment as the first line of the
51
+ expression. This name will be used in the `<perspective-viewer>` UI when
52
+ referring to the column, but will also be used in the API when specifying e.g.
53
+ `group_by` or `sort` fields. When creating a new column via
54
+ `<oerspective-viewer>`'s expression editor, new columns will get a default name
55
+ (which you may delete or change):
56
+
57
+ ```html
58
+ // New Column 1
59
+ ```
60
+
61
+ Without such a comment, an expression will show up in the `<perspective-viewer>`
62
+ API and UI as itself (clipped to a reasonable length for the latter).
63
+
64
+ #### Referencing [`crate::Table`] Columns
65
+
66
+ Columns from the [`crate::Table`] can be referenced in an expression with
67
+ _double quotes_.
68
+
69
+ ```text
70
+ // Expected Sales ("Sales" * 10) + "Profit"
71
+ ```
72
+
73
+ #### String Literals
74
+
75
+ In contrast to standard ExprTK, string literals are declared with _single
76
+ quotes_:
77
+
78
+ ```text
79
+ // Profitable
80
+ if ("Profit" > 0) {
81
+ 'Stonks'
82
+ } else {
83
+ 'Not Stonks'
84
+ }
85
+ ```
86
+
87
+ #### Extended Library
88
+
89
+ Perspective adds many of its own functions in addition to `ExprTK`'s standard
90
+ ones, including common functions for `datetime` and `string` types such as
91
+ `substring()`, `bucket()`, `day_of_week()`, etc. A full list of available
92
+ functions is available in the
93
+ [Expression Columns API](../obj/perspective-viewer-exprtk).
94
+
95
+ ## Examples
96
+
97
+ #### Casting
98
+
99
+ Just `2`, as an `integer` (numeric literals currently default to `float` unless
100
+ cast).
101
+
102
+ ```text
103
+ integer(2)
104
+ ```
105
+
106
+ #### Variables
107
+
108
+ ```text
109
+ // My Column Name
110
+ var incrementedBy200 := "Sales" + 200;
111
+ var half := incrementedBy200 / 2;
112
+ half
113
+ ```
114
+
115
+ ```text
116
+ // Complex Expression
117
+ var upperCustomer := upper("Customer Name");
118
+ var separator := concat(upperCustomer, ' | ');
119
+ var profitRatio := floor(percent_of("Profit", "Sales")); // Remove trailing decimal.
120
+ var combined := concat(separator, string(profitRatio));
121
+ var percentDisplay := concat(combined, '%');
122
+ percentDisplay
123
+ ```
124
+
125
+ #### Conditionals
126
+
127
+ ```text
128
+ // Conditional
129
+ var priceAdjustmentDate := date(2016, 6, 18);
130
+ var finalPrice := "Sales" - "Discount";
131
+ var additionalModifier := 0;
132
+
133
+ if("Order Date" > priceAdjustmentDate) {
134
+ finalPrice -= 5;
135
+ additionalModifier -= 2;
136
+ }
137
+ else
138
+ finalPrice += 5;
139
+
140
+ finalPrice + additionalModifier
141
+ ```
@@ -1 +1,2 @@
1
- Removes a listener with a given ID, as returned by a previous call to [`Table::on_delete`].
1
+ Removes a listener with a given ID, as returned by a previous call to
2
+ [`Table::on_delete`].
@@ -0,0 +1,281 @@
1
+ [`Table`] is Perspective's columnar data frame, analogous to a Pandas
2
+ `DataFrame` or Apache Arrow, supporting append & in-place updates, removal by
3
+ index, and update notifications.
4
+
5
+ A [`Table`] contains columns, each of which have a unique name, are strongly and
6
+ consistently typed, and contains rows of data conforming to the column's type.
7
+ Each column in a [`Table`] must have the same number of rows, though not every
8
+ row must contain data; null-values are used to indicate missing values in the
9
+ dataset.
10
+
11
+ The schema of a [`Table`] is _immutable after creation_, which means the column
12
+ names and data types cannot be changed after the [`Table`] has been created.
13
+ Columns cannot be added or deleted after creation either, but a [`View`] can be
14
+ used to select an arbitrary set of columns from the [`Table`].
15
+
16
+ <div class="javascript">
17
+ <div class="warning">
18
+ The examples in this module are in JavaScript. See <a href="https://docs.rs/crate/perspective/latest"><code>perspective</code></a> docs for the Rust API.
19
+ </div>
20
+ </div>
21
+ <div class="python">
22
+ <div class="warning">
23
+ The examples in this module are in Python. See <a href="https://docs.rs/crate/perspective/latest"><code>perspective</code></a> docs for the Rust API.
24
+ </div>
25
+ </div>
26
+
27
+ ## Schema and Types
28
+
29
+ The mapping of a `Table`'s column names to data types is referred to as a
30
+ `schema`. Each column has a unique name and a single data type:
31
+
32
+ <div class="javascript">
33
+
34
+ ```javascript
35
+ var schema = {
36
+ x: "integer",
37
+ y: "string",
38
+ z: "boolean",
39
+ };
40
+
41
+ const table2 = await worker.table(schema);
42
+ ```
43
+
44
+ </div>
45
+ <div class="python">
46
+
47
+ ```python
48
+ from datetime import date, datetime
49
+
50
+ schema = {
51
+ "x": "integer",
52
+ "y": "string",
53
+ "z": "boolean",
54
+ }
55
+
56
+ table2 = perspective.Table(schema)
57
+ ```
58
+
59
+ </div>
60
+ <div class="rust">
61
+
62
+ ```rust
63
+ let data = TableData::Schema(vec![(" a".to_string(), ColumnType::FLOAT)]);
64
+ let options = TableInitOptions::default();
65
+ let table = client.table(data.into(), options).await?;
66
+ ```
67
+
68
+ </div>
69
+
70
+ When passing data directly to the [`crate::Client::table`] constructor, the type
71
+ of each column is inferred automatically. In some cases, the inference algorithm
72
+ may not return exactly what you'd like. For example, a column may be interpreted
73
+ as a `datetime` when you intended it to be a `string`, or a column may have no
74
+ values at all (yet), as it will be updated with values from a real-time data
75
+ source later on. In these cases, create a `table()` with a _schema_.
76
+
77
+ Once the [`Table`] has been created with a schema, further `update()` calls will
78
+ no longer perform type inference, so columns must only include values supported
79
+ by the column's [`ColumnType`].
80
+
81
+ ## Data Formats
82
+
83
+ A [`Table`] may also be created-or-updated by data in CSV,
84
+ [Apache Arrow](https://arrow.apache.org/), JSON row-oriented or JSON
85
+ column-oriented formats.
86
+
87
+ <div class="python">
88
+
89
+ In addition to these core formats, `perspective-python` additionally supports
90
+ `pyarrow.Table` and `pandas.DataFrame` objects directly. These formats are
91
+ otherwise identical to the built-in formats and don't exhibit any additional
92
+ support or type-awareness; e.g., `pandas.DataFrame` support is _just_
93
+ `pyarrow.Table.from_pandas` piped into Perspective's Arrow reader.
94
+
95
+ </div>
96
+
97
+ [`crate::Client::table`] and [`Table::update`] perform _coercion_ on their input
98
+ for all input formats _except_ Arrow (which comes with its own schema and has no
99
+ need for coercion).
100
+
101
+ `"date"` and `"datetime"` column types do not have native JSON representations,
102
+ so these column types _cannot_ be inferred from JSON input. Instead, for columns
103
+ of these types for JSON input, a [`Table`] must first be constructed with a
104
+ _schema_. Next, call [`Table::update`] with the JSON input - Perspective's JSON
105
+ reader may _coerce_ a `date` or `datetime` from these native JSON types:
106
+
107
+ - `integer` as milliseconds-since-epoch.
108
+ - `string` as a any of Perspective's built-in date format formats.
109
+ - JavaScript `Date` and Python `datetime.date` and `datetime.datetime` are
110
+ _not_ supported directly. However, in JavaScript `Date` types are
111
+ automatically coerced to correct `integer` timestamps by default when
112
+ converted to JSON.
113
+
114
+ For CSV input types, Perspective relies on Apache Arrow's CSV parser, and as
115
+ such uses the same column-type inference logic as Arrow itself.
116
+
117
+ ## Index and Limit
118
+
119
+ Initializing a [`Table`] with an `index` tells Perspective to treat a column as
120
+ the primary key, allowing in-place updates of rows. Only a single column (of any
121
+ type) can be used as an `index`. Indexed [`Table`] instances allow:
122
+
123
+ - In-place _updates_ whenever a new row shares an `index` values with an
124
+ existing row
125
+ - _Partial updates_ when a data batch omits some column.
126
+ - _Removes_ to delete a row by `index`.
127
+
128
+ To create an indexed `Table`, provide the `index` property with a string column
129
+ name to be used as an index:
130
+
131
+ <div class="javascript">
132
+
133
+ ```javascript
134
+ const indexed_table = await perspective.table(data, { index: "a" });
135
+ ```
136
+
137
+ </div>
138
+ <div class="javascript">
139
+
140
+ ```python
141
+ indexed_table = perspective.Table(data, index="a");
142
+ ```
143
+
144
+ </div>
145
+
146
+ Initializing a [`Table`] with a `limit` sets the total number of rows the
147
+ [`Table`] is allowed to have. When the [`Table`] is updated, and the resulting
148
+ size of the [`Table`] would exceed its `limit`, rows that exceed `limit`
149
+ overwrite the oldest rows in the [`Table`]. To create a [`Table`] with a
150
+ `limit`, provide the `limit` property with an integer indicating the maximum
151
+ rows:
152
+
153
+ <div class="javascript">
154
+
155
+ ```javascript
156
+ const limit_table = await perspective.table(data, { limit: 1000 });
157
+ ```
158
+
159
+ </div>
160
+ <div class="python">
161
+
162
+ ```python
163
+ limit_table = perspective.Table(data, limit=1000);
164
+ ```
165
+
166
+ </div>
167
+
168
+ ## [`Table::update`] and [`Table::remove`]
169
+
170
+ Once a [`Table`] has been created, it can be updated with new data conforming to
171
+ the [`Table`]'s schema. [`Table::update`] supports the same data formats as
172
+ [`crate::Client::table`], minus _schema_.
173
+
174
+ <div class="javascript">
175
+
176
+ ```javascript
177
+ const schema = {
178
+ a: "integer",
179
+ b: "float",
180
+ };
181
+
182
+ const table = await perspective.table(schema);
183
+ table.update(new_data);
184
+ ```
185
+
186
+ </div>
187
+ <div class="python">
188
+
189
+ ```python
190
+ schema = {"a": "integer", "b": "float"}
191
+
192
+ table = perspective.Table(schema)
193
+ table.update(new_data)
194
+ ```
195
+
196
+ </div>
197
+
198
+ Without an `index` set, calls to `update()` _append_ new data to the end of the
199
+ `Table`. Otherwise, Perspective allows
200
+ [_partial updates_ (in-place)](#index-and-limit) using the `index` to determine
201
+ which rows to update:
202
+
203
+ <div class="javascript">
204
+
205
+ ```javascript
206
+ indexed_table.update({ id: [1, 4], name: ["x", "y"] });
207
+ ```
208
+
209
+ </div>
210
+ <div class="python">
211
+
212
+ ```python
213
+ indexed_table.update({"id": [1, 4], "name": ["x", "y"]})
214
+ ```
215
+
216
+ </div>
217
+
218
+ Any value on a [`Client::table`] can be unset using the value `null` in JSON or
219
+ Arrow input formats. Values may be unset on construction, as any `null` in the
220
+ dataset will be treated as an unset value. [`Table::update`] calls do not need
221
+ to provide _all columns_ in the [`Table`]'s schema; missing columns will be
222
+ omitted from the [`Table`]'s updated rows.
223
+
224
+ <div class="javascript">
225
+
226
+ ```javascript
227
+ table.update([{ x: 3, y: null }]); // `z` missing
228
+ ```
229
+
230
+ </div>
231
+ <div class="python">
232
+
233
+ ```python
234
+ table.update([{"x": 3, "y": None}]) // `z` missing
235
+ ```
236
+
237
+ </div>
238
+
239
+ Rows can also be removed from an indexed [`Table`], by calling [`Table::remove`]
240
+ with an array of index values:
241
+
242
+ <div class="javascript">
243
+
244
+ ```javascript
245
+ indexed_table.remove([1, 4]);
246
+ ```
247
+
248
+ </div>
249
+ <div class="python">
250
+
251
+ ```python
252
+ indexed_table.remove([1, 4])
253
+ ```
254
+
255
+ </div>
256
+
257
+ # [`Table::clear`] and [`Table::replace`]
258
+
259
+ Calling [`Table::clear`] will remove all data from the underlying [`Table`].
260
+ Calling [`Table::replace`] with new data will clear the [`Table`], and update it
261
+ with a new dataset that conforms to Perspective's data types and the existing
262
+ schema on the `Table`.
263
+
264
+ <div class="javascript">
265
+
266
+ ```javascript
267
+ table.clear();
268
+ table.replace(json);
269
+ ```
270
+
271
+ </div>
272
+ <div class="python">
273
+
274
+ ```python
275
+ table.clear()
276
+ table.replace(df)
277
+ ```
278
+
279
+ </div>
280
+
281
+ <div class="warning">`limit` cannot be used in conjunction with `index`.</div>
@@ -1,3 +1,5 @@
1
- Returns an array of strings containing the column paths of the View without any of the source columns.
1
+ Returns an array of strings containing the column paths of the View without any
2
+ of the source columns.
2
3
 
3
- A column path shows the columns that a given cell belongs to after pivots are applied.
4
+ A column path shows the columns that a given cell belongs to after pivots are
5
+ applied.
@@ -0,0 +1,3 @@
1
+ Delete this [`View`] and clean up all resources associated with it. View objects
2
+ do not stop consuming resources or processing updates when they are garbage
3
+ collected - you must call this method to reclaim these.