Skip to content

Commit

Permalink
Merge branch 'main' into ias15
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwez1 committed Sep 12, 2024
2 parents fd83246 + 7c5ad82 commit eaaf25d
Show file tree
Hide file tree
Showing 23 changed files with 349 additions and 206 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.10.0.dev0
current_version = 1.10.1.dev0
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<dev>\d+))?
serialize =
{major}.{minor}.{patch}.{release}{dev}
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,15 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install libgsl-dev
- name: Install the GSL
- name: Install the GSL and OpenMP
if: matrix.os == 'macos-12'
run: |
brew install gsl
echo "CFLAGS=-I$(brew --prefix)/include" >> $GITHUB_ENV
echo "LDFLAGS=-L$(brew --prefix)/lib" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$(brew --prefix)/lib" >> $GITHUB_ENV
brew install gsl libomp
brew info libomp
echo "CFLAGS=-I$(brew --prefix)/include -I/usr/local/opt/libomp/include" >> $GITHUB_ENV
echo "CPPFLAGS=-I$(brew --prefix)/include -I/usr/local/opt/libomp/include" >> $GITHUB_ENV
echo "LDFLAGS=-L$(brew --prefix)/lib -L/usr/local/opt/libomp/lib" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$(brew --prefix)/lib:/usr/local/opt/libomp/lib" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
path: ~/.cache/pip
Expand All @@ -242,9 +244,6 @@ jobs:
pip install --upgrade --upgrade-strategy eager numpy scipy matplotlib numexpr setuptools cython 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
Expand Down
109 changes: 100 additions & 9 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:

jobs:
build_wheels:
name: Build wheel for ${{ matrix.python }}-${{ matrix.buildplat[1] }}-${{ matrix.buildplat[2] }}
name: Build wheel for ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}-${{ matrix.buildplat[2] }}
runs-on: ${{ matrix.buildplat[0] }}
strategy:
# Ensure that a wheel builder finishes even if another fails
Expand All @@ -35,7 +35,12 @@ jobs:
- [macos-12, macosx, x86_64]
- [macos-14, macosx, arm64]
- [windows-2019, win, amd64]
python: ["cp38", "cp39", "cp310", "cp311", "cp312"]
python:
- ["cp38","3.8"]
- ["cp39","3.9"]
- ["cp310","3.10"]
- ["cp311","3.11"]
- ["cp312","3.12"]
steps:
- uses: actions/checkout@v4
- name: Install GSL (Windows / Mac OS x86_64)
Expand All @@ -48,7 +53,7 @@ jobs:
- conda-forge
create-args: gsl
cache-environment: true
cache-environment-key: ${{ matrix.buildplat[1] }}-${{ matrix.buildplat[2] }}-${{ hashFiles('.github/workflows/wheels.yml') }}
cache-environment-key: gsl-${{ matrix.buildplat[1] }}-${{ matrix.buildplat[2] }}-${{ hashFiles('.github/workflows/wheels.yml') }}
- name: Set GSL environment variables (Windows)
if: matrix.buildplat[1] == 'win'
shell: bash -l {0}
Expand All @@ -66,20 +71,106 @@ jobs:
echo "REPAIR_LIBRARY_PATH=$CONDA_PREFIX/lib" >> $GITHUB_ENV # https://github.com/pypa/cibuildwheel/issues/816#issuecomment-916197079
echo "$CONDA_PREFIX/bin" >> $GITHUB_PATH # necessary when we don't activate the environment
- name: Build wheels
uses: pypa/cibuildwheel@v2.17
uses: pypa/cibuildwheel@v2.20
env:
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}_${{ matrix.buildplat[2] }}
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}_${{ matrix.buildplat[2] }}
CIBW_BUILD_VERBOSITY: 1
CIBW_BEFORE_BUILD_LINUX: yum -y install gsl-devel
CIBW_ARCHS_MACOS: ${{ matrix.buildplat[2] }}
CIBW_CONFIG_SETTINGS_MACOS: "--build-option=--no-openmp"
CIBW_ENVIRONMENT_MACOS: "MACOSX_DEPLOYMENT_TARGET=10.13"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-listdeps {wheel} &&
DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel -v --require-archs {delocate_archs} -w {dest_dir} {wheel}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.python }}-${{ matrix.buildplat[1] }}_${{ matrix.buildplat[2] }}
name: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}_${{ matrix.buildplat[2] }}
path: ./wheelhouse/*.whl
test_wheels:
name: Test Python ${{ matrix.python[1] }} wheels on ${{ matrix.buildplat[2] }} ${{ matrix.buildplat[0] }}
runs-on: ${{ matrix.buildplat[0] }}
needs: build_wheels
strategy:
# Ensure that tests finish even if another fails
fail-fast: false
matrix:
buildplat:
- [ubuntu-22.04, manylinux, x86_64]
- [macos-12, macosx, x86_64]
- [macos-14, macosx, arm64]
- [windows-2019, win, amd64]
python:
- ["cp38","3.8"]
- ["cp39","3.9"]
- ["cp310","3.10"]
- ["cp311","3.11"]
- ["cp312","3.12"]
steps:
- uses: actions/checkout@v4
- run: mkdir wheelhouse
- uses: actions/download-artifact@v4
with:
name: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}_${{ matrix.buildplat[2] }}
path: wheelhouse/
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python[1] }}
- name: Install GSL (Windows)
uses: mamba-org/setup-micromamba@v1
if: matrix.buildplat[1] == 'win'
with:
environment-name: gsl
condarc: |
channels:
- conda-forge
create-args: gsl
cache-environment: true
cache-environment-key: gsl-${{ matrix.buildplat[1] }}-${{ matrix.buildplat[2] }}-${{ hashFiles('.github/workflows/wheels.yml') }}
- name: Set GSL environment variables (Windows)
if: matrix.buildplat[1] == 'win'
shell: bash -l {0}
run: |
micromamba activate gsl
echo "LIBPATH=$CONDA_PREFIX\\Library\\lib" >> $GITHUB_ENV
echo "$CONDA_PREFIX\\Library\\bin" >> $GITHUB_PATH # necessary when we don't activate the environment
- name: Install wheel
shell: bash
run: python -m pip install `ls -d "$(pwd)"/wheelhouse/*.whl`
- name: Test built wheel in non-conda environment
shell: bash
working-directory: ${{ runner.temp }}
run: |
pip install astropy pytest
pytest -v $GITHUB_WORKSPACE/tests/test_orbit.py -k "test_energy_jacobi_conservation and NFW"
# Test that built wheels also work in a conda environment, setup environment, install wheel, and run test
- name: Setup test conda environment (Linux / Mac OS)
if: matrix.buildplat[1] != 'win'
uses: mamba-org/setup-micromamba@v1
with:
environment-name: test-wheel-conda
condarc: |
channels:
- conda-forge
create-args: python=${{ matrix.python[1] }} numpy scipy matplotlib astropy pytest
cache-environment: true
cache-environment-key: test-wheel-conda-${{ matrix.buildplat[1] }}-${{ matrix.buildplat[2] }}-${{ hashFiles('.github/workflows/wheels.yml') }}
- name: Setup test conda environment (Windows)
if: matrix.buildplat[1] == 'win'
shell: bash -l {0}
run: |
micromamba create -n test-wheel-conda -c conda-forge python=${{ matrix.python[1] }} numpy scipy matplotlib astropy pytest gsl
micromamba activate test-wheel-conda
echo "LIBPATH=$CONDA_PREFIX\\Library\\lib" >> $GITHUB_ENV
- name: Install built wheel in conda environment
shell: bash -l {0}
run: |
micromamba activate test-wheel-conda
python -m pip install `ls -d "$(pwd)"/wheelhouse/*.whl`
- name: Test built wheel in conda environment
shell: bash -l {0}
working-directory: ${{ runner.temp }}
run: |
micromamba activate test-wheel-conda
pytest -v $GITHUB_WORKSPACE/tests/test_orbit.py -k "test_energy_jacobi_conservation and NFW"
build_sdist:
name: Build source directory for release
if: github.event_name == 'release' && github.event.action == 'created'
Expand All @@ -106,7 +197,7 @@ jobs:
# Deploy wheels and sdist to PyPI (upon release creation)
deploy_pypi:
name: Deploy to PyPI
needs: [build_wheels, build_sdist]
needs: [build_wheels, test_wheels, build_sdist]
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
Expand All @@ -127,7 +218,7 @@ jobs:
# Deploy wheels and sdist to AWS S3 (main)
deploy_s3:
name: Deploy to AWS S3
needs: build_wheels
needs: [build_wheels, test_wheels]
runs-on: ubuntu-latest
if: github.event_name != 'release' && github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
steps:
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
- id: check-executables-have-shebangs
- id: check-yaml
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py38-plus]
Expand All @@ -30,12 +30,12 @@ repos:
- id: isort
name: isort (python)
- repo: https://github.com/codespell-project/codespell
rev: "v2.2.6"
rev: "v2.3.0"
hooks:
- id: codespell
args: ["-L", "thisE,thise,mye,tE,te,hist,ro,sav,ccompiler,aas",
args: ["-L", "thisE,thise,mye,tE,te,hist,ro,sav,ccompiler,aas,floatIn,dOmin",
"-x","doc/source/_static/try-galpy.js"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.3
rev: v0.6.3
hooks:
- id: ruff-format
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors:
given-names: "Jo"
orcid: "https://orcid.org/0000-0001-6855-442X"
title: "galpy"
version: 1.10.0.dev0
version: 1.10.1.dev0
url: "https://github.com/jobovy/galpy"
preferred-citation:
type: article
Expand Down
16 changes: 13 additions & 3 deletions HISTORY.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
v1.10.1 (expected around 2024-07-01)
===================
v1.10.1 (Expected around 2024-11-01)
====================

- Propagate general plotting keywords in Potential.plot/plotPotentials.

v1.10.0 (2024-07-07)
====================

- Increased support for using OpenMP with clang and, in particular, added OpenMP support
in the released Mac wheels.

- Removed explicit support for using Intel compilers.

- Switch to using Ruff as the code formatter.

Expand All @@ -12,7 +22,7 @@ v1.9.2 (2024-03-04)
treated as a spherical potential). Kuzmin-like potentials are obtained by
replacing the spherical radius r with \sqrt(R^2 + (a + |z|^2)), while
Miyamoto-Nagai-like potentials are obtained by replacing the spherical
radius with \sqrt(R^2 + (a + \\sqrt(z^2 + b^2))^2). The standard KuzminDiskPotential
radius with \sqrt(R^2 + (a + \sqrt(z^2 + b^2))^2). The standard KuzminDiskPotential
and MiyamotoNagaiPotential are obtained by applying this procedure to a point-mass
potential and the Kuzmin/Miyamoto-Nagai-like potentials generalize this to any
spherical potential.
Expand Down
83 changes: 0 additions & 83 deletions __intelcompiler.py

This file was deleted.

12 changes: 6 additions & 6 deletions doc/source/actionAngle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ Reverse transformations are discussed in
We start by discussing the forward and reverse transformations for the two
specific potentials: the isochrone and the harmonic potentals.

**UPDATED IN v1.8.2** Action-angle coordinates for the isochrone/harmonic potentials
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Action-angle coordinates for the isochrone/harmonic potentials
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The harmonic and isochrone potentials are the only potentials for which all of
the actions, frequencies, and angles can be calculated analytically and for
Expand Down Expand Up @@ -197,8 +197,8 @@ We can also reverse this using ``actionAngleHarmonicInverse``

.. _aafwd:

**UPDATED IN v1.8.2** Forward action-angle transformations (**x**, **v**) --> (**J**, **O**, **a**)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Forward action-angle transformations (**x**, **v**) --> (**J**, **O**, **a**)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Action-angle coordinates for spherical potentials
--------------------------------------------------
Expand Down Expand Up @@ -861,8 +861,8 @@ which gives

.. _aareverse:

**UPDATED IN v1.8.2** Reverse action-angle transformations (**J**, **a**) --> (**x**, **v**, **O**)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Reverse action-angle transformations (**J**, **a**) --> (**x**, **v**, **O**)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Reverse action-angle transformations for one-dimensional potentials
------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def linkcode_resolve(domain, info):
# built documents.
#
# The short X.Y version.
version = "1.10.0.dev0"
version = "1.10.1.dev0"
# The full version, including alpha/beta/rc tags.
release = version
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
Expand Down
Loading

0 comments on commit eaaf25d

Please sign in to comment.