From 2290c3a8ea697f1b103b43004bcbf16e3ec9dde2 Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Thu, 7 Sep 2023 22:26:35 -0400 Subject: [PATCH 01/37] Try a first, basic Python 3.12 run --- .github/workflows/build.yml | 49 +++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5df037838..1183df198 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: matrix: include: - os: ubuntu-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_actionAngle.py REQUIRES_PYNBODY: false REQUIRES_ASTROPY: false @@ -32,7 +32,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: ubuntu-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_sphericaldf.py REQUIRES_PYNBODY: false REQUIRES_ASTROPY: false @@ -40,7 +40,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: true - os: ubuntu-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_actionAngleTorus.py tests/test_conversion.py tests/test_galpypaper.py tests/test_import.py tests/test_interp_potential.py tests/test_kuzminkutuzov.py tests/test_util.py REQUIRES_PYNBODY: false REQUIRES_ASTROPY: false @@ -48,7 +48,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: ubuntu-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_SpiralArmsPotential.py tests/test_potential.py tests/test_scf.py tests/test_snapshotpotential.py REQUIRES_PYNBODY: true REQUIRES_ASTROPY: false @@ -56,7 +56,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: ubuntu-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_quantity.py tests/test_coords.py REQUIRES_PYNBODY: false # needs to be separate for different config @@ -65,7 +65,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: ubuntu-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_orbit.py -k test_energy_jacobi_conservation REQUIRES_PYNBODY: true REQUIRES_ASTROPY: true @@ -73,7 +73,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: ubuntu-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_orbit.py tests/test_orbits.py -k 'not test_energy_jacobi_conservation' REQUIRES_PYNBODY: true REQUIRES_ASTROPY: true @@ -81,7 +81,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: ubuntu-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_evolveddiskdf.py REQUIRES_PYNBODY: false REQUIRES_ASTROPY: false @@ -89,7 +89,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: ubuntu-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_jeans.py tests/test_dynamfric.py REQUIRES_PYNBODY: false REQUIRES_ASTROPY: false @@ -97,7 +97,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: ubuntu-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_qdf.py tests/test_pv2qdf.py tests/test_streamgapdf_impulse.py tests/test_noninertial.py REQUIRES_PYNBODY: false REQUIRES_ASTROPY: false @@ -105,7 +105,7 @@ jobs: REQUIRES_NUMBA: true REQUIRES_JAX: false - os: ubuntu-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_streamgapdf.py REQUIRES_PYNBODY: false REQUIRES_ASTROPY: false @@ -113,7 +113,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: ubuntu-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_diskdf.py REQUIRES_PYNBODY: false REQUIRES_ASTROPY: false @@ -121,13 +121,29 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: ubuntu-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_streamdf.py tests/test_streamspraydf.py REQUIRES_PYNBODY: false REQUIRES_ASTROPY: false REQUIRES_ASTROQUERY: false REQUIRES_NUMBA: false REQUIRES_JAX: false + - os: ubuntu-latest + python-version: "3.11" + TEST_FILES: tests/test_orbit.py -k test_energy_jacobi_conservation + REQUIRES_PYNBODY: true + REQUIRES_ASTROPY: true + REQUIRES_ASTROQUERY: true + REQUIRES_NUMBA: false + REQUIRES_JAX: false + - os: ubuntu-latest + python-version: "3.11" + TEST_FILES: tests/test_orbit.py tests/test_orbits.py -k 'not test_energy_jacobi_conservation' + REQUIRES_PYNBODY: true + REQUIRES_ASTROPY: true + REQUIRES_ASTROQUERY: true + REQUIRES_NUMBA: false + REQUIRES_JAX: false - os: ubuntu-latest python-version: "3.10" TEST_FILES: tests/test_orbit.py -k test_energy_jacobi_conservation @@ -200,6 +216,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Install lcov if: matrix.os == 'ubuntu-latest' run: | @@ -222,8 +239,14 @@ jobs: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('.github/workflows/build.yml') }}-${{ matrix.REQUIRES_PYNBODY }}-${{ matrix.REQUIRES_ASTROPY }}-${{ matrix.REQUIRES_ASTROQUERY }}-${{ matrix.REQUIRES_NUMBA }}-${{ matrix.REQUIRES_JAX }} - name: Install Python dependencies + if: matrix.python-version != '3.12' run: | pip install --upgrade --upgrade-strategy eager numpy scipy matplotlib numexpr setuptools cython pytest tqdm + - name: Install Python dependencies (3.12) + if: matrix.python-version == '3.12' + run: | + pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy scipy matplotlib + pip install --upgrade --upgrade-strategy eager numexpr setuptools cython pytest tqdm - name: Install pynbody if: ${{ matrix.REQUIRES_PYNBODY }} run: | From c13cb88c22b5a88c5f0e50e7f033937e41e34f65 Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Thu, 7 Sep 2023 22:29:29 -0400 Subject: [PATCH 02/37] Install pre-release numpy 1.26 --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1183df198..3a45ae54d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -245,7 +245,8 @@ jobs: - name: Install Python dependencies (3.12) if: matrix.python-version == '3.12' run: | - pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy scipy matplotlib + pip install --upgrade --upgrade-strategy eager --pre numpy + pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy matplotlib pip install --upgrade --upgrade-strategy eager numexpr setuptools cython pytest tqdm - name: Install pynbody if: ${{ matrix.REQUIRES_PYNBODY }} From 55d7ca2ff303da7a64e9c76b3fe8c9bcedc76a6b Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Thu, 7 Sep 2023 22:32:26 -0400 Subject: [PATCH 03/37] Specify matplotlib version --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a45ae54d..b40ca8e1b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -246,7 +246,7 @@ jobs: if: matrix.python-version == '3.12' run: | pip install --upgrade --upgrade-strategy eager --pre numpy - pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy matplotlib + pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy matplotlib==3.8.0.dev1960+gac376ea1a6 pip install --upgrade --upgrade-strategy eager numexpr setuptools cython pytest tqdm - name: Install pynbody if: ${{ matrix.REQUIRES_PYNBODY }} From 4a1b8c4e4c38f41e8a1b5226734bb3e19740bc7b Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Thu, 7 Sep 2023 22:34:39 -0400 Subject: [PATCH 04/37] Explicitly install contourpy --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b40ca8e1b..bc7be8420 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -246,7 +246,8 @@ jobs: if: matrix.python-version == '3.12' run: | pip install --upgrade --upgrade-strategy eager --pre numpy - pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy matplotlib==3.8.0.dev1960+gac376ea1a6 + pip install --upgrade --upgrade-strategy eager contourpy + pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy matplotlib pip install --upgrade --upgrade-strategy eager numexpr setuptools cython pytest tqdm - name: Install pynbody if: ${{ matrix.REQUIRES_PYNBODY }} From ff03d876d7b21d1f73bd96b40d932ac66d184fcb Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Thu, 7 Sep 2023 22:54:55 -0400 Subject: [PATCH 05/37] Explicitly install all matplotlib dependencies --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bc7be8420..827eba0c2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -246,7 +246,8 @@ jobs: if: matrix.python-version == '3.12' run: | pip install --upgrade --upgrade-strategy eager --pre numpy - pip install --upgrade --upgrade-strategy eager contourpy + # matplotlib dependencies + pip install --upgrade --upgrade-strategy eager contourpy cycler fonttools kiwisolver packaging pillow pyparsing python-dateutil pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy matplotlib pip install --upgrade --upgrade-strategy eager numexpr setuptools cython pytest tqdm - name: Install pynbody From 995a01f55074535961c86c04a05bd0115632590e Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Thu, 7 Sep 2023 23:38:22 -0400 Subject: [PATCH 06/37] Try allowing pre-release versions to get around numpy failure for numexpr --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 827eba0c2..c5e59b79d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -249,7 +249,7 @@ jobs: # matplotlib dependencies pip install --upgrade --upgrade-strategy eager contourpy cycler fonttools kiwisolver packaging pillow pyparsing python-dateutil pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy matplotlib - pip install --upgrade --upgrade-strategy eager numexpr setuptools cython pytest tqdm + pip install --upgrade --upgrade-strategy eager --pre numexpr setuptools cython pytest tqdm - name: Install pynbody if: ${{ matrix.REQUIRES_PYNBODY }} run: | From ace01c950b867aaa03624c244a4e4478916b6547 Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Thu, 7 Sep 2023 23:46:36 -0400 Subject: [PATCH 07/37] Install dev version of python-dateutil --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c5e59b79d..0423d4ad6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -247,7 +247,8 @@ jobs: run: | pip install --upgrade --upgrade-strategy eager --pre numpy # matplotlib dependencies - pip install --upgrade --upgrade-strategy eager contourpy cycler fonttools kiwisolver packaging pillow pyparsing python-dateutil + pip install git+https://github.com/dateutil/dateutil.git + pip install --upgrade --upgrade-strategy eager contourpy cycler fonttools kiwisolver packaging pillow pyparsing pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy matplotlib pip install --upgrade --upgrade-strategy eager --pre numexpr setuptools cython pytest tqdm - name: Install pynbody From 0137485a476df95b4dd1024c570d48bd6cbcba66 Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Fri, 8 Sep 2023 09:26:44 -0400 Subject: [PATCH 08/37] Install nightly pandas wheel and try to install other pynbody requirements; try fixing astropy install --- .github/workflows/build.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0423d4ad6..ab6059bab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -251,18 +251,26 @@ jobs: pip install --upgrade --upgrade-strategy eager contourpy cycler fonttools kiwisolver packaging pillow pyparsing pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy matplotlib pip install --upgrade --upgrade-strategy eager --pre numexpr setuptools cython pytest tqdm - - name: Install pynbody - if: ${{ matrix.REQUIRES_PYNBODY }} + - name: Install pynbody (3.12) + if: ${{ matrix.REQUIRES_PYNBODY }} && matrix.python-version == '3.12' run: | - pip install --upgrade --upgrade-strategy eager h5py pandas pytz + pip install --upgrade --upgrade-strategy eager --pre pytz tzdata + pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas + pip install --upgrade --upgrade-strategy eager h5py pip install --upgrade --upgrade-strategy eager wheel pip install --upgrade --upgrade-strategy eager pynbody + - name: Install pynbody + if: ${{ matrix.REQUIRES_PYNBODY }} && matrix.python-version != '3.12' + run: | + pip install --upgrade --upgrade-strategy eager h5py pandas pytz + pip install --upgrade --upgrade-strategy eager wheel + pip install --upgrade --upgrade-strategy eager pynbody - name: Install astropy if: ${{ matrix.REQUIRES_ASTROPY }} - run: pip install astropy pyerfa + run: pip install --pre astropy pyerfa - name: Install astroquery if: ${{ matrix.REQUIRES_ASTROQUERY }} - run: pip install astroquery + run: pip install --pre astroquery - name: Install numba if: ${{ matrix.REQUIRES_NUMBA }} run: | @@ -272,7 +280,7 @@ jobs: pip install --upgrade --force-reinstall setuptools - name: Install JAX if: ${{ matrix.REQUIRES_JAX }} - run: pip install jax jaxlib + run: pip install --pre jax jaxlib - name: Install torus code env: TEST_FILES: ${{ matrix.TEST_FILES }} From c543797c63e92489885b733f6eaed84e4d58e01d Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Fri, 8 Sep 2023 09:29:22 -0400 Subject: [PATCH 09/37] Fix syntax --- .github/workflows/build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ab6059bab..a508c84d5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -259,12 +259,12 @@ jobs: pip install --upgrade --upgrade-strategy eager h5py pip install --upgrade --upgrade-strategy eager wheel pip install --upgrade --upgrade-strategy eager pynbody - - name: Install pynbody - if: ${{ matrix.REQUIRES_PYNBODY }} && matrix.python-version != '3.12' - run: | - pip install --upgrade --upgrade-strategy eager h5py pandas pytz - pip install --upgrade --upgrade-strategy eager wheel - pip install --upgrade --upgrade-strategy eager pynbody + - name: Install pynbody + if: ${{ matrix.REQUIRES_PYNBODY }} && matrix.python-version != '3.12' + run: | + pip install --upgrade --upgrade-strategy eager h5py pandas pytz + pip install --upgrade --upgrade-strategy eager wheel + pip install --upgrade --upgrade-strategy eager pynbody - name: Install astropy if: ${{ matrix.REQUIRES_ASTROPY }} run: pip install --pre astropy pyerfa From d361946ca2b911dd37b41bcab453254802ca017f Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Fri, 8 Sep 2023 09:31:25 -0400 Subject: [PATCH 10/37] Fix syntax again --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a508c84d5..c5b5ba9f1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -252,7 +252,7 @@ jobs: pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy matplotlib pip install --upgrade --upgrade-strategy eager --pre numexpr setuptools cython pytest tqdm - name: Install pynbody (3.12) - if: ${{ matrix.REQUIRES_PYNBODY }} && matrix.python-version == '3.12' + if: ${{ matrix.REQUIRES_PYNBODY && matrix.python-version == '3.12' }} run: | pip install --upgrade --upgrade-strategy eager --pre pytz tzdata pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas @@ -260,7 +260,7 @@ jobs: pip install --upgrade --upgrade-strategy eager wheel pip install --upgrade --upgrade-strategy eager pynbody - name: Install pynbody - if: ${{ matrix.REQUIRES_PYNBODY }} && matrix.python-version != '3.12' + if: ${{ matrix.REQUIRES_PYNBODY && matrix.python-version != '3.12' }} run: | pip install --upgrade --upgrade-strategy eager h5py pandas pytz pip install --upgrade --upgrade-strategy eager wheel From db6059cfd8989521e712783dc718b629435ba87c Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Fri, 8 Sep 2023 09:33:09 -0400 Subject: [PATCH 11/37] Try install pynbody without dependencies --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c5b5ba9f1..6197763bc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -254,11 +254,11 @@ jobs: - name: Install pynbody (3.12) if: ${{ matrix.REQUIRES_PYNBODY && matrix.python-version == '3.12' }} run: | - pip install --upgrade --upgrade-strategy eager --pre pytz tzdata - pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas - pip install --upgrade --upgrade-strategy eager h5py - pip install --upgrade --upgrade-strategy eager wheel - pip install --upgrade --upgrade-strategy eager pynbody + #pip install --upgrade --upgrade-strategy eager --pre pytz tzdata + #pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas + #pip install --upgrade --upgrade-strategy eager h5py + #pip install --upgrade --upgrade-strategy eager wheel + pip install --upgrade --upgrade-strategy eager --no-deps pynbody - name: Install pynbody if: ${{ matrix.REQUIRES_PYNBODY && matrix.python-version != '3.12' }} run: | From 51e8361d5b655aa3f90fd245cf8597f4a81cf37e Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Fri, 8 Sep 2023 09:36:06 -0400 Subject: [PATCH 12/37] Allow pre-releases to get correct numpy --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6197763bc..710211d09 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -258,7 +258,7 @@ jobs: #pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas #pip install --upgrade --upgrade-strategy eager h5py #pip install --upgrade --upgrade-strategy eager wheel - pip install --upgrade --upgrade-strategy eager --no-deps pynbody + pip install --upgrade --upgrade-strategy eager --no-deps --pre pynbody - name: Install pynbody if: ${{ matrix.REQUIRES_PYNBODY && matrix.python-version != '3.12' }} run: | From 297840c7f4a06bf82f75278c266bba0c8630f477 Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Fri, 8 Sep 2023 10:46:12 -0400 Subject: [PATCH 13/37] Install my version of pynbody --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 710211d09..ac9e3a783 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -258,7 +258,7 @@ jobs: #pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas #pip install --upgrade --upgrade-strategy eager h5py #pip install --upgrade --upgrade-strategy eager wheel - pip install --upgrade --upgrade-strategy eager --no-deps --pre pynbody + pip install --upgrade --upgrade-strategy eager --no-deps --pre git+https://github.com/jobovy/pynbody.git@numpy-include - name: Install pynbody if: ${{ matrix.REQUIRES_PYNBODY && matrix.python-version != '3.12' }} run: | From 60d56a22dccc793d08a88019aa456217c3b1bc64 Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Fri, 8 Sep 2023 15:04:18 -0400 Subject: [PATCH 14/37] Again try installing pynbody dependencies --- .github/workflows/build.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ac9e3a783..763dc11d4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -254,11 +254,12 @@ jobs: - name: Install pynbody (3.12) if: ${{ matrix.REQUIRES_PYNBODY && matrix.python-version == '3.12' }} run: | - #pip install --upgrade --upgrade-strategy eager --pre pytz tzdata - #pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas - #pip install --upgrade --upgrade-strategy eager h5py - #pip install --upgrade --upgrade-strategy eager wheel - pip install --upgrade --upgrade-strategy eager --no-deps --pre git+https://github.com/jobovy/pynbody.git@numpy-include + pip install --upgrade --upgrade-strategy eager --pre pytz tzdata + pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas + sudo apt-get install libhdf5-dev + pip install --upgrade --upgrade-strategy eager --pre --no-binary=h5py git+https://github.com/h5py/h5py.git + pip install --upgrade --upgrade-strategy eager wheel + pip install --upgrade --upgrade-strategy eager --no-deps --pre git+https://github.com/pynbody/pynbody.git - name: Install pynbody if: ${{ matrix.REQUIRES_PYNBODY && matrix.python-version != '3.12' }} run: | From d3523460b74da75014df85f191eef1b5bec64a83 Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Fri, 8 Sep 2023 15:43:17 -0400 Subject: [PATCH 15/37] Don't upgrade numpy; test mac --- .github/workflows/build.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 763dc11d4..12a6d3f0b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -193,7 +193,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: macos-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_orbit.py -k test_energy_jacobi_conservation REQUIRES_PYNBODY: true REQUIRES_ASTROPY: true @@ -201,7 +201,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: macos-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_orbit.py tests/test_orbits.py -k 'not test_energy_jacobi_conservation' REQUIRES_PYNBODY: true REQUIRES_ASTROPY: true @@ -251,15 +251,24 @@ jobs: pip install --upgrade --upgrade-strategy eager contourpy cycler fonttools kiwisolver packaging pillow pyparsing pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy matplotlib pip install --upgrade --upgrade-strategy eager --pre numexpr setuptools cython pytest tqdm - - name: Install pynbody (3.12) - if: ${{ matrix.REQUIRES_PYNBODY && matrix.python-version == '3.12' }} + - name: Install pynbody (3.12; ubuntu) + if: ${{ matrix.os == 'ubuntu-latest' && matrix.REQUIRES_PYNBODY && matrix.python-version == '3.12' }} run: | pip install --upgrade --upgrade-strategy eager --pre pytz tzdata - pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas + pip install --upgrade --upgrade-strategy eager --no-deps -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas sudo apt-get install libhdf5-dev pip install --upgrade --upgrade-strategy eager --pre --no-binary=h5py git+https://github.com/h5py/h5py.git pip install --upgrade --upgrade-strategy eager wheel pip install --upgrade --upgrade-strategy eager --no-deps --pre git+https://github.com/pynbody/pynbody.git + - name: Install pynbody (3.12; macos) + if: ${{ matrix.os == 'macos-latest' && matrix.REQUIRES_PYNBODY && matrix.python-version == '3.12' }} + run: | + pip install --upgrade --upgrade-strategy eager --pre pytz tzdata + pip install --upgrade --upgrade-strategy eager --no-deps -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas + brew install hdf5 + pip install --upgrade --upgrade-strategy eager --pre --no-binary=h5py git+https://github.com/h5py/h5py.git + pip install --upgrade --upgrade-strategy eager wheel + pip install --upgrade --upgrade-strategy eager --no-deps --pre git+https://github.com/pynbody/pynbody.git - name: Install pynbody if: ${{ matrix.REQUIRES_PYNBODY && matrix.python-version != '3.12' }} run: | From a1fbd85fd42b6ef4ad6a58a408b4e09ef93f0aac Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Fri, 8 Sep 2023 15:54:20 -0400 Subject: [PATCH 16/37] Specify HDF5 dir --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 12a6d3f0b..521d03d17 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -266,6 +266,7 @@ jobs: pip install --upgrade --upgrade-strategy eager --pre pytz tzdata pip install --upgrade --upgrade-strategy eager --no-deps -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas brew install hdf5 + export HDF5_DIR=$(brew --prefix hdf5) pip install --upgrade --upgrade-strategy eager --pre --no-binary=h5py git+https://github.com/h5py/h5py.git pip install --upgrade --upgrade-strategy eager wheel pip install --upgrade --upgrade-strategy eager --no-deps --pre git+https://github.com/pynbody/pynbody.git From f440934fdcb8b9d3af254414dfe2b9ced54d2583 Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Fri, 8 Sep 2023 20:55:33 -0400 Subject: [PATCH 17/37] Ignore datetime deprecation in tqdm --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 521d03d17..73396798f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -338,8 +338,9 @@ jobs: pip install pytest-cov # Turn astropy deprecation warnings into errors as well if astropy if $REQUIRES_ASTROPY; then export PYTEST_ADDOPTS="-W error::astropy.utils.exceptions.AstropyDeprecationWarning"; else export PYTEST_ADDOPTS=""; fi + export TQDM_DEPRECATION="-W ignore:\"datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version.\":DeprecationWarning" # eval necessary for -k 'not ...' in TEST_FILES - eval "pytest -W error::DeprecationWarning -W error::FutureWarning $PYTEST_ADDOPTS -v $TEST_FILES --cov galpy --cov-config .coveragerc --disable-pytest-warnings --durations=0 --cov-report=term --cov-report=xml" + eval "pytest -W error::DeprecationWarning -W error::FutureWarning $PYTEST_ADDOPTS $TQDM_DEPRECATION -v $TEST_FILES --cov galpy --cov-config .coveragerc --disable-pytest-warnings --durations=0 --cov-report=term --cov-report=xml" - name: Generate code coverage if: ${{ matrix.python-version == env.PYTHON_COVREPORTS_VERSION && matrix.os == 'ubuntu-latest' }} run: | From 6ac0c686ffcae83a9d0ca6ea9735c36212a50b0c Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Fri, 8 Sep 2023 21:25:19 -0400 Subject: [PATCH 18/37] Ignore further datetime deprecation --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 73396798f..a02e28828 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -338,7 +338,7 @@ jobs: pip install pytest-cov # Turn astropy deprecation warnings into errors as well if astropy if $REQUIRES_ASTROPY; then export PYTEST_ADDOPTS="-W error::astropy.utils.exceptions.AstropyDeprecationWarning"; else export PYTEST_ADDOPTS=""; fi - export TQDM_DEPRECATION="-W ignore:\"datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version.\":DeprecationWarning" + export TQDM_DEPRECATION="-W ignore:\"datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version.\":DeprecationWarning -W ignore:\"datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).\":DeprecationWarning" # eval necessary for -k 'not ...' in TEST_FILES eval "pytest -W error::DeprecationWarning -W error::FutureWarning $PYTEST_ADDOPTS $TQDM_DEPRECATION -v $TEST_FILES --cov galpy --cov-config .coveragerc --disable-pytest-warnings --durations=0 --cov-report=term --cov-report=xml" - name: Generate code coverage From 82a063c8ef01809c4c7c1f8363f9bf38d9746602 Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Sat, 9 Sep 2023 11:23:59 -0400 Subject: [PATCH 19/37] Escape : in warning string --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a02e28828..4e310f847 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -338,7 +338,7 @@ jobs: pip install pytest-cov # Turn astropy deprecation warnings into errors as well if astropy if $REQUIRES_ASTROPY; then export PYTEST_ADDOPTS="-W error::astropy.utils.exceptions.AstropyDeprecationWarning"; else export PYTEST_ADDOPTS=""; fi - export TQDM_DEPRECATION="-W ignore:\"datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version.\":DeprecationWarning -W ignore:\"datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).\":DeprecationWarning" + export TQDM_DEPRECATION="-W ignore:\"datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version.\":DeprecationWarning -W ignore:\"datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC\: datetime.datetime.now(datetime.UTC).\":DeprecationWarning" # eval necessary for -k 'not ...' in TEST_FILES eval "pytest -W error::DeprecationWarning -W error::FutureWarning $PYTEST_ADDOPTS $TQDM_DEPRECATION -v $TEST_FILES --cov galpy --cov-config .coveragerc --disable-pytest-warnings --durations=0 --cov-report=term --cov-report=xml" - name: Generate code coverage From 3bf50d0ac6d9fa1f884eae3d1b169f9d35e877bd Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Sat, 9 Sep 2023 11:31:07 -0400 Subject: [PATCH 20/37] Try escaping again --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e310f847..34de95b05 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -338,7 +338,7 @@ jobs: pip install pytest-cov # Turn astropy deprecation warnings into errors as well if astropy if $REQUIRES_ASTROPY; then export PYTEST_ADDOPTS="-W error::astropy.utils.exceptions.AstropyDeprecationWarning"; else export PYTEST_ADDOPTS=""; fi - export TQDM_DEPRECATION="-W ignore:\"datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version.\":DeprecationWarning -W ignore:\"datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC\: datetime.datetime.now(datetime.UTC).\":DeprecationWarning" + export TQDM_DEPRECATION="-W ignore:\"datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version.\":DeprecationWarning -W ignore:\"datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC\\: datetime.datetime.now(datetime.UTC).\":DeprecationWarning" # eval necessary for -k 'not ...' in TEST_FILES eval "pytest -W error::DeprecationWarning -W error::FutureWarning $PYTEST_ADDOPTS $TQDM_DEPRECATION -v $TEST_FILES --cov galpy --cov-config .coveragerc --disable-pytest-warnings --durations=0 --cov-report=term --cov-report=xml" - name: Generate code coverage From f86e7f1a09fdc1dc9df2b677995aaed85cb6f92d Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Sat, 9 Sep 2023 11:44:52 -0400 Subject: [PATCH 21/37] Try matching only the start of the warning --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 34de95b05..41f230980 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -338,7 +338,7 @@ jobs: pip install pytest-cov # Turn astropy deprecation warnings into errors as well if astropy if $REQUIRES_ASTROPY; then export PYTEST_ADDOPTS="-W error::astropy.utils.exceptions.AstropyDeprecationWarning"; else export PYTEST_ADDOPTS=""; fi - export TQDM_DEPRECATION="-W ignore:\"datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version.\":DeprecationWarning -W ignore:\"datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC\\: datetime.datetime.now(datetime.UTC).\":DeprecationWarning" + export TQDM_DEPRECATION="-W ignore:\"datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version.\":DeprecationWarning -W ignore:\"datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC\":DeprecationWarning" # eval necessary for -k 'not ...' in TEST_FILES eval "pytest -W error::DeprecationWarning -W error::FutureWarning $PYTEST_ADDOPTS $TQDM_DEPRECATION -v $TEST_FILES --cov galpy --cov-config .coveragerc --disable-pytest-warnings --durations=0 --cov-report=term --cov-report=xml" - name: Generate code coverage From cf362067c8b5ef3495aa90602838fc41cad2d0fb Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Sun, 10 Sep 2023 20:40:29 -0400 Subject: [PATCH 22/37] Try universal wheel and no build isolation --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 41f230980..e6091212c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -265,9 +265,9 @@ jobs: run: | pip install --upgrade --upgrade-strategy eager --pre pytz tzdata pip install --upgrade --upgrade-strategy eager --no-deps -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas - brew install hdf5 + brew install hdf5 --universal export HDF5_DIR=$(brew --prefix hdf5) - pip install --upgrade --upgrade-strategy eager --pre --no-binary=h5py git+https://github.com/h5py/h5py.git + pip install --upgrade --upgrade-strategy eager --pre --no-deps --no-build-isolation --no-binary=h5py git+https://github.com/h5py/h5py.git pip install --upgrade --upgrade-strategy eager wheel pip install --upgrade --upgrade-strategy eager --no-deps --pre git+https://github.com/pynbody/pynbody.git - name: Install pynbody From 82283ef4597f5893c6dc6a580e2214f55264904a Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Sun, 10 Sep 2023 20:45:33 -0400 Subject: [PATCH 23/37] No more universal homebrew --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e6091212c..e76dd5fa9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -265,7 +265,7 @@ jobs: run: | pip install --upgrade --upgrade-strategy eager --pre pytz tzdata pip install --upgrade --upgrade-strategy eager --no-deps -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas - brew install hdf5 --universal + brew install hdf5 export HDF5_DIR=$(brew --prefix hdf5) pip install --upgrade --upgrade-strategy eager --pre --no-deps --no-build-isolation --no-binary=h5py git+https://github.com/h5py/h5py.git pip install --upgrade --upgrade-strategy eager wheel From 2a6d57e3dffbbae63a15e16f75be5b2bd5a06aa8 Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Sun, 10 Sep 2023 20:55:07 -0400 Subject: [PATCH 24/37] Install wheel --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e76dd5fa9..a709c5e2f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -267,8 +267,8 @@ jobs: pip install --upgrade --upgrade-strategy eager --no-deps -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas brew install hdf5 export HDF5_DIR=$(brew --prefix hdf5) - pip install --upgrade --upgrade-strategy eager --pre --no-deps --no-build-isolation --no-binary=h5py git+https://github.com/h5py/h5py.git pip install --upgrade --upgrade-strategy eager wheel + pip install --upgrade --upgrade-strategy eager --pre --no-deps --no-build-isolation --no-binary=h5py git+https://github.com/h5py/h5py.git pip install --upgrade --upgrade-strategy eager --no-deps --pre git+https://github.com/pynbody/pynbody.git - name: Install pynbody if: ${{ matrix.REQUIRES_PYNBODY && matrix.python-version != '3.12' }} From bb8316d797b6522dd463540bb83553b5a3853dfb Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Sun, 10 Sep 2023 21:04:36 -0400 Subject: [PATCH 25/37] Install cython<1 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a709c5e2f..c8f21ebfc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -241,7 +241,7 @@ jobs: - name: Install Python dependencies if: matrix.python-version != '3.12' run: | - pip install --upgrade --upgrade-strategy eager numpy scipy matplotlib numexpr setuptools cython pytest tqdm + pip install --upgrade --upgrade-strategy eager numpy scipy matplotlib numexpr setuptools cython<1 pytest tqdm - name: Install Python dependencies (3.12) if: matrix.python-version == '3.12' run: | From 315d3d5e5cbf659d0c5ae113199730dbdab1ca78 Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Sun, 10 Sep 2023 21:05:47 -0400 Subject: [PATCH 26/37] Fix syntax --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c8f21ebfc..f282b8ece 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -241,7 +241,7 @@ jobs: - name: Install Python dependencies if: matrix.python-version != '3.12' run: | - pip install --upgrade --upgrade-strategy eager numpy scipy matplotlib numexpr setuptools cython<1 pytest tqdm + pip install --upgrade --upgrade-strategy eager numpy scipy matplotlib numexpr setuptools "cython<1" pytest tqdm - name: Install Python dependencies (3.12) if: matrix.python-version == '3.12' run: | From 5d24ba608ab483df0cd7b17f3601c6c871f13d91 Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Sun, 10 Sep 2023 21:11:27 -0400 Subject: [PATCH 27/37] cython requirement in correct task --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f282b8ece..1431f658e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -241,7 +241,7 @@ jobs: - name: Install Python dependencies if: matrix.python-version != '3.12' run: | - pip install --upgrade --upgrade-strategy eager numpy scipy matplotlib numexpr setuptools "cython<1" pytest tqdm + pip install --upgrade --upgrade-strategy eager numpy scipy matplotlib numexpr setuptools cython pytest tqdm - name: Install Python dependencies (3.12) if: matrix.python-version == '3.12' run: | @@ -250,7 +250,7 @@ jobs: pip install git+https://github.com/dateutil/dateutil.git pip install --upgrade --upgrade-strategy eager contourpy cycler fonttools kiwisolver packaging pillow pyparsing pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy matplotlib - pip install --upgrade --upgrade-strategy eager --pre numexpr setuptools cython pytest tqdm + pip install --upgrade --upgrade-strategy eager --pre numexpr setuptools "cython<1" pytest tqdm - name: Install pynbody (3.12; ubuntu) if: ${{ matrix.os == 'ubuntu-latest' && matrix.REQUIRES_PYNBODY && matrix.python-version == '3.12' }} run: | From 713b5619b868fd6ff779deb32c241fa6bd4eaadd Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Wed, 13 Sep 2023 12:40:53 -0400 Subject: [PATCH 28/37] Use scipy and matplotlib wheels from PyPI --- .github/workflows/build.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1431f658e..3ee637536 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -245,12 +245,7 @@ jobs: - name: Install Python dependencies (3.12) if: matrix.python-version == '3.12' run: | - pip install --upgrade --upgrade-strategy eager --pre numpy - # matplotlib dependencies - pip install git+https://github.com/dateutil/dateutil.git - pip install --upgrade --upgrade-strategy eager contourpy cycler fonttools kiwisolver packaging pillow pyparsing - pip install --upgrade --upgrade-strategy eager -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy matplotlib - pip install --upgrade --upgrade-strategy eager --pre numexpr setuptools "cython<1" pytest tqdm + pip install --upgrade --upgrade-strategy eager --pre numpy scipy matplotlib numexpr setuptools "cython<1" pytest tqdm - name: Install pynbody (3.12; ubuntu) if: ${{ matrix.os == 'ubuntu-latest' && matrix.REQUIRES_PYNBODY && matrix.python-version == '3.12' }} run: | From a6057d259c3c39f2c9c0a8f52b8537b9fb60ce23 Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Wed, 13 Sep 2023 12:44:43 -0400 Subject: [PATCH 29/37] Don't install pre-release matplotlib (doesn't have 3.12 wheel) --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3ee637536..ce6c963a5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -245,7 +245,7 @@ jobs: - name: Install Python dependencies (3.12) if: matrix.python-version == '3.12' run: | - pip install --upgrade --upgrade-strategy eager --pre numpy scipy matplotlib numexpr setuptools "cython<1" pytest tqdm + pip install --upgrade --upgrade-strategy eager --pre numpy scipy "matplotlib<3.8" numexpr setuptools "cython<1" pytest tqdm - name: Install pynbody (3.12; ubuntu) if: ${{ matrix.os == 'ubuntu-latest' && matrix.REQUIRES_PYNBODY && matrix.python-version == '3.12' }} run: | From 313d1c441bf1a94a2e4e3da24620388c430f104a Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Mon, 9 Oct 2023 11:32:00 -0400 Subject: [PATCH 30/37] h5py wheel available, try regular pynbody install --- .github/workflows/build.yml | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ce6c963a5..0e441a70f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -246,27 +246,8 @@ jobs: if: matrix.python-version == '3.12' run: | pip install --upgrade --upgrade-strategy eager --pre numpy scipy "matplotlib<3.8" numexpr setuptools "cython<1" pytest tqdm - - name: Install pynbody (3.12; ubuntu) - if: ${{ matrix.os == 'ubuntu-latest' && matrix.REQUIRES_PYNBODY && matrix.python-version == '3.12' }} - run: | - pip install --upgrade --upgrade-strategy eager --pre pytz tzdata - pip install --upgrade --upgrade-strategy eager --no-deps -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas - sudo apt-get install libhdf5-dev - pip install --upgrade --upgrade-strategy eager --pre --no-binary=h5py git+https://github.com/h5py/h5py.git - pip install --upgrade --upgrade-strategy eager wheel - pip install --upgrade --upgrade-strategy eager --no-deps --pre git+https://github.com/pynbody/pynbody.git - - name: Install pynbody (3.12; macos) - if: ${{ matrix.os == 'macos-latest' && matrix.REQUIRES_PYNBODY && matrix.python-version == '3.12' }} - run: | - pip install --upgrade --upgrade-strategy eager --pre pytz tzdata - pip install --upgrade --upgrade-strategy eager --no-deps -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas - brew install hdf5 - export HDF5_DIR=$(brew --prefix hdf5) - pip install --upgrade --upgrade-strategy eager wheel - pip install --upgrade --upgrade-strategy eager --pre --no-deps --no-build-isolation --no-binary=h5py git+https://github.com/h5py/h5py.git - pip install --upgrade --upgrade-strategy eager --no-deps --pre git+https://github.com/pynbody/pynbody.git - name: Install pynbody - if: ${{ matrix.REQUIRES_PYNBODY && matrix.python-version != '3.12' }} + if: ${{ matrix.REQUIRES_PYNBODY }} run: | pip install --upgrade --upgrade-strategy eager h5py pandas pytz pip install --upgrade --upgrade-strategy eager wheel From 37c0287fef894fb714a7c5db194724f162c5c41b Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Mon, 9 Oct 2023 20:32:23 -0400 Subject: [PATCH 31/37] Try compiling pynbody with gcc --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0e441a70f..db5a77677 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -248,6 +248,9 @@ jobs: pip install --upgrade --upgrade-strategy eager --pre numpy scipy "matplotlib<3.8" numexpr setuptools "cython<1" pytest tqdm - name: Install pynbody if: ${{ matrix.REQUIRES_PYNBODY }} + env: + CC: gcc-11 + CXX: g++-11 run: | pip install --upgrade --upgrade-strategy eager h5py pandas pytz pip install --upgrade --upgrade-strategy eager wheel From a404eebd5c580cac01b7e28759b92513c3f4185e Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Mon, 9 Oct 2023 21:11:18 -0400 Subject: [PATCH 32/37] Try running Windows Python 3.12 tests --- .github/workflows/build_windows.yml | 42 ++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 698f83ff2..caeebf875 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -24,7 +24,7 @@ jobs: matrix: include: - os: windows-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_actionAngle.py REQUIRES_PYNBODY: false REQUIRES_ASTROPY: false @@ -32,7 +32,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: windows-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_sphericaldf.py REQUIRES_PYNBODY: false REQUIRES_ASTROPY: false @@ -40,7 +40,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: windows-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_conversion.py tests/test_galpypaper.py tests/test_import.py tests/test_interp_potential.py tests/test_kuzminkutuzov.py tests/test_util.py REQUIRES_PYNBODY: false REQUIRES_ASTROPY: false @@ -48,7 +48,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: windows-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_SpiralArmsPotential.py tests/test_potential.py tests/test_scf.py REQUIRES_PYNBODY: false REQUIRES_ASTROPY: false @@ -56,7 +56,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: windows-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_quantity.py tests/test_coords.py REQUIRES_PYNBODY: false # needs to be separate for different config @@ -65,7 +65,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: windows-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_orbit.py -k test_energy_jacobi_conservation REQUIRES_PYNBODY: false REQUIRES_ASTROPY: true @@ -73,7 +73,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: windows-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_orbit.py tests/test_orbits.py -k 'not test_energy_jacobi_conservation' REQUIRES_PYNBODY: false REQUIRES_ASTROPY: true @@ -81,7 +81,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: windows-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_evolveddiskdf.py REQUIRES_PYNBODY: false REQUIRES_ASTROPY: false @@ -89,7 +89,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: windows-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_jeans.py tests/test_dynamfric.py REQUIRES_PYNBODY: false REQUIRES_ASTROPY: false @@ -97,7 +97,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: windows-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_qdf.py tests/test_pv2qdf.py tests/test_streamgapdf_impulse.py tests/test_noninertial.py REQUIRES_PYNBODY: false REQUIRES_ASTROPY: false @@ -105,7 +105,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: windows-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_streamgapdf.py REQUIRES_PYNBODY: false REQUIRES_ASTROPY: false @@ -113,7 +113,7 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: windows-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_diskdf.py REQUIRES_PYNBODY: false REQUIRES_ASTROPY: false @@ -121,13 +121,29 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false - os: windows-latest - python-version: "3.11" + python-version: "3.12" TEST_FILES: tests/test_streamdf.py tests/test_streamspraydf.py REQUIRES_PYNBODY: false REQUIRES_ASTROPY: false REQUIRES_ASTROQUERY: false REQUIRES_NUMBA: false REQUIRES_JAX: false + - os: windows-latest + python-version: "3.11" + TEST_FILES: tests/test_orbit.py -k test_energy_jacobi_conservation + REQUIRES_PYNBODY: false + REQUIRES_ASTROPY: true + REQUIRES_ASTROQUERY: true + REQUIRES_NUMBA: false + REQUIRES_JAX: false + - os: windows-latest + python-version: "3.11" + TEST_FILES: tests/test_orbit.py tests/test_orbits.py -k 'not test_energy_jacobi_conservation' + REQUIRES_PYNBODY: false + REQUIRES_ASTROPY: true + REQUIRES_ASTROQUERY: true + REQUIRES_NUMBA: false + REQUIRES_JAX: false - os: windows-latest python-version: "3.10" TEST_FILES: tests/test_orbit.py -k test_energy_jacobi_conservation From c62ae54f9796a42ea3b452c25ae4984067d72f67 Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Mon, 9 Oct 2023 21:16:04 -0400 Subject: [PATCH 33/37] Also ignore TQDM deprecation on Windows --- .github/workflows/build_windows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index caeebf875..3c165b468 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -256,5 +256,6 @@ jobs: pip install pytest-cov # Turn astropy deprecation warnings into errors as well if astropy if $REQUIRES_ASTROPY; then export PYTEST_ADDOPTS="-W error::astropy.utils.exceptions.AstropyDeprecationWarning"; else export PYTEST_ADDOPTS=""; fi + export TQDM_DEPRECATION="-W ignore:\"datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version.\":DeprecationWarning -W ignore:\"datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC\":DeprecationWarning" # eval necessary for -k 'not ...' in TEST_FILES - eval "pytest -W error::DeprecationWarning -W error::FutureWarning $PYTEST_ADDOPTS -v $TEST_FILES --cov galpy --cov-config .coveragerc --disable-pytest-warnings --durations=0" + eval "pytest -W error::DeprecationWarning -W error::FutureWarning $PYTEST_ADDOPTS $TQDM_DEPRECATION -v $TEST_FILES --cov galpy --cov-config .coveragerc --disable-pytest-warnings --durations=0" From 55bf42dd8b34bb908a4271d25a3f1c0b886288ad Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Wed, 20 Dec 2023 21:00:59 -0500 Subject: [PATCH 34/37] Use numba RC with Python 3.12 support --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index db5a77677..5f2ee2632 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -264,7 +264,7 @@ jobs: - name: Install numba if: ${{ matrix.REQUIRES_NUMBA }} run: | - pip install numba + pip install numba==0.59.0rc1 llvmlite==0.42.0rc1 # numba may force install an older version of setuptools, # but it isn't actually a *runtime* requirement numba/numba#8366 pip install --upgrade --force-reinstall setuptools From d7d5431941b3c26c787168afb84f15642ead1fd5 Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Thu, 21 Dec 2023 21:04:09 -0500 Subject: [PATCH 35/37] Clean up build.yml, including fixing the codecov reports version --- .github/workflows/build.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5f2ee2632..9c41d7753 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -209,14 +209,13 @@ jobs: REQUIRES_NUMBA: false REQUIRES_JAX: false env: - PYTHON_COVREPORTS_VERSION: "3.11" + PYTHON_COVREPORTS_VERSION: "3.12" steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - allow-prereleases: true - name: Install lcov if: matrix.os == 'ubuntu-latest' run: | @@ -245,7 +244,7 @@ jobs: - name: Install Python dependencies (3.12) if: matrix.python-version == '3.12' run: | - pip install --upgrade --upgrade-strategy eager --pre numpy scipy "matplotlib<3.8" numexpr setuptools "cython<1" pytest tqdm + pip install --upgrade --upgrade-strategy eager numpy scipy matplotlib numexpr setuptools cython pytest tqdm - name: Install pynbody if: ${{ matrix.REQUIRES_PYNBODY }} env: @@ -257,10 +256,10 @@ jobs: pip install --upgrade --upgrade-strategy eager pynbody - name: Install astropy if: ${{ matrix.REQUIRES_ASTROPY }} - run: pip install --pre astropy pyerfa + run: pip install astropy pyerfa - name: Install astroquery if: ${{ matrix.REQUIRES_ASTROQUERY }} - run: pip install --pre astroquery + run: pip install astroquery - name: Install numba if: ${{ matrix.REQUIRES_NUMBA }} run: | @@ -270,7 +269,7 @@ jobs: pip install --upgrade --force-reinstall setuptools - name: Install JAX if: ${{ matrix.REQUIRES_JAX }} - run: pip install --pre jax jaxlib + run: pip install jax jaxlib - name: Install torus code env: TEST_FILES: ${{ matrix.TEST_FILES }} From ef43f196826e85e7db3fad901fe8369bb3d65892 Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Thu, 21 Dec 2023 21:32:11 -0500 Subject: [PATCH 36/37] Further clean-up of build.yml --- .github/workflows/build.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9c41d7753..6d655d77f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -238,11 +238,6 @@ jobs: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('.github/workflows/build.yml') }}-${{ matrix.REQUIRES_PYNBODY }}-${{ matrix.REQUIRES_ASTROPY }}-${{ matrix.REQUIRES_ASTROQUERY }}-${{ matrix.REQUIRES_NUMBA }}-${{ matrix.REQUIRES_JAX }} - name: Install Python dependencies - if: matrix.python-version != '3.12' - run: | - pip install --upgrade --upgrade-strategy eager numpy scipy matplotlib numexpr setuptools cython pytest tqdm - - name: Install Python dependencies (3.12) - if: matrix.python-version == '3.12' run: | pip install --upgrade --upgrade-strategy eager numpy scipy matplotlib numexpr setuptools cython pytest tqdm - name: Install pynbody From 2b93abc1364b8f2854e84692e98abd0f19d8fa0b Mon Sep 17 00:00:00 2001 From: Jo Bovy Date: Fri, 2 Feb 2024 09:14:30 -0500 Subject: [PATCH 37/37] Switch to newly released numba with Python 3.12 support --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6d655d77f..b267b747c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -258,7 +258,7 @@ jobs: - name: Install numba if: ${{ matrix.REQUIRES_NUMBA }} run: | - pip install numba==0.59.0rc1 llvmlite==0.42.0rc1 + pip install numba # numba may force install an older version of setuptools, # but it isn't actually a *runtime* requirement numba/numba#8366 pip install --upgrade --force-reinstall setuptools