forked from bokeh/bokeh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip empty sequences when streaming with ndarrays (bokeh#14007)
* Skip empty sequences when streaming with ndarrays * Add NumPy version to bokeh info * Add release notes * Add print_info() utility function equivalent of `bokeh info`
- Loading branch information
Showing
10 changed files
with
274 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.. _release-3-6-0: | ||
|
||
3.6.0 | ||
===== | ||
|
||
Bokeh version ``3.6.0`` (??? 2024) is a minor milestone of Bokeh project. | ||
|
||
* Improved streaming corner cases and added NumPy to ``bokeh info`` (:bokeh-pull:`14007`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#----------------------------------------------------------------------------- | ||
# Copyright (c) Anaconda, Inc., and Bokeh Contributors. | ||
# All rights reserved. | ||
# | ||
# The full license is in the file LICENSE.txt, distributed with this software. | ||
#----------------------------------------------------------------------------- | ||
|
||
#----------------------------------------------------------------------------- | ||
# Boilerplate | ||
#----------------------------------------------------------------------------- | ||
from __future__ import annotations | ||
|
||
import logging # isort:skip | ||
log = logging.getLogger(__name__) | ||
|
||
#----------------------------------------------------------------------------- | ||
# Imports | ||
#----------------------------------------------------------------------------- | ||
|
||
# Standard library imports | ||
import platform | ||
import sys | ||
|
||
# Bokeh imports | ||
from bokeh import __version__ | ||
from bokeh.settings import settings | ||
from bokeh.util.compiler import nodejs_version, npmjs_version | ||
from bokeh.util.dependencies import import_optional | ||
|
||
#----------------------------------------------------------------------------- | ||
# Globals and constants | ||
#----------------------------------------------------------------------------- | ||
|
||
__all__ = ( | ||
"print_info", | ||
) | ||
|
||
#----------------------------------------------------------------------------- | ||
# General API | ||
#----------------------------------------------------------------------------- | ||
|
||
def print_info() -> None: | ||
""" Print version information about Bokeh, Python, the operating system | ||
and a selected set of dependencies. | ||
""" | ||
# Keep one print() per line, so that users don't have to wait a long | ||
# time for all libraries and dependencies to get loaded. | ||
newline = '\n' | ||
print(f"Python version : {sys.version.split(newline)[0]}") | ||
print(f"IPython version : {_if_installed(_version('IPython', '__version__'))}") | ||
print(f"Tornado version : {_if_installed(_version('tornado', 'version'))}") | ||
print(f"NumPy version : {_if_installed(_version('numpy', '__version__'))}") | ||
print(f"Bokeh version : {__version__}") | ||
print(f"BokehJS static path : {settings.bokehjs_path()}") | ||
print(f"node.js version : {_if_installed(nodejs_version())}") | ||
print(f"npm version : {_if_installed(npmjs_version())}") | ||
print(f"jupyter_bokeh version : {_if_installed(_version('jupyter_bokeh', '__version__'))}") | ||
print(f"Operating system : {platform.platform()}") | ||
|
||
#----------------------------------------------------------------------------- | ||
# Legacy API | ||
#----------------------------------------------------------------------------- | ||
|
||
#----------------------------------------------------------------------------- | ||
# Dev API | ||
#----------------------------------------------------------------------------- | ||
|
||
#----------------------------------------------------------------------------- | ||
# Private API | ||
#----------------------------------------------------------------------------- | ||
|
||
def _if_installed(version_or_none: str | None) -> str: | ||
""" Return the given version or not installed if ``None``. | ||
""" | ||
return version_or_none or "(not installed)" | ||
|
||
def _version(module_name: str, attr: str) -> str | None: | ||
""" Get the version of a module if installed. | ||
""" | ||
module = import_optional(module_name) | ||
return getattr(module, attr) if module else None | ||
|
||
#----------------------------------------------------------------------------- | ||
# Code | ||
#----------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.