Add MultipoleExpansionPotential for multipole expansion of arbitrary densities #2468
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Windows build | |
| on: | |
| push: | |
| paths: | |
| - '**' | |
| - '!*' | |
| - '*.py' | |
| - '!doc/**' | |
| - '!.github/**' | |
| - '.github/workflows/build_windows.yml' | |
| pull_request: | |
| paths-ignore: | |
| - 'doc/**' | |
| schedule: | |
| - cron: '0 20 * * 2' | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| if: "!contains(github.event.head_commit.message, 'ci skip')" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| python-version: "3.14" | |
| TEST_FILES: tests/test_actionAngle.py | |
| REQUIRES_PYNBODY: false | |
| REQUIRES_ASTROPY: false | |
| REQUIRES_ASTROQUERY: false | |
| REQUIRES_NUMBA: false | |
| REQUIRES_JAX: false | |
| - os: windows-latest | |
| python-version: "3.14" | |
| TEST_FILES: tests/test_sphericaldf.py | |
| REQUIRES_PYNBODY: false | |
| REQUIRES_ASTROPY: false | |
| REQUIRES_ASTROQUERY: false | |
| REQUIRES_NUMBA: false | |
| REQUIRES_JAX: false | |
| - os: windows-latest | |
| python-version: "3.14" | |
| 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 | |
| REQUIRES_ASTROQUERY: false | |
| REQUIRES_NUMBA: false | |
| REQUIRES_JAX: false | |
| - os: windows-latest | |
| python-version: "3.14" | |
| TEST_FILES: tests/test_SpiralArmsPotential.py tests/test_potential.py tests/test_scf.py tests/test_MultipoleExpansionPotential.py | |
| REQUIRES_PYNBODY: false | |
| REQUIRES_ASTROPY: false | |
| REQUIRES_ASTROQUERY: false | |
| REQUIRES_NUMBA: false | |
| REQUIRES_JAX: false | |
| - os: windows-latest | |
| python-version: "3.14" | |
| TEST_FILES: tests/test_quantity.py tests/test_coords.py | |
| REQUIRES_PYNBODY: false | |
| # needs to be separate for different config | |
| REQUIRES_ASTROPY: true | |
| REQUIRES_ASTROQUERY: false | |
| REQUIRES_NUMBA: false | |
| REQUIRES_JAX: false | |
| - os: windows-latest | |
| python-version: "3.14" | |
| 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.14" | |
| 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.14" | |
| TEST_FILES: tests/test_evolveddiskdf.py | |
| REQUIRES_PYNBODY: false | |
| REQUIRES_ASTROPY: false | |
| REQUIRES_ASTROQUERY: false | |
| REQUIRES_NUMBA: false | |
| REQUIRES_JAX: false | |
| - os: windows-latest | |
| python-version: "3.14" | |
| TEST_FILES: tests/test_jeans.py tests/test_dynamfric.py tests/test_FDMdynamfric.py | |
| REQUIRES_PYNBODY: false | |
| REQUIRES_ASTROPY: false | |
| REQUIRES_ASTROQUERY: false | |
| REQUIRES_NUMBA: false | |
| REQUIRES_JAX: false | |
| - os: windows-latest | |
| python-version: "3.14" | |
| 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 | |
| REQUIRES_ASTROQUERY: false | |
| REQUIRES_NUMBA: true | |
| REQUIRES_JAX: false | |
| - os: windows-latest | |
| python-version: "3.14" | |
| TEST_FILES: tests/test_streamgapdf.py | |
| REQUIRES_PYNBODY: false | |
| REQUIRES_ASTROPY: false | |
| REQUIRES_ASTROQUERY: false | |
| REQUIRES_NUMBA: false | |
| REQUIRES_JAX: false | |
| - os: windows-latest | |
| python-version: "3.14" | |
| TEST_FILES: tests/test_diskdf.py | |
| REQUIRES_PYNBODY: false | |
| REQUIRES_ASTROPY: false | |
| REQUIRES_ASTROQUERY: false | |
| REQUIRES_NUMBA: false | |
| REQUIRES_JAX: false | |
| - os: windows-latest | |
| python-version: "3.14" | |
| 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.13" | |
| 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.13" | |
| 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.12" | |
| 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.12" | |
| 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.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 | |
| 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 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 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| # Cache both conda and pip, conda done by setup-micromamba | |
| - uses: actions/cache@v5 | |
| with: | |
| path: ~\AppData\Local\pip\Cache | |
| key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('.github/workflows/build_windows.yml') }}-${{ matrix.REQUIRES_PYNBODY }}-${{ matrix.REQUIRES_ASTROPY }}-${{ matrix.REQUIRES_ASTROQUERY }}-${{ matrix.REQUIRES_NUMBA }}-${{ matrix.REQUIRES_JAX }} | |
| # Install just the GSL using conda | |
| - uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| environment-name: gsl | |
| condarc: | | |
| channels: | |
| - conda-forge | |
| create-args: gsl | |
| cache-environment: true | |
| cache-environment-key: ${{ runner.os }}-${{ hashFiles('.github/workflows/build_windows.yml') }} | |
| - name: Set conda environment variables necessary to run gsl-config.bat and auto-detect GSL paths in setup.py | |
| shell: bash -l {0} | |
| run: | | |
| echo "$CONDA_PREFIX\\Library\\bin" >> $GITHUB_PATH # necessary when we don't activate the environment | |
| echo "CONDA_PREFIX=$CONDA_PREFIX" >> $GITHUB_ENV # necessary for gsl-config.bat to find GSL paths | |
| - name: Install Python dependencies | |
| run: | | |
| pip install --upgrade --upgrade-strategy eager numpy scipy matplotlib numexpr setuptools cython pytest tqdm | |
| - name: Install pynbody | |
| if: ${{ matrix.REQUIRES_PYNBODY }} | |
| 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 && matrix.python-version != 4.0 }} | |
| run: | | |
| pip install astropy pyerfa | |
| - name: Install astropy (Python 4.0; doesn't exist of course, placeholder for new python v) | |
| if: ${{ matrix.REQUIRES_ASTROPY && matrix.python-version == 4.0 }} | |
| run: | | |
| pip install pyerfa | |
| pip install --extra-index-url=https://pkgs.dev.azure.com/astropy-project/astropy/_packaging/nightly/pypi/simple/ --pre astropy | |
| - name: Install astroquery | |
| if: ${{ matrix.REQUIRES_ASTROQUERY }} | |
| run: pip install astroquery | |
| - name: Install numba | |
| if: ${{ matrix.REQUIRES_NUMBA }} | |
| run: pip install numba | |
| - name: Install JAX | |
| if: ${{ matrix.REQUIRES_JAX }} | |
| run: pip install jax jaxlib | |
| - name: Install package | |
| run: | | |
| python -m pip install -ve . | |
| - name: Print debug info | |
| shell: pwsh | |
| env: | |
| REQUIRES_ASTROPY : ${{ matrix.REQUIRES_ASTROPY }} | |
| REQUIRES_ASTROQUERY : ${{ matrix.REQUIRES_ASTROQUERY }} | |
| REQUIRES_PYNBODY : ${{ matrix.REQUIRES_PYNBODY }} | |
| run: | | |
| python -c "import numpy; print('numpy: {}'.format(numpy.__version__))" | |
| python -c "import scipy; print('scipy: {}'.format(scipy.__version__))" | |
| python -c "import matplotlib; print('matplotlib: {}'.format(matplotlib.__version__))" | |
| if ( $REQUIRES_ASTROPY ) { python -c "import astropy; print('astropy: {}'.format(astropy.__version__))"} | |
| if ( $REQUIRES_ASTROQUERY ) { python -c "import astroquery; print('astroquery: {}'.format(astroquery.__version__))"} | |
| if ( $REQUIRES_PYNBODY ) {python -c "import pynbody; print('pynbody: {}'.format(pynbody.__version__))"} | |
| - name: Test with pytest | |
| shell: bash | |
| env: | |
| TEST_FILES: ${{ matrix.TEST_FILES }} | |
| REQUIRES_ASTROPY : ${{ matrix.REQUIRES_ASTROPY }} | |
| MPLBACKEND: Agg | |
| run: | | |
| 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 PILLOW_DEPRECATION="-W ignore:\"'mode' parameter is deprecated and will be removed in Pillow 13 (2026-10-15)\":DeprecationWarning" | |
| # eval necessary for -k 'not ...' in TEST_FILES | |
| eval "pytest -W error::DeprecationWarning -W error::FutureWarning $PYTEST_ADDOPTS $PILLOW_DEPRECATION -v $TEST_FILES --cov galpy --cov-config .coveragerc --disable-pytest-warnings --durations=0" |