Skip to content

Update doc configuration #466

Update doc configuration

Update doc configuration #466

Workflow file for this run

name: CI
on:
push:
branches:
- '*'
tags:
- '*'
pull_request:
jobs:
tests:
name: Unit tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-22.04]
python-version: ['3.10'] # , '3.11', '3.12']
numpy-version: ['<1.23']
astropy-version: ['<6.1', '<7']
env:
DESIUTIL_VERSION: 3.4.3
DESIMODEL_VERSION: 0.19.2
DESIMETER_VERSION: 0.7.1
DESIMODEL_DATA: branches/test-0.19
DESIMODEL: ${{ github.workspace }}/desimodel
DESITARGET_VERSION: 2.5.0
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python -m pip install --no-cache-dir --upgrade pip setuptools wheel
python -m pip install --no-cache-dir pyyaml requests
python -m pip install --no-cache-dir scipy matplotlib healpy
python -m pip install --no-cache-dir --upgrade "numpy${{ matrix.numpy-version }}"
python -m pip install --no-cache-dir --upgrade "astropy${{ matrix.astropy-version }}"
python -m pip install --no-cache-dir fitsio
python -m pip install --no-cache-dir git+https://github.com/desihub/desiutil.git@${{ env.DESIUTIL_VERSION }}#egg=desiutil
python -m pip install --no-cache-dir git+https://github.com/desihub/desimodel.git@${{ env.DESIMODEL_VERSION }}#egg=desimodel
python -m pip install --no-cache-dir git+https://github.com/desihub/desitarget.git@${{ env.DESITARGET_VERSION }}#egg=desitarget
python -m pip install --no-cache-dir git+https://github.com/desihub/desimeter.git@${{ env.DESIMETER_VERSION }}#egg=desimeter
mkdir -p ${{ env.DESIMODEL }}
svn export https://desi.lbl.gov/svn/code/desimodel/${{ env.DESIMODEL_DATA }}/data ${{ env.DESIMODEL }}/data
- name: Install Fiberassign
run: CC=g++ CXX=g++ CFLAGS="-fPIC" LDSHARED="g++ -shared" python -m pip install -vvv .
- name: Run Tests
run: python -c 'import fiberassign.test; fiberassign.test.runtests()'
docs:
name: Doc test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
python-version: ['3.10']
env:
DESIUTIL_VERSION: 3.5.0
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r doc/rtd_requirements.txt
# - name: Install desiutil
# run: python -m pip install --no-cache-dir git+https://github.com/desihub/desiutil.git@${{ env.DESIUTIL_VERSION }}#egg=desiutil
- name: Compile the package
run: CC=g++ CXX=g++ CFLAGS="-fPIC" LDSHARED="g++ -shared" python setup.py build_ext --inplace
- name: Test the documentation
run: sphinx-build -W --keep-going -b html doc doc/_build/html