From 3a7cc1c0d4483d5d478ac59c4317bc74fc02f2d3 Mon Sep 17 00:00:00 2001 From: Joe Zuntz Date: Thu, 28 Nov 2024 09:36:39 +0000 Subject: [PATCH 1/7] allow numpy v2 --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index c2020f38..555a34fd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ pyyaml future emcee -numpy < 2 +numpy scipy matplotlib pybind11 diff --git a/setup.py b/setup.py index 1cecd29e..f7ec4f97 100644 --- a/setup.py +++ b/setup.py @@ -182,7 +182,7 @@ def run(self): requirements = [ "pyyaml", "emcee", - "numpy<2", + "numpy", "scipy", "matplotlib", "pybind11", From 6a4fe39bb83826a3671ff2e59330a382e92490d9 Mon Sep 17 00:00:00 2001 From: Joe Zuntz Date: Thu, 28 Nov 2024 10:56:50 +0000 Subject: [PATCH 2/7] use old numpy version for old macos --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3457142..a22d999f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,8 +29,10 @@ jobs: python-version: 3.7 include: - os: ubuntu-20.04 + NUMPY_VERSION: ">=2" INSTALL_DEPS: sudo apt-get update && sudo apt-get -y install gfortran-7 swig libopenmpi-dev openmpi-bin libopenblas-dev && sudo ln -s `which gfortran-7` /usr/local/bin/gfortran - os: macos-latest + NUMPY_VERSION: ">=2" # Different versions of homebrew put the gfortran in different INSTALL_DEPS: > brew update-reset @@ -48,6 +50,7 @@ jobs: ; fi && echo "gfortran now at $(which -a gfortran)" - os: macos-13 + NUMPY_VERSION: "<2" # Different versions of homebrew put the gfortran in different INSTALL_DEPS: > brew update-reset @@ -84,13 +87,14 @@ jobs: - name: Install python dependencies run: | python -m pip install --upgrade pip + pip install "numpy${{ matrix.NUMPY_VERSION }}" pip install -v . pip install --no-binary=mpi4py mpi4py astropy pytest pytest-cov getdist - name: Install PocoMC if: matrix.python-version != '3.7' run: | - pip install pocomc==1.2.2 + pip install pocomc==1.2.6 - name: Test nautilus alone if: (matrix.python-version == '3.12' || matrix.python-version == '3.11' || matrix.python-version =='3.10') && (matrix.os == 'macos-13') From ddd9a42a112cbf8a11eee36cba4199f07d642588 Mon Sep 17 00:00:00 2001 From: Joe Zuntz Date: Thu, 28 Nov 2024 15:13:24 +0000 Subject: [PATCH 3/7] select numpy version specifically --- .github/workflows/ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a22d999f..93d238fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,10 +29,8 @@ jobs: python-version: 3.7 include: - os: ubuntu-20.04 - NUMPY_VERSION: ">=2" INSTALL_DEPS: sudo apt-get update && sudo apt-get -y install gfortran-7 swig libopenmpi-dev openmpi-bin libopenblas-dev && sudo ln -s `which gfortran-7` /usr/local/bin/gfortran - os: macos-latest - NUMPY_VERSION: ">=2" # Different versions of homebrew put the gfortran in different INSTALL_DEPS: > brew update-reset @@ -50,7 +48,6 @@ jobs: ; fi && echo "gfortran now at $(which -a gfortran)" - os: macos-13 - NUMPY_VERSION: "<2" # Different versions of homebrew put the gfortran in different INSTALL_DEPS: > brew update-reset @@ -87,7 +84,12 @@ jobs: - name: Install python dependencies run: | python -m pip install --upgrade pip - pip install "numpy${{ matrix.NUMPY_VERSION }}" + if [[ "${{ matrix.python-version }}" == '3.7' || "${{ matrix.python-version}} == '3.8'" ]]; then + NUMPY_VERSION="<2" + else + NUMPY_VERSION=">=2" + fi + pip install "numpy${NUMPY_VERSION}" pip install -v . pip install --no-binary=mpi4py mpi4py astropy pytest pytest-cov getdist From 0f46fa45596c698629ba3d4066b718547a9e2bc2 Mon Sep 17 00:00:00 2001 From: Joe Zuntz Date: Thu, 28 Nov 2024 15:14:06 +0000 Subject: [PATCH 4/7] force numpy1 for macos-13 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93d238fb..ea727df7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,7 +84,7 @@ jobs: - name: Install python dependencies run: | python -m pip install --upgrade pip - if [[ "${{ matrix.python-version }}" == '3.7' || "${{ matrix.python-version}} == '3.8'" ]]; then + if [[ "${{ matrix.os }}" == "macos-13" || "${{ matrix.python-version }}" == '3.7' || "${{ matrix.python-version}} == '3.8'" ]]; then NUMPY_VERSION="<2" else NUMPY_VERSION=">=2" From 570c533d61da9dc2107f12806d10e58e1a8de43b Mon Sep 17 00:00:00 2001 From: Joe Zuntz Date: Thu, 28 Nov 2024 15:56:00 +0000 Subject: [PATCH 5/7] another attempt at trying both numpy versions --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea727df7..cf469c8c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,11 +86,10 @@ jobs: python -m pip install --upgrade pip if [[ "${{ matrix.os }}" == "macos-13" || "${{ matrix.python-version }}" == '3.7' || "${{ matrix.python-version}} == '3.8'" ]]; then NUMPY_VERSION="<2" + pip install "numpy<2" else - NUMPY_VERSION=">=2" + pip install "numpy>=2" fi - pip install "numpy${NUMPY_VERSION}" - pip install -v . pip install --no-binary=mpi4py mpi4py astropy pytest pytest-cov getdist - name: Install PocoMC From 9d4ac4c2304a28cac9c76b9c63e12738f0e60e56 Mon Sep 17 00:00:00 2001 From: Joe Zuntz Date: Thu, 28 Nov 2024 16:00:41 +0000 Subject: [PATCH 6/7] forgot to install cosmosis --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf469c8c..6ed91840 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,6 +90,7 @@ jobs: else pip install "numpy>=2" fi + pip install -vv . pip install --no-binary=mpi4py mpi4py astropy pytest pytest-cov getdist - name: Install PocoMC From 98df4f9e0e2e44a50745d85304e91b8a60f6a000 Mon Sep 17 00:00:00 2001 From: Joe Zuntz Date: Thu, 28 Nov 2024 16:16:47 +0000 Subject: [PATCH 7/7] fix quote --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ed91840..8eccb1bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,8 +84,7 @@ jobs: - name: Install python dependencies run: | python -m pip install --upgrade pip - if [[ "${{ matrix.os }}" == "macos-13" || "${{ matrix.python-version }}" == '3.7' || "${{ matrix.python-version}} == '3.8'" ]]; then - NUMPY_VERSION="<2" + if [[ "${{ matrix.os }}" == "macos-13" || "${{ matrix.python-version }}" == '3.7' || "${{ matrix.python-version}}" == '3.8' ]]; then pip install "numpy<2" else pip install "numpy>=2"