Skip to content

Interferometric module for Phoebe #151

Interferometric module for Phoebe

Interferometric module for Phoebe #151

# This workflow will install dependencies and run tests on pull requests to all branches.
name: Python 3.10+ test suite
on:
workflow_dispatch:
pull_request:
push:
branches:
- 'master'
- 'feature-*'
- 'bugfix-*'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
astropy-version: ["5.0"]
# numpy-version: ["1.22", "1.23", "1.24"]
numpy-version: ["1.22", "1.24"]
# scipy-version: ["1.8", "1.9", "1.10"]
scipy-version: ["1.8", "1.10"]
# mpl-version: ["3.2", "3.3", "3.4", "3.5", "3.6"]
os: [ubuntu-latest, macos-11, macos-12] # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
exclude:
- python-version: "3.11"
scipy-version: "1.8"
- python-version: "3.11" # numpy 1.22 requires python 3.8<=3.10
numpy-version: "1.22"
- os: macos-11 # URGENT: test_rm.py:test_binary fails
python-version: "3.11"
numpy-version: "1.24"
scipy-version: "1.10"
astropy-version: "5.0"
- os: macos-12 # URGENT: test_rm.py:test_binary fails
python-version: "3.11"
numpy-version: "1.24"
scipy-version: "1.10"
astropy-version: "5.0"
name: ${{ matrix.os }} python${{ matrix.python-version}} numpy ${{ matrix.numpy-version }} scipy ${{ matrix.scipy-version }} astropy ${{ matrix.astropy-version}}
steps:
- name: Checkout PHOEBE
uses: actions/checkout@v3
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: PHOEBE environment variables
run: |
export PHOEBE_ENABLE_PLOTTING='FALSE'
export PHOEBE_UPDATE_PASSBAND_IGNORE_VERSION='TRUE'
- name: Update pip
run: |
python -m pip install --upgrade pip
- name: Install numpy ${{ matrix.numpy-version }}, scipy ${{ matrix.scipy-version }}, astropy ${{ matrix.astropy-version }} and dependencies
run: |
python -m pip install numpy==${{ matrix.numpy-version }}.* --force-reinstall
python -m pip install scipy==${{ matrix.scipy-version }}.* --no-deps
python -m pip install astropy==${{ matrix.astropy-version }}.* --no-deps
python -m pip install rebound requests pytest sympy tqdm pyyaml pyerfa pipdeptree
- name: Run pipdeptree to see package dependencies
run: |
pipdeptree
- name: Test numpy, scipy, astropy install/versions
run: |
python -c "import numpy; print(f'numpy version: {numpy.__version__}')"
python -c "import scipy; print(f'scipy version: {scipy.__version__}')"
python -c "import astropy; print(f'astropy version: {astropy.__version__}')"
- name: Install PHOEBE from source
run: |
python setup.py build && python setup.py install --user
- name: Checkout photodynam
uses: actions/checkout@v3
with:
repository: phoebe-project/photodynam
path: photodynam
- name: Install photodynam
run: |
cd photodynam
make
sudo cp photodynam /usr/local/bin/
python setup.py build && python3 setup.py install --user
cd ..
- name: Test photodynam install
run: |
python -c "import photodynam"
- name: Setup GNU Fortran
uses: modflowpy/install-gfortran-action@v1
- name: Install jktebop
run: |
wget https://www.astro.keele.ac.uk/jkt/codes/jktebop-v43.tgz
tar -xvzf jktebop-v43.tgz
cd jktebop43
gfortran -o jktebop jktebop.f
echo $(pwd) >> $GITHUB_PATH
cd ..
- name: Test jktebop install
run: |
jktebop
- name: Run tests
run: |
pytest --verbose --capture=no --full-trace tests/nosetests/