Skip to content

Commit

Permalink
Release request commit created with Cranko.
Browse files Browse the repository at this point in the history
+++ cranko-rc-info-v1
[[projects]]
qnames = ["pywwt", "pypa"]
bump_spec = "minor bump"

+++
  • Loading branch information
cranko committed Jul 28, 2023
2 parents efd80f7 + 449f88a commit 35f633e
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 119 deletions.
22 changes: 16 additions & 6 deletions .check_enabled.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,32 @@
import sys

from jupyterlab.commands import get_app_info
from notebook.nbextensions import validate_nbextension
from notebook.serverextensions import validate_serverextension

try:
from nbclassic.nbextensions import validate_nbextension
except ImportError:
# `notebook` <= 6
from notebook.nbextensions import validate_nbextension

try:
from nbclassic.serverextensions import validate_serverextension
except ImportError:
# `notebook` <= 6
from notebook.serverextensions import validate_serverextension

# If there's a problem and we don't provide this, the validate function crashes :-(
logger = logging.getLogger('')
logger = logging.getLogger("")

if validate_nbextension('pywwt/extension', logger=logger) != []:
if validate_nbextension("pywwt/extension", logger=logger) != []:
print("Issue detected with nbextension")
sys.exit(1)

info = get_app_info()

if 'pywwt' not in info['extensions'] or 'pywwt' in info['disabled']:
if "pywwt" not in info["extensions"] or "pywwt" in info["disabled"]:
print("Issue detected with labextension")
sys.exit(1)

if validate_serverextension('pywwt', logger=logger) != []:
if validate_serverextension("pywwt", logger=logger) != []:
print("Issue detected with serverextension")
sys.exit(1)
1 change: 1 addition & 0 deletions .readthedocs_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dependencies:
- krb5
- lxml
- matplotlib
- nbclassic
- nodejs
- notebook
- numpydoc
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# rc: minor bump

- Update `pywwt` to work with version 7 of the Jupyter `notebook` package (#356,
@Carifio24, @pkgw). This new version is a major update on the Jupyter side,
but it is only used in a few minor places within `pywwt`. The `pywwt` package
should remain compatible with older versions of `notebook`.
- Fix pywwt’s default ecliptic grid color to match the engine (#356,
@Carifio24).


# pypa:pywwt 0.20.0 (2023-07-06)

- Expose new engine settings relating to the display of constellations,
coordinate grids, and their colors (#354, #355, @Carifio24). New properties
are `alt_az_grid_color`, `alt_az_text`, `constellation_pictures`,
Expand Down
6 changes: 3 additions & 3 deletions ci/azure-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ jobs:
source activate-conda.sh
conda activate build
set -x
\conda install -y jupyterlab jupyter_contrib_nbextensions
jupyter nbextension list
jupyter serverextension list
\conda install -y jupyterlab nbclassic
jupyter nbclassic-extension list
jupyter nbclassic-serverextension list
jupyter labextension list
displayName: Print Jupyter extension status
Expand Down
19 changes: 12 additions & 7 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,18 @@ this repository and install the package manually (note that this requires `npm
cd pywwt
pip install -e .

If you want to use the Jupyter widget, you will also need to run::

jupyter nbextension install --py --symlink --sys-prefix pywwt
jupyter nbextension enable --py --sys-prefix pywwt
jupyter nbextension list # check that the output shows pywwt as enabled and OK
jupyter serverextension enable --py --sys-prefix pywwt
jupyter serverextension list # check that the output shows pywwt as enabled and OK
If you want to use the Jupyter widget with a recent installation of the Jupyter
stack, you will also need to run::

jupyter nbclassic-extension install --py --symlink --sys-prefix pywwt
jupyter nbclassic-extension enable --py --sys-prefix pywwt
jupyter nbclassic-extension list # check that the output shows pywwt as enabled and OK
jupyter nbclassic-serverextension enable --py --sys-prefix pywwt
jupyter nbclassic-serverextension list # check that the output shows pywwt as enabled and OK

On older versions of Jupyter, use the ``nbextension`` subcommand instead of
``nbclassic-extension``, and use just ``serverextension`` instead of
``nbclassic-serverextension``.

And if you additionally want to use the widget in JupyterLab, run::

Expand Down
103 changes: 6 additions & 97 deletions frontend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,99 +1,8 @@
# rc: micro bump
# See elsewhere for changelog

- Require the version 0.15.0 of the research app, to get new settings for
various grid colors (#355, @Carifio24).
This project’s release notes are curated from the Git history of its main
branch. You can find them by looking at [the version of this file on the
`release` branch][branch] or the [GitHub release history][gh-releases].


# npm:pywwt 1.5.2 (2023-05-30)

- Require the version 0.14.3 of the research app, to get a fix for communicating
information about catalog sources (#353, @pkgw; pulls in
WorldWideTelescope/wwt-webgl-engine#251, @Carifio24).


# npm:pywwt 1.5.1 (2023-05-26)

- Require the version 0.14.2 of the research app, to get a fix for HiPS
catalogs loaded in HTTPS contexts (#352, @pkgw).


# npm:pywwt 1.5.0 (2023-03-08)

- Require version 0.14 of the research app, to get messages allowing the roll
state of the WWT camera to be read and written (#349, @Carifio24).


# npm:pywwt 1.4.0 (2022-12-01)

- Require version 0.12 of the research app, to get the latest improvements
including the Vue 3 update (#342, @pkgw).


# npm:pywwt 1.3.3 (2022-01-19)

- Require version 0.9.2 of the research app, to ensure we have support for
naming imageset layers (#326, @pkgw)


# npm:pywwt 1.3.2 (2022-01-14)

- Fix up license annotations
- Require the latest research-app, version 0.9


# npm:pywwt 1.3.1 (2021-10-14)

- Fix a dumb string-processing bug in the URL canonicalization code that broke
the widget in Jupyter environments where the "base URL" is nontrivial (#314,
@pkgw).


# npm:pywwt 1.3.0 (2021-09-24)

- Bundle the research app in the pywwt distribution; currently requiring version
0.7.1 (#301, #313, @pkgw). Compared to the previous release of this package,
this includes a ton of new features: HiPS catalogs with data retrieval, tiled
FITS, and lots of UI polish!
- Port the ipywidgets frontend to use the research app
- Modify the internal APIs to allow the app to come and go, not just become
ready once


# npm:pywwt 1.2.0 (2021-06-14)

- New release to track internal cleanups in the pywwt Python code; the built-in
widget HTML is now served from `$baseurl/wwt/widget/`, instead of
`$baseurl/wwt/wwt.html`.
- Internal cleanups.


# npm:pywwt 1.1.1 (2021-01-27)

- Proclaim compatibility with the 4.x series of @jupyter-widgets/base. This
should get the widget to work in the JupyterLab 3.x series.


# npm:pywwt 1.1.0 (2020-10-22)

- The Jupyter widget has reworked multi-view management to behave much better
when there are multiple views for the same widget model, or when views are
hidden and recreated.
- The Jupyter widget now exposes a _viewConnected trait to indicate the case
when the widget has been created, but there are no active views presented to
the user. This isn't wired up to the Python layer, but it could be useful
later.


# npm:pywwt 1.0.0 (2020-10-21)

- Address #258 by transmitting WWT clock information using a reference point and
a rate, rather than constantly transmitting the current time. Dramatically
reduces JS <=> Python traffic.
- Tidy up the JavaScript files.


# npm:pywwt 0.9.1 (2020-10-18)

- First release with version number decoupled from the pywwt Python package.
- No code chages, but internal reorganizations including the use of Cranko for
release automation.
[branch]: https://github.com/WorldWideTelescope/pywwt/blob/release/frontend/CHANGELOG.md
[gh-releases]: https://github.com/WorldWideTelescope/pywwt/releases
2 changes: 1 addition & 1 deletion pywwt/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ def instruments(self):
).tag(wwt="showEclipticGrid", wwt_reset=True)

ecliptic_grid_color = Color(
"blue", help="The color of the ecliptic grid " "(`str` or `tuple`)"
"green", help="The color of the ecliptic grid " "(`str` or `tuple`)"
).tag(wwt="eclipticGridColor", wwt_reset=True)

ecliptic_text = Bool(
Expand Down
7 changes: 6 additions & 1 deletion pywwt/jupyter_relay.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,16 @@ def get_relay_hub(kernel=None):
def _list_running_servers_jl3():
import io
import json
from notebook.utils import check_pid
from jupyter_core.paths import jupyter_runtime_dir
import os.path
import re

try:
from jupyter_server.utils import check_pid
except ImportError:
# `notebook` <= 6
from notebook.utils import check_pid

runtime_dir = jupyter_runtime_dir()

if not os.path.isdir(runtime_dir):
Expand Down
17 changes: 13 additions & 4 deletions pywwt/jupyter_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,21 @@
# so let's try to fail gracefully if Jupyter modules are missing. `tornado` is a
# hard requirement appearing in setup.py.
try:
from notebook.utils import url_path_join
from notebook.base.handlers import IPythonHandler
try:
from jupyter_server.utils import url_path_join
except ImportError:
# `notebook` <= 6
from notebook.utils import url_path_join

try:
from jupyter_server.base.handlers import JupyterHandler
except ImportError:
# `notebook` <= 6
from notebook.base.handlers import IPythonHandler as JupyterHandler

HAVE_NOTEBOOK = True
except ImportError:
IPythonHandler = object
JupyterHandler = object
HAVE_NOTEBOOK = False

__all__ = [
Expand All @@ -35,7 +44,7 @@
STATIC_DIR = os.path.join(os.path.dirname(__file__), "web_static")


class WWTStaticFileHandler(IPythonHandler):
class WWTStaticFileHandler(JupyterHandler):
def get(self, filename):
static_path = os.path.join(STATIC_DIR, filename)

Expand Down

0 comments on commit 35f633e

Please sign in to comment.