Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .readthedocs_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies:
- pip
- pyopengl
- pyqt
- pyqtwebengine
- pyqtwebkit
- python=3.8
- qt
- qtpy
Expand Down
8 changes: 4 additions & 4 deletions ci/azure-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
set -euo pipefail
source activate-conda.sh
set -x
\conda create -y -n build setuptools matplotlib pip pyopengl 'pyqt>=5.12' python="$PYTHON_SERIES" qtpy
\conda create -y -n build setuptools matplotlib pip pyopengl 'pyqt>=5.12' pyqtwebkit python="$PYTHON_SERIES" qtpy
conda activate build
pip install $BASH_WORKSPACE/sdist/*.tar.gz
displayName: Install from sdist
Expand All @@ -89,7 +89,7 @@ jobs:

- bash: |
set -e
git clone --depth 1 git://github.com/pyvista/gl-ci-helpers.git
git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git
powershell gl-ci-helpers/appveyor/install_opengl.ps1
echo "##vso[task.setvariable variable=QT_OPENGL;]software"
echo "##vso[task.setvariable variable=QTWEBENGINE_CHROMIUM_FLAGS;]--enable-webgl-software-rendering"
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
set -euo pipefail
source activate-conda.sh
set -x
\conda create -y -n build setuptools matplotlib pip pyopengl 'pyqt>=5.12' python=3.8 qtpy
\conda create -y -n build setuptools matplotlib pip pyopengl 'pyqt>=5.12' pyqtwebkit python=3.8 qtpy
conda activate build
pip install $BASH_WORKSPACE/sdist/*.tar.gz
displayName: Install from sdist
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
set -euo pipefail
source activate-conda.sh
set -x
\conda create -y -n build setuptools matplotlib pip pyopengl 'pyqt>=5.12' python=3.8 qtpy
\conda create -y -n build setuptools matplotlib pip pyopengl 'pyqt>=5.12' pyqtwebkit python=3.8 qtpy
conda activate build
pip install $BASH_WORKSPACE/sdist/*.tar.gz
displayName: Install from sdist
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# The full version, including alpha/beta/rc tags.
release = version

language = None
language = "en"

exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

Expand All @@ -44,7 +44,7 @@
"astropy_project_menubar": False,
}
html_static_path = ["_static"]
html_sidebars = { '**': ['localtoc.html', 'searchbox.html'] }
html_sidebars = {"**": ["localtoc.html", "searchbox.html"]}

htmlhelp_basename = "pywwtdoc"

Expand Down
2 changes: 2 additions & 0 deletions docs/jupyter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ This will then look like:
Once the AAS WorldWide Telescope widget is visible, you can start to interact
with the ``wwt`` object in the next cell of the notebook. You can find out more
about interacting with this object in :doc:`settings` and :doc:`annotations`.
See also the API documentation of the :class:`~pywwt.jupyter.WWTJupyterWidget`
class.

.. note:: If the widget appears with a vertical scrollbar, you can remove it
and show the whole viewer at once by clicking on the left side of the
Expand Down
34 changes: 24 additions & 10 deletions pywwt/jupyter.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,20 @@ class WWTJupyterWidget(widgets.DOMWidget, BaseWWTWidget):

hide_all_chrome : optional `bool`
Configures the WWT frontend to hide all user-interface "chrome".

app_url : optional `str`
The URL from which to load the WWT "research app" web application. By
default, this points to a copy of the application bundled with pywwt and
made available through the WWT Kernel Data Relay system. If you know
that your Jupyter notebook server definitely has pywwt installed as a
server extension, you can specify ``"/wwtstatic/research/"`` here to get
a version loaded directly from the server, which will be somewhat more
reliable if you're doing tricky things with widgets and restarting your
kernels a lot. You can also specify an absolute URL, such as
``"https://web.wwtassets.org/research/latest/"``, which is the canonical
location for the WWT-hosted version of the app — although at the moment
we can't think of any good reason to use it here. If the URL given here
does not contain a protocol (``https://...``), it will be combined with
the Jupyter server's "base URL".
"""

_view_name = Unicode("WWTView").tag(sync=True)
Expand All @@ -49,17 +62,18 @@ class WWTJupyterWidget(widgets.DOMWidget, BaseWWTWidget):

_appUrl = Unicode("").tag(sync=True)

def __init__(self, hide_all_chrome=False):
# Set up to serve the bundled app. In the future we might want to make
# it possible to use the WWT-hosted app instead of the bundled version.
#
# The JS frontend will automagically prepend the Jupyter base URL if
# needed and turn this into an absolute URL.

def __init__(self, hide_all_chrome=False, app_url=None):
# Set up Kernel Data Relay expedited message processing.
_maybe_perpetrate_mega_kernel_hack()

hub = get_relay_hub()
self._appUrl = hub.get_static_files_url() + "research/"
# Serve the bundled app by default. Regardless of whether we're using
# that or a user-specified value, the JS frontend will automagically
# prepend the Jupyter base URL if needed so that the client always gets
# an absolute URL.
if app_url is None:
hub = get_relay_hub()
app_url = hub.get_static_files_url() + "research/"
self._appUrl = app_url

widgets.DOMWidget.__init__(self)
dom_listener.source = self
Expand Down
Binary file removed pywwt/tests/data/refimg_image_layer_equ/d.png
Binary file not shown.
Binary file removed pywwt/tests/data/refimg_image_layer_equ/e.png
Binary file not shown.
Binary file removed pywwt/tests/data/refimg_image_layer_equ/f.png
Binary file not shown.
Binary file added pywwt/tests/data/refimg_image_layer_equ/g.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pywwt/tests/data/refimg_image_layer_equ/h.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pywwt/tests/data/refimg_image_layer_equ/i.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed pywwt/tests/data/refimg_image_layer_gal/d.png
Binary file not shown.
Binary file added pywwt/tests/data/refimg_image_layer_gal/e.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pywwt/tests/data/refimg_image_layer_gal/f.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed pywwt/tests/data/refimg_qt_full_step2/d.png
Binary file not shown.
Binary file removed pywwt/tests/data/refimg_qt_full_step2/e.png
Binary file not shown.
Binary file added pywwt/tests/data/refimg_qt_full_step2/f.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed pywwt/tests/data/refimg_qt_full_step3/d.png
Binary file not shown.
Binary file removed pywwt/tests/data/refimg_qt_full_step3/e.png
Binary file not shown.
Binary file added pywwt/tests/data/refimg_qt_full_step3/f.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed pywwt/tests/data/refimg_qt_full_step4/d.png
Binary file not shown.
Binary file removed pywwt/tests/data/refimg_qt_full_step4/e.png
Binary file not shown.
Binary file added pywwt/tests/data/refimg_qt_full_step4/f.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed pywwt/tests/data/refimg_qt_full_step5/d.png
Binary file not shown.
Binary file removed pywwt/tests/data/refimg_qt_full_step5/e.png
Binary file not shown.
Binary file added pywwt/tests/data/refimg_qt_full_step5/f.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.