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", "npm"]
bump_spec = "micro bump"

[[projects]]
qnames = ["pywwt", "pypa"]
bump_spec = "micro bump"

+++
  • Loading branch information
cranko committed Jan 26, 2021
2 parents a43856f + b3844e2 commit 647aeda
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 9 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# rc: micro bump

- Fix the sizing of circle annotations upon creation
- Include the latest bundled version of the JavaScript frontend, which should
hopefully fix the widget in JupyterLab 3.x.


# pypa:pywwt 0.10.3 (2021-01-25)

- Attempt to fix the Qt widget on macOS computers. It appears that a recent
update to our HTML introduced some JavaScript syntax that the Qt framework
doesn't allow.
Expand Down
31 changes: 25 additions & 6 deletions frontend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
# See elsewhere for changelog
# rc: micro bump

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].
- Proclaim compatibility with the 4.x series of @jupyter-widgets/base. This
should get the widget to work in the JupyterLab 3.x series.

[branch]: https://github.com/WorldWideTelescope/pywwt/blob/release/frontend/CHANGELOG.md
[gh-releases]: https://github.com/WorldWideTelescope/pywwt/releases
# 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.
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"url": "https://github.com/WorldWideTelescope/pywwt/issues"
},
"dependencies": {
"@jupyter-widgets/base": "^2 || ^3",
"@jupyter-widgets/base": "^2 || ^3 || ^4",
"underscore": "^1"
},
"description": "AAS WorldWide Telescope from Python",
Expand Down
13 changes: 11 additions & 2 deletions pywwt/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,16 @@ def __init__(self, parent=None, **kwargs):

self.parent._send_msg(event='annotation_create',
id=self.id, shape=self.shape)
super(Annotation, self).__init__(**kwargs)

# Normally we would pass the kwargs off to super().__init__(), but it
# seems that doing so bypasses the validation functions, which (at a
# minimum) causes problems for circles because it doesn't normalize
# their radius measurements to the proper units. Just apply the settings
# manually, which invokes the validation machinery properly.
super(Annotation, self).__init__()

for k, v in kwargs.items():
setattr(self, k, v)

self.parent._annotation_set.add(self)

Expand Down Expand Up @@ -103,7 +112,7 @@ class Circle(Annotation):
line_width = AstropyQuantity(1 * u.pixel,
help='Assigns line width in pixels '
'(:class:`~astropy.units.Quantity`)').tag(wwt='lineWidth')
radius = AstropyQuantity(80 * u.pixel,
radius = AstropyQuantity(1 * u.degree,
help='Sets the radius for the circle '
'(:class:`~astropy.units.Quantity`)').tag(wwt='radius')

Expand Down

0 comments on commit 647aeda

Please sign in to comment.