Skip to content

Commit

Permalink
Merge pull request #369 from pkgw/disable-zenodo
Browse files Browse the repository at this point in the history
ci: temporarily disable Zenodo so we can get a release out
  • Loading branch information
pkgw committed Nov 28, 2023
2 parents 4bd4fc5 + ce7e470 commit 6e75020
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 58 deletions.
23 changes: 21 additions & 2 deletions ci/azure-build-and-test.yml
Expand Up @@ -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
Expand All @@ -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
Expand Down
62 changes: 32 additions & 30 deletions ci/azure-deployment.yml
Expand Up @@ -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)
14 changes: 8 additions & 6 deletions ci/azure-sdist.yml
Expand Up @@ -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
Expand Down
45 changes: 25 additions & 20 deletions pywwt/core.py
Expand Up @@ -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",
Expand Down Expand Up @@ -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`)"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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"] = {
Expand Down

0 comments on commit 6e75020

Please sign in to comment.