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

Add python 3.13 + fix zone_search minor issue #34

Merged
merged 6 commits into from
Nov 22, 2024
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
47 changes: 38 additions & 9 deletions .github/workflows/deploy_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
${{ env.img }} \
bash -exc 'curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
source $HOME/.cargo/env && \
for PYBIN in /opt/python/cp3{8,9,10,11,12}-*/bin; do
for PYBIN in /opt/python/cp*-cp3{8,9,10,11,12,13}/bin; do
echo "Loop on PYBIN: $PYBIN"
"${PYBIN}/pip" install --upgrade pip
"${PYBIN}/pip" install maturin
Expand All @@ -47,7 +47,7 @@ jobs:
"${PYBIN}/maturin" publish -i "${PYBIN}/python" -v --no-sdist --skip-existing --compatibility musllinux_1_2
done'

build-aarch64-wheels:
build-aarch64-wheels-old-pythons:
runs-on: ubuntu-latest
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN_FXP }}
Expand All @@ -63,17 +63,46 @@ jobs:
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \
-e MATURIN_PYPI_TOKEN=${{ secrets.PYPI_API_TOKEN_FXP }} \
${{ env.img }} \
bash -exc 'curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-host aarch64-unknown-linux-gnu -y && \
bash -exc 'curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
source $HOME/.cargo/env && \
for PYBIN in /opt/python/cp*-cp3{9,10,11}/bin; do
echo "Loop on PYBIN: $PYBIN"
"${PYBIN}/pip" install --upgrade pip
"${PYBIN}/pip" install maturin
"${PYBIN}/maturin" -V
rustc -vV
echo "${PYBIN}/python"
"${PYBIN}/maturin" publish -i "${PYBIN}/python" -v --skip-existing --compatibility manylinux2014 --target aarch64-unknown-linux-gnu --no-sdist
"${PYBIN}/maturin" publish -i "${PYBIN}/python" -v --skip-existing --compatibility musllinux_1_2 --target aarch64-unknown-linux-gnu --no-sdist
done'

build-aarch64-wheels-recent-pythons:
runs-on: ubuntu-latest
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN_FXP }}
img: quay.io/pypa/manylinux2014_aarch64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: "Set up QEMU"
id: qemu
uses: docker/setup-qemu-action@v3
- name: Install dependencies
run: |
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \
-e MATURIN_PYPI_TOKEN=${{ secrets.PYPI_API_TOKEN_FXP }} \
${{ env.img }} \
bash -exc 'curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
source $HOME/.cargo/env && \
for PYBIN in /opt/python/cp3{8,9,10,11,12}-*/bin; do
for PYBIN in /opt/python/cp*-cp3{12,13}/bin; do
echo "Loop on PYBIN: $PYBIN"
"${PYBIN}/pip" install --upgrade pip
"${PYBIN}/pip" install maturin
"${PYBIN}/maturin" -V
rustc -vV
echo "${PYBIN}/python"
"${PYBIN}/maturin" publish -i "${PYBIN}/python" -v --skip-existing --compatibility manylinux2014 --target aarch64-unknown-linux-gnu --config "net.git-fetch-with-cli = true"
"${PYBIN}/maturin" publish -i "${PYBIN}/python" -v --skip-existing --compatibility musllinux_1_2 --target aarch64-unknown-linux-gnu --config "net.git-fetch-with-cli = true"
"${PYBIN}/maturin" publish -i "${PYBIN}/python" -v --skip-existing --compatibility manylinux2014 --target aarch64-unknown-linux-gnu --no-sdist
"${PYBIN}/maturin" publish -i "${PYBIN}/python" -v --skip-existing --compatibility musllinux_1_2 --target aarch64-unknown-linux-gnu --no-sdist
done'

# Comming in large parts from @odidev in MOCPy pull request
Expand All @@ -95,7 +124,7 @@ jobs:
${{ env.img }} \
bash -exc 'curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
source $HOME/.cargo/env && \
for PYBIN in /opt/python/cp3{8,9,10,11,12}-*/bin; do
for PYBIN in /opt/python/cp*-cp3{8,9,10,11,12,13}/bin; do
echo "Loop on PYBIN: $PYBIN"
"${PYBIN}/pip" install --upgrade pip
"${PYBIN}/pip" install maturin
Expand All @@ -115,7 +144,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps:
# Checkout the project
- uses: actions/checkout@v4
Expand Down Expand Up @@ -149,7 +178,7 @@ jobs:
fail-fast: false
matrix:
os: [macOS-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps:
# Checkout the project
- uses: actions/checkout@v4
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
shell: bash
run: |
source $HOME/.cargo/env
for PYBIN in /opt/python/cp3{8,9,10,11,12}-*/bin; do
for PYBIN in /opt/python/cp*-cp3{8,9,10,11,12,13}/bin; do
"${PYBIN}/pip" install virtualenv
"${PYBIN}/virtualenv" cdshealpixenv
source cdshealpixenv/bin/activate
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps:
# Checkout the project
- name: "Checkout branch"
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps:
# Checkout the project
- name: "Checkout branch"
Expand Down Expand Up @@ -165,16 +165,16 @@ jobs:
python -m pytest -v
deactivate

# Build the doc and run the tests in the doc (only for python 3.11 on ubuntu)
# Build the doc and run the tests in the doc (only for python 3.12 on ubuntu)
test-doc:
runs-on: ubuntu-latest
steps:
- name: "Checkout branch"
uses: actions/checkout@v4
- name: "Set up Python 3.11 on Ubuntu"
- name: "Set up Python 3.12 on Ubuntu"
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: "Build and test doc"
run: |
# Install virtualenv
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

## Unreleased

## 0.7.1

### Added

* support for python 3.13
### Fixed

* fix ``zone_search`` that would fail on lon_max == 180° due to astropy angle wrapping

## 0.7.0

### Added
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cdshealpix"
version = "0.7.0"
version = "0.7.1"
authors = ["Matthieu Baumann <[email protected]>", "F.-X. Pineau <[email protected]>"]
description = "Python cdshealpix package wrapping code of the cdshealpix crate"
license = "BSD-3-Clause"
Expand All @@ -20,7 +20,7 @@ name = "cdshealpix"
crate-type = ["cdylib"]

[dependencies]
healpix = {version="0.7.0", package="cdshealpix"}
healpix = {version=">=0.7.3", package="cdshealpix"}
#healpix = { rev="5ab172b4d1d206c973f9f170b14509f4982e0090", package = "cdshealpix", git = 'https://github.com/cds-astro/cds-healpix-rust' }
mapproj = "0.3.0"
rayon = "1.10"
Expand Down
5 changes: 5 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import matplotlib as mpl

# chose the matplotlib backend that can only generate pngs
# but not interact with the os (faster for testing)
mpl.use("Agg")
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ extend-include = ["*.ipynb"]
"version.py" = ["D100"]
"test_*.py" = ["D103", "D100", "S101"]
"notebooks*" = ["D100"]
"conftest.py" = ["D100"]

[tool.ruff.flake8-errmsg]
max-string-length = 20
Expand Down
Loading
Loading