Skip to content

Interferometric module for Phoebe #153

Interferometric module for Phoebe

Interferometric module for Phoebe #153

# This workflow will install dependencies and run tests on pull requests to all branches.
name: Python 3.7 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.7"]
# astropy-version: ["3.0", "4.0"]
astropy-version: ["3.0", "4.0"]
# numpy-version: ["1.15", "1.16", "1.17", "1.18", "1.19", "1.20", "1.21"]
numpy-version: ["1.15", "1.21"]
# scipy-version: ["1.4", "1.5", "1.6", "1.7"]
scipy-version: ["1.4", "1.7"]
# mpl-version: ["3.3", "3.4", "3.5"]
os: [ubuntu-latest, macos-11] # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
exclude:
- astropy-version: "2.0" # not sure why this is failing
os: "macos-11"
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 corner 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 tests/nosetests/