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

Python API changes from community #2754

Merged
merged 1 commit into from
Sep 22, 2024
Merged

Python API changes from community #2754

merged 1 commit into from
Sep 22, 2024

Conversation

texodus
Copy link
Member

@texodus texodus commented Sep 17, 2024

  • Added a top-level default GLOBAL_SERVER and GLOBAL_CLIENT, and export GLOBAL_CLIENT methods as module-level free functions, similar to Perspective 2.x. Moved Server-instantiating functions like PerspectiveWidget to use GLOBAL_SERVER by default instead.
  • Removed export of non-constructor Perspective types, as apparently the concept of types is scary and confusing to Python programmers.
  • Top-level type exports for Table and View have been removed as they are easily confused with 2.x's class constructors.
  • Moved new_local_client() and from_server methods to portable implementations.
  • pyarrow and pandas are now detected via sys.modules import detection and won't be loaded unless the Python interpreter has already cached these modules. T
  • Removed top-level imports of handlers packages. e.g. from perspective.handlers.tornado import PerspectiveTornadoHandler must be used explicitly now.
  • Removed these re-exports from perspective.handlers as well, and the try/except block which protected lack of these modules in the dependency environment. import perspective.handlers.tornado is now a hard error without tornado installed.
  • Removed top-level PerspectiveWidget import, e.g. from perspective.widget import PerspectiveWidget must be used explicitly now.
  • ipywidgets is no longer a conditional import, and import perspective.widget will hard fail if this module is not installed.
  • Removed Jinja2 dependency
  • Added jupyter, tornado, aiohttp and starlette optional dependency bundles to pyproject.toml. pyarrow and pandas are not included as optional dependencies.
  • Added View.to_dataframe() method.
  • Fixes user docs.
  • Fixed JSON columns reader not respecting index.
  • Fixed Python sdist.

@texodus texodus marked this pull request as draft September 17, 2024 06:12
@texodus texodus added enhancement Feature requests or improvements breaking labels Sep 18, 2024
@texodus texodus marked this pull request as ready for review September 18, 2024 00:20
Signed-off-by: Andrew Stein <[email protected]>

# Conflicts:
#	rust/perspective-python/perspective/__init__.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking enhancement Feature requests or improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant