diff --git a/ci/azure-build-and-test.yml b/ci/azure-build-and-test.yml index 962bb45f..777de085 100644 --- a/ci/azure-build-and-test.yml +++ b/ci/azure-build-and-test.yml @@ -213,11 +213,31 @@ jobs: parameters: setupBuild: true + # We install some extra deps here to make the docs build happy (it needs to + # import everything) while avoiding clashes between Conda and pip. - bash: | set -euo pipefail source activate-conda.sh set -x - \conda create -y -n build setuptools matplotlib pip pyopengl 'pyqt>=5.12' pyqtwebengine python=3.9 qtpy scipy shapely + \conda create -y -n build \ + astropy \ + astropy-sphinx-theme \ + ipykernel \ + jupyter_sphinx \ + matplotlib \ + nbclassic \ + numpydoc \ + pip \ + pyopengl \ + 'pyqt>=5.12' \ + pyqtwebengine \ + python=3.9 \ + qtpy \ + scipy \ + setuptools \ + shapely \ + sphinx \ + sphinx-automodapi conda activate build pip install $BASH_WORKSPACE/sdist/*.tar.gz displayName: Install from sdist @@ -230,7 +250,6 @@ jobs: source activate-conda.sh conda activate build set -x - \conda install -y astropy astropy-sphinx-theme ipykernel jupyter_sphinx nbclassic numpydoc sphinx sphinx-automodapi cd docs make html displayName: Build docs diff --git a/ci/azure-deployment.yml b/ci/azure-deployment.yml index 23725ba3..9bf955a7 100644 --- a/ci/azure-deployment.yml +++ b/ci/azure-deployment.yml @@ -111,33 +111,35 @@ jobs: - bash: shred ~/.npmrc displayName: Clean up credentials - - job: zenodo_publish - pool: - vmImage: ubuntu-latest - variables: - - group: Deployment Credentials - - steps: - - template: azure-job-setup.yml - parameters: - setupCranko: true - - - bash: | - set -xeuo pipefail - - if cranko show if-released --exit-code pypa:pywwt ; then - cranko zenodo upload-artifacts --metadata=ci/zenodo.json5 $BASH_WORKSPACE/sdist/*.tar.gz - fi - displayName: Upload source tarball - env: - ZENODO_TOKEN: $(ZENODO_TOKEN) - - - bash: | - set -xeuo pipefail - - if cranko show if-released --exit-code pypa:pywwt ; then - cranko zenodo publish --metadata=ci/zenodo.json5 - fi - displayName: Publish to Zenodo - env: - ZENODO_TOKEN: $(ZENODO_TOKEN) + # 2023 Nov: temporarily disabling Zenodo; they have just updated their API and broken + # everything, and we want to ge a release out. + #- job: zenodo_publish + # pool: + # vmImage: ubuntu-latest + # variables: + # - group: Deployment Credentials + # + # steps: + # - template: azure-job-setup.yml + # parameters: + # setupCranko: true + # + # - bash: | + # set -xeuo pipefail + # + # if cranko show if-released --exit-code pypa:pywwt ; then + # cranko zenodo upload-artifacts --metadata=ci/zenodo.json5 $BASH_WORKSPACE/sdist/*.tar.gz + # fi + # displayName: Upload source tarball + # env: + # ZENODO_TOKEN: $(ZENODO_TOKEN) + # + # - bash: | + # set -xeuo pipefail + # + # if cranko show if-released --exit-code pypa:pywwt ; then + # cranko zenodo publish --metadata=ci/zenodo.json5 + # fi + # displayName: Publish to Zenodo + # env: + # ZENODO_TOKEN: $(ZENODO_TOKEN) diff --git a/ci/azure-sdist.yml b/ci/azure-sdist.yml index 859ebdc6..ea790a7a 100644 --- a/ci/azure-sdist.yml +++ b/ci/azure-sdist.yml @@ -29,12 +29,14 @@ jobs: - bash: cranko release-workflow apply-versions displayName: Apply Cranko versions - - bash: | - cranko zenodo preregister --metadata=ci/zenodo.json5 pypa:pywwt pywwt/_version.py CHANGELOG.md - displayName: "Preregister Zenodo DOI" - ${{ if and(eq(variables['Build.SourceBranchName'], 'rc'), ne(variables['build.reason'], 'PullRequest')) }}: - env: - ZENODO_TOKEN: $(ZENODO_TOKEN) + # 2023 Nov: temporarily disabling Zenodo; they have just updated their API and broken + # everything, and we want to ge a release out. + # - bash: | + # cranko zenodo preregister --metadata=ci/zenodo.json5 pypa:pywwt pywwt/_version.py CHANGELOG.md + # displayName: "Preregister Zenodo DOI" + # ${{ if and(eq(variables['Build.SourceBranchName'], 'rc'), ne(variables['build.reason'], 'PullRequest')) }}: + # env: + # ZENODO_TOKEN: $(ZENODO_TOKEN) - bash: | set -xeuo pipefail diff --git a/pywwt/core.py b/pywwt/core.py index cc29fd7e..87b2fc60 100644 --- a/pywwt/core.py +++ b/pywwt/core.py @@ -610,8 +610,9 @@ def instruments(self): ).tag(wwt="altAzGridColor", wwt_reset=True) alt_az_text = Bool( - False, help='Whether to show labels for the altitude-azimuth grid\'s text ' '(`bool`)' - ).tag(wwt='showAltAzGridText', wwt_reset=True) + False, + help="Whether to show labels for the altitude-azimuth grid's text " "(`bool`)", + ).tag(wwt="showAltAzGridText", wwt_reset=True) background = Unicode( "Hydrogen Alpha Full Sky Map", @@ -651,13 +652,15 @@ def instruments(self): ).tag(wwt="showConstellationSelection", wwt_reset=True) constellation_pictures = Bool( - False, help='Whether to show pictures of the constellations\' ' - 'mythological representations ' '(`bool`)' - ).tag(wwt='showConstellationPictures', wwt_reset=True) + False, + help="Whether to show pictures of the constellations' " + "mythological representations " + "(`bool`)", + ).tag(wwt="showConstellationPictures", wwt_reset=True) constellation_labels = Bool( - False, help='Whether to show labels for constellations ' '(`bool`)' - ).tag(wwt='showConstellationLabels', wwt_reset=True) + False, help="Whether to show labels for constellations " "(`bool`)" + ).tag(wwt="showConstellationLabels", wwt_reset=True) crosshairs = Bool( False, help="Whether to show crosshairs at the center of " "the field (`bool`)" @@ -711,8 +714,8 @@ def instruments(self): ).tag(wwt="galacticGridColor", wwt_reset=True) galactic_text = Bool( - False, help='Whether to show labels for the galactic grid\'s text ' '(`bool`)' - ).tag(wwt='showGalacticGridText', wwt_reset=True) + False, help="Whether to show labels for the galactic grid's text " "(`bool`)" + ).tag(wwt="showGalacticGridText", wwt_reset=True) grid = Bool(False, help="Whether to show the equatorial grid " "(`bool`)").tag( wwt="showGrid", wwt_reset=True @@ -871,11 +874,13 @@ def center_on_coordinates(self, coord, fov=60 * u.deg, roll=None, instant=True): desired location. """ coord_icrs = coord.icrs - msg = dict(event="center_on_coordinates", - ra=coord_icrs.ra.deg, - dec=coord_icrs.dec.deg, - fov=fov.to(u.deg).value, - instant=instant) + msg = dict( + event="center_on_coordinates", + ra=coord_icrs.ra.deg, + dec=coord_icrs.dec.deg, + fov=fov.to(u.deg).value, + instant=instant, + ) if roll is not None: msg["roll"] = roll.to(u.deg).value self._send_msg(**msg) @@ -1069,11 +1074,11 @@ def load_image_collection(self, url, recursive=False, remote_only=False): nest_asyncio.apply() loop = asyncio.get_event_loop() - loop.run_until_complete(self._send_into_future( - event="load_image_collection", - url=url, - loadChildFolders=recursive - )) + loop.run_until_complete( + self._send_into_future( + event="load_image_collection", url=url, loadChildFolders=recursive + ) + ) @property def available_layers(self): @@ -1341,7 +1346,7 @@ def _serialize_state(self, title, max_width, max_height): "ra": center.icrs.ra.deg, "dec": center.icrs.dec.deg, "fov": fov.to_value(u.deg), - "roll": roll.to_value(u.deg) + "roll": roll.to_value(u.deg), } state["foreground_settings"] = {