Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: temporarily disable Zenodo so we can get a release out #369

Merged
merged 3 commits into from
Nov 28, 2023
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
23 changes: 21 additions & 2 deletions ci/azure-build-and-test.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,9 @@
).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 @@
).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 @@
).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 @@
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 @@

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(

Check warning on line 1077 in pywwt/core.py

View check run for this annotation

Codecov / codecov/patch

pywwt/core.py#L1077

Added line #L1077 was not covered by tests
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 @@
"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