From e50df402851305be47c1245811a62cdd71757a7a Mon Sep 17 00:00:00 2001 From: Xavier Garrido Date: Mon, 17 Jul 2023 15:50:52 +0200 Subject: [PATCH 01/22] Do not test notebook compilation pixell is broken with the latest version of pillow (see https://github.com/simonsobs/pspy/pull/65#issuecomment-1628739436) --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 8cb0422..8112be0 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -57,7 +57,7 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | python -m pip install jupyter - jupyter nbconvert --to notebook --execute notebooks/tutorial_io.ipynb + # jupyter nbconvert --to notebook --execute notebooks/tutorial_io.ipynb - name: Comparing pspy to NaMaster if: matrix.os == 'ubuntu-latest' From 0520c7937a1a36f0ca3067421c8803f94322e178 Mon Sep 17 00:00:00 2001 From: Thibaut Louis Date: Wed, 19 Jul 2023 15:57:56 +0200 Subject: [PATCH 02/22] change binary to more general window argument --- pspy/so_map.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pspy/so_map.py b/pspy/so_map.py index b9807fd..6731ba0 100644 --- a/pspy/so_map.py +++ b/pspy/so_map.py @@ -164,12 +164,12 @@ def get_pixwin(self, order=0): pixwin = (wy[:,None] * wx[None,:]) return pixwin - def convolve_with_pixwin(self, niter=3, binary=None, pixwin=None, order=0, use_ducc_rfft=False): + def convolve_with_pixwin(self, niter=3, window=None, pixwin=None, order=0, use_ducc_rfft=False): """Convolve a ``so_map`` object with a pixel window function The convolution is done in harmonics space, for CAR maps the pixwin is anisotropic (the pixel varies in size across the maps) and the convolution is done in Fourier space. - We optionaly apply a binary before doing the operation to remove pathological pixels, note + We optionaly apply a window before doing the operation to remove pathological pixels, note that this operation is dangerous since we do harmonic transform of a masked map. Parameters @@ -177,8 +177,8 @@ def convolve_with_pixwin(self, niter=3, binary=None, pixwin=None, order=0, use_d niter: integer the number of iteration performed while computing the alm not that for CAR niter=0 should be enough - binary: so_map - a binary mask that remove pathological pixel before doing the harmonic + window: so_map + a window that remove pathological pixel before doing the harmonic space operation pixwin: 1d array for healpix, 2d array for CAR this allow you to pass a precomputed pixel window function @@ -186,7 +186,7 @@ def convolve_with_pixwin(self, niter=3, binary=None, pixwin=None, order=0, use_d lmax = self.get_lmax_limit() - if binary is not None: self.data *= binary.data + if window is not None: self.data *= window.data if pixwin is None: pixwin = self.get_pixwin(order=order) if self.pixel == "HEALPIX": @@ -960,10 +960,10 @@ def _get_xyz(dec, ra): return map_cleaned, mono, dipole return map_cleaned -def fourier_convolution(map_car, fourier_kernel, binary=None, use_ducc_rfft=False): +def fourier_convolution(map_car, fourier_kernel, window=None, use_ducc_rfft=False): """do a convolution in fourier space with a fourier_kernel, - you can optionnaly use a binary to remove pathological pixels + you can optionnaly use a window to remove pathological pixels Parameters --------- @@ -971,14 +971,14 @@ def fourier_convolution(map_car, fourier_kernel, binary=None, use_ducc_rfft=Fals the map to be convolved fourier_kernel: 2d array the convolution kernel in Fourier space - binary: ``so_map`` - a binary mask removing pathological pixels + window: ``so_map`` + a window removing pathological pixels use_ducc_rfft: boolean wether to use ducc real fft instead of enmap complex fft """ - if binary is not None: - map_car.data *= binary.data + if window is not None: + map_car.data *= window.data if use_ducc_rfft == True: ft = rfft(map_car.data[:]) From b3b7b75a897b757935207c917439109ecfd71d38 Mon Sep 17 00:00:00 2001 From: Thibaut Louis Date: Tue, 25 Jul 2023 13:59:52 +0200 Subject: [PATCH 03/22] add option for dtype for pixwin --- pspy/so_map.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pspy/so_map.py b/pspy/so_map.py index 6731ba0..93bb9cd 100644 --- a/pspy/so_map.py +++ b/pspy/so_map.py @@ -152,7 +152,7 @@ def get_lmax_limit(self): l_max_limit = 360 / cdelt / 4 return l_max_limit - def get_pixwin(self, order=0): + def get_pixwin(self, order=0, dtype=np.float64): """compute the pixel window function corresponding to the map pixellisation order stands for the map making pointing matrix order=0 is Neareast Neighbour while order=1 is bilinear interpolation @@ -162,7 +162,7 @@ def get_pixwin(self, order=0): if self.pixel == "CAR": wy, wx = enmap.calc_window(self.data.shape, order=order) pixwin = (wy[:,None] * wx[None,:]) - return pixwin + return pixwin.astype(dtype) def convolve_with_pixwin(self, niter=3, window=None, pixwin=None, order=0, use_ducc_rfft=False): """Convolve a ``so_map`` object with a pixel window function From d7bda67f388c4db8b3786ee7b25eee8dfea3ecd1 Mon Sep 17 00:00:00 2001 From: Xavier Garrido Date: Tue, 25 Jul 2023 15:40:35 +0200 Subject: [PATCH 04/22] Fix unit test (before upgrading to pixell 0.19) --- .github/workflows/testing.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 8112be0..c6aad91 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -34,6 +34,7 @@ jobs: python -m pip install --upgrade pip wheel python -m pip install numpy pytest pytest-cov python -m pip install -e . + python -m pip install pixell==0.17.3 - name: Install extra dependencies (camb) run: | From cc5e013f957b36499fa9dc3ed93dee751c6c7c82 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 13:25:13 +0000 Subject: [PATCH 05/22] Bump pypa/cibuildwheel from 2.14.1 to 2.15.0 Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.14.1 to 2.15.0. - [Release notes](https://github.com/pypa/cibuildwheel/releases) - [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md) - [Commits](https://github.com/pypa/cibuildwheel/compare/v2.14.1...v2.15.0) --- updated-dependencies: - dependency-name: pypa/cibuildwheel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index fea2667..f00ef39 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -45,7 +45,7 @@ jobs: sudo apt-get install libfftw3-dev - name: Build wheels - uses: pypa/cibuildwheel@v2.14.1 + uses: pypa/cibuildwheel@v2.15.0 env: CIBW_BEFORE_BUILD: "python -m pip install numpy==${{ matrix.numpyver }}" CIBW_BUILD_VERBOSITY: 3 From 4d0c5a1a1587e34b5af415f03e150086ab3fd4c8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 13:21:21 +0000 Subject: [PATCH 06/22] Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/testing.yml | 2 +- .github/workflows/wheels.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index c6aad91..4bb23a4 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -15,7 +15,7 @@ jobs: python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index f00ef39..a25dc4c 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -29,7 +29,7 @@ jobs: numpyver: "1.22" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Brew packages if: matrix.os == 'macos-latest' @@ -61,7 +61,7 @@ jobs: name: Build source distribution runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 name: Install Python From 84c9c535f56d7e85474916f39b6e43fd7d3b318d Mon Sep 17 00:00:00 2001 From: adrien-laposta Date: Wed, 6 Sep 2023 13:37:10 +0200 Subject: [PATCH 07/22] update healpix to car projection --- pspy/so_map.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pspy/so_map.py b/pspy/so_map.py index 93bb9cd..e1b8016 100644 --- a/pspy/so_map.py +++ b/pspy/so_map.py @@ -619,15 +619,15 @@ def healpix2car(healpix_map, template, lmax=None): if lmax > 3 * healpix_map.nside - 1: print("WARNING: your lmax is too large, setting it to 3*nside-1 now") lmax = 3 * healpix_map.nside - 1 - project.data = reproject.enmap_from_healpix( + + spin = [0, 2] if healpix_map.ncomp == 3 else [0] + project.data = reproject.healpix2map( healpix_map.data, template.data.shape, template.data.wcs, - ncomp=healpix_map.ncomp, - unit=1, lmax=lmax, rot=rot, - first=0, + spin=spin ) project.ncomp == healpix_map.ncomp @@ -979,7 +979,7 @@ def fourier_convolution(map_car, fourier_kernel, window=None, use_ducc_rfft=Fals """ if window is not None: map_car.data *= window.data - + if use_ducc_rfft == True: ft = rfft(map_car.data[:]) ft *= fourier_kernel[: ft.shape[-2], : ft.shape[-1]] From 1a87f662da34deb4294c66864b6e6c09375b57ea Mon Sep 17 00:00:00 2001 From: Thibaut Louis Date: Wed, 6 Sep 2023 13:44:23 +0200 Subject: [PATCH 08/22] new version --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index fa1b6cd..634dab9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.6.3 +current_version = 1.6.4 commit = True tag = True From 48a0aaf16694ff1118e084ae57aba75c64812a7e Mon Sep 17 00:00:00 2001 From: Xavier Garrido Date: Thu, 14 Sep 2023 10:45:01 +0200 Subject: [PATCH 09/22] Set all mask pixel to one before computing distance --- pspy/so_map.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pspy/so_map.py b/pspy/so_map.py index e1b8016..c979cff 100644 --- a/pspy/so_map.py +++ b/pspy/so_map.py @@ -842,6 +842,7 @@ def generate_source_mask(binary, coordinates, point_source_radius_arcmin): the radius of the point sources """ mask = binary.copy() + mask.data[:] = 1 if mask.pixel == "HEALPIX": vectors = hp.ang2vec(np.pi / 2.0 - coordinates[0], 2 * np.pi - coordinates[1]) From ec2880869a763ae2f26bed6c2557bef9a5548060 Mon Sep 17 00:00:00 2001 From: Xavier Garrido Date: Fri, 15 Sep 2023 13:12:54 +0200 Subject: [PATCH 10/22] let's revive unit test --- .github/workflows/testing.yml | 5 +++-- pspy/sph_tools.py | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 4bb23a4..4248a96 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -34,7 +34,8 @@ jobs: python -m pip install --upgrade pip wheel python -m pip install numpy pytest pytest-cov python -m pip install -e . - python -m pip install pixell==0.17.3 + # Newest version of pillow does not play well with pixell + python -m pip install pillow==9.5.0 - name: Install extra dependencies (camb) run: | @@ -58,7 +59,7 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | python -m pip install jupyter - # jupyter nbconvert --to notebook --execute notebooks/tutorial_io.ipynb + jupyter nbconvert --to notebook --execute notebooks/tutorial_io.ipynb - name: Comparing pspy to NaMaster if: matrix.os == 'ubuntu-latest' diff --git a/pspy/sph_tools.py b/pspy/sph_tools.py index 09fc757..20ef63f 100644 --- a/pspy/sph_tools.py +++ b/pspy/sph_tools.py @@ -3,12 +3,12 @@ """ import healpy as hp import numpy as np - from pixell import curvedsky, enmap + from pspy import so_window -def map2alm(map, niter, lmax, theta_range=None, dtype=np.complex128, tweak=True): +def map2alm(map, niter, lmax, theta_range=None, dtype=np.complex128): """Map2alm transform (for healpix or CAR). Parameters @@ -43,18 +43,18 @@ def map2alm(map, niter, lmax, theta_range=None, dtype=np.complex128, tweak=True) theta_max=theta_range[1]) elif map.pixel=="CAR": - alm = curvedsky.map2alm(map.data, lmax=lmax, tweak=tweak) + alm = curvedsky.map2alm(map.data, lmax=lmax) if niter != 0: map_copy = map.copy() for _ in range(niter): - alm += curvedsky.map2alm(map.data-curvedsky.alm2map(alm, map_copy.data), lmax=lmax, tweak=tweak) + alm += curvedsky.map2alm(map.data-curvedsky.alm2map(alm, map_copy.data), lmax=lmax) else: raise ValueError("Map is neither a CAR nor a HEALPIX") alm = alm.astype(dtype) return alm -def alm2map(alms, template, tweak=True): +def alm2map(alms, template): """alm2map transform (for healpix and CAR). Parameters @@ -72,7 +72,7 @@ def alm2map(alms, template, tweak=True): if map_from_alm.pixel == "HEALPIX": map_from_alm.data = curvedsky.alm2map_healpix(alms, map_from_alm.data, spin=spin) elif map_from_alm.pixel == "CAR": - map_from_alm.data = curvedsky.alm2map(alms, map_from_alm.data, spin=spin, tweak=tweak) + map_from_alm.data = curvedsky.alm2map(alms, map_from_alm.data, spin=spin) else: raise ValueError("Map is neither a CAR nor a HEALPIX") return map_from_alm From 085db51824b866a705a545fa2ebaa787f4263968 Mon Sep 17 00:00:00 2001 From: Xavier Garrido Date: Fri, 15 Sep 2023 12:00:08 +0200 Subject: [PATCH 11/22] increase verbosity --- pspy/tests/test_so_spectra.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pspy/tests/test_so_spectra.py b/pspy/tests/test_so_spectra.py index 0e498b4..ce9622f 100644 --- a/pspy/tests/test_so_spectra.py +++ b/pspy/tests/test_so_spectra.py @@ -12,7 +12,7 @@ class SOSpectraTests(unittest.TestCase): - def setUp(self, verbose=False): + def setUp(self, verbose=True): with open(os.path.join(data_dir, "test_data.pkl"), "rb") as f: self.reference = pickle.load(f) @@ -34,7 +34,7 @@ def compare(self, ref, current, msg=""): else: self.assertTrue(True, f"Data type {type(ref)} are not compared!") - def test_spectra(self, verbose=False): + def test_spectra(self, verbose=True): kinds = ["car", "healpix"] # do not test window function due to mismatch in distance computation # datas = ["cmb", "window", "mbb_inv", "bbl", "spectra"] From 22639d02d5b363e6e9ce7e113bc87c118456d396 Mon Sep 17 00:00:00 2001 From: Xavier Garrido Date: Fri, 15 Sep 2023 14:06:23 +0200 Subject: [PATCH 12/22] let's try to install ducc from sources --- .github/workflows/testing.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 149654e..141d670 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -36,6 +36,8 @@ jobs: python -m pip install -e . # Newest version of pillow does not play well with pixell python -m pip install pillow==9.5.0 + # Let's try to re-install (properly) ducc + python -m pip install --no-binary ducc0 ducc0 - name: Install extra dependencies (camb) run: | From 38cf0cffb3110d190f92c321e076604840f3c2ef Mon Sep 17 00:00:00 2001 From: Xavier Garrido Date: Fri, 15 Sep 2023 14:16:58 +0200 Subject: [PATCH 13/22] uninstall first --- .github/workflows/testing.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 141d670..946aacc 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -37,6 +37,7 @@ jobs: # Newest version of pillow does not play well with pixell python -m pip install pillow==9.5.0 # Let's try to re-install (properly) ducc + python -m pip uninstall -y ducc0 python -m pip install --no-binary ducc0 ducc0 - name: Install extra dependencies (camb) From 979fc2ca64f6b3b56bfc1c0ad54fcf01c7b8c534 Mon Sep 17 00:00:00 2001 From: Xavier Garrido Date: Fri, 15 Sep 2023 14:25:48 +0200 Subject: [PATCH 14/22] try setting optimization to none for macos --- .github/workflows/testing.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 946aacc..f660fd9 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -36,7 +36,11 @@ jobs: python -m pip install -e . # Newest version of pillow does not play well with pixell python -m pip install pillow==9.5.0 - # Let's try to re-install (properly) ducc + + - name: Build ducc for macos + if: matrix.os == 'macos-latest' + run: | + export DUCC0_OPTIMIZATION=none python -m pip uninstall -y ducc0 python -m pip install --no-binary ducc0 ducc0 From 8c0ac42a86726c40bef06cf215e9a61e95107213 Mon Sep 17 00:00:00 2001 From: Xavier Garrido Date: Tue, 3 Oct 2023 19:28:09 +0200 Subject: [PATCH 15/22] Update testing.yml --- .github/workflows/testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index f660fd9..ed1982a 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -32,7 +32,7 @@ jobs: - name: Install via pip run: | python -m pip install --upgrade pip wheel - python -m pip install numpy pytest pytest-cov + python -m pip install numpy==1.25.2 pytest pytest-cov python -m pip install -e . # Newest version of pillow does not play well with pixell python -m pip install pillow==9.5.0 @@ -40,7 +40,7 @@ jobs: - name: Build ducc for macos if: matrix.os == 'macos-latest' run: | - export DUCC0_OPTIMIZATION=none + export SYSTEM_VERSION_COMPAT=1 python -m pip uninstall -y ducc0 python -m pip install --no-binary ducc0 ducc0 From c22dd243eadc22c050b0b9ee39f29a9abfc3eadc Mon Sep 17 00:00:00 2001 From: Xavier Garrido Date: Tue, 3 Oct 2023 20:43:32 +0200 Subject: [PATCH 16/22] Update testing.yml --- .github/workflows/testing.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index ed1982a..b24acff 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -28,6 +28,7 @@ jobs: set -x sudo ln -s /usr/local/bin/gfortran-11 /usr/local/bin/gfortran gfortran --version + sudo xcode-select -switch /Library/Developer/CommandLineTools - name: Install via pip run: | From da1f0478b591734f8d78317ca8efb4c1efa4efbd Mon Sep 17 00:00:00 2001 From: Xavier Garrido Date: Wed, 4 Oct 2023 22:08:35 +0200 Subject: [PATCH 17/22] Set OMP_NUM_THREADS to zero (and not to None which is the default) --- .github/workflows/testing.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index b24acff..aab34cd 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -33,18 +33,12 @@ jobs: - name: Install via pip run: | python -m pip install --upgrade pip wheel - python -m pip install numpy==1.25.2 pytest pytest-cov + python -m pip install "numpy<1.26" pytest pytest-cov python -m pip install -e . # Newest version of pillow does not play well with pixell python -m pip install pillow==9.5.0 - - - name: Build ducc for macos - if: matrix.os == 'macos-latest' - run: | - export SYSTEM_VERSION_COMPAT=1 - python -m pip uninstall -y ducc0 - python -m pip install --no-binary ducc0 ducc0 - + export OMP_NUM_THREADS=0 + - name: Install extra dependencies (camb) run: | python -m pip install camb From 8fc60dc3852c5ce6012c3db05908aa4ee9ea511a Mon Sep 17 00:00:00 2001 From: Xavier Garrido Date: Wed, 4 Oct 2023 22:19:03 +0200 Subject: [PATCH 18/22] Update testing.yml --- .github/workflows/testing.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index aab34cd..e6a1477 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -5,6 +5,9 @@ on: push: branches: [master] +env: + OMP_NUM_THREADS: 0 + jobs: build: @@ -37,7 +40,6 @@ jobs: python -m pip install -e . # Newest version of pillow does not play well with pixell python -m pip install pillow==9.5.0 - export OMP_NUM_THREADS=0 - name: Install extra dependencies (camb) run: | From e20c56630162ff679c2fbca114185fa45cfdca2d Mon Sep 17 00:00:00 2001 From: Xavier Garrido Date: Thu, 5 Oct 2023 16:41:45 +0000 Subject: [PATCH 19/22] Update given new version of pixell --- .github/workflows/testing.yml | 8 +------- setup.py | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index e6a1477..2f2aa60 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -5,9 +5,6 @@ on: push: branches: [master] -env: - OMP_NUM_THREADS: 0 - jobs: build: @@ -31,15 +28,12 @@ jobs: set -x sudo ln -s /usr/local/bin/gfortran-11 /usr/local/bin/gfortran gfortran --version - sudo xcode-select -switch /Library/Developer/CommandLineTools - name: Install via pip run: | python -m pip install --upgrade pip wheel python -m pip install "numpy<1.26" pytest pytest-cov python -m pip install -e . - # Newest version of pillow does not play well with pixell - python -m pip install pillow==9.5.0 - name: Install extra dependencies (camb) run: | @@ -63,7 +57,7 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | python -m pip install jupyter - # jupyter nbconvert --to notebook --execute notebooks/tutorial_io.ipynb + jupyter nbconvert --to notebook --execute notebooks/tutorial_io.ipynb - name: Comparing pspy to NaMaster if: matrix.os == 'ubuntu-latest' diff --git a/setup.py b/setup.py index 9bbc346..2049e33 100644 --- a/setup.py +++ b/setup.py @@ -62,11 +62,11 @@ entry_points={}, ext_modules=[mcm, cov], install_requires=[ - "numpy>=1.20", + "numpy>=1.20<1.26", "healpy", "pyFFTW", "pillow", # this one should be installed by pixell - "pixell>=0.7.0", + "pixell>=0.20.3", ], packages=find_packages(), include_package_data=True, From 1d5ccb82f4c644874b3c8c3e36cc9136b78a8eb9 Mon Sep 17 00:00:00 2001 From: Xavier Garrido Date: Thu, 5 Oct 2023 16:46:51 +0000 Subject: [PATCH 20/22] Fix version syntax --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2049e33..818ba7c 100644 --- a/setup.py +++ b/setup.py @@ -62,7 +62,7 @@ entry_points={}, ext_modules=[mcm, cov], install_requires=[ - "numpy>=1.20<1.26", + "numpy>=1.20,<1.26", "healpy", "pyFFTW", "pillow", # this one should be installed by pixell From 398bdf43405d4d8ef620284362ec1264336660b7 Mon Sep 17 00:00:00 2001 From: Xavier Garrido Date: Sun, 15 Oct 2023 10:21:03 +0200 Subject: [PATCH 21/22] Let's try latest numpy version --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 2f2aa60..7e5c0d1 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -32,7 +32,7 @@ jobs: - name: Install via pip run: | python -m pip install --upgrade pip wheel - python -m pip install "numpy<1.26" pytest pytest-cov + python -m pip install numpy>=1.26.1 pytest pytest-cov python -m pip install -e . - name: Install extra dependencies (camb) From b95127d111b1c135f452a5056d404c12e449a1c6 Mon Sep 17 00:00:00 2001 From: Xavier Garrido Date: Wed, 25 Oct 2023 16:46:46 +0200 Subject: [PATCH 22/22] exclude buggy version of numpy (1.26.0 does not compile properly the fortran codes) --- .github/workflows/testing.yml | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 7e5c0d1..8b78e67 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -32,9 +32,9 @@ jobs: - name: Install via pip run: | python -m pip install --upgrade pip wheel - python -m pip install numpy>=1.26.1 pytest pytest-cov + python -m pip install numpy pytest pytest-cov python -m pip install -e . - + - name: Install extra dependencies (camb) run: | python -m pip install camb diff --git a/setup.py b/setup.py index 818ba7c..0245aab 100644 --- a/setup.py +++ b/setup.py @@ -62,7 +62,7 @@ entry_points={}, ext_modules=[mcm, cov], install_requires=[ - "numpy>=1.20,<1.26", + "numpy>=1.20,!=1.26.0", "healpy", "pyFFTW", "pillow", # this one should be installed by pixell