Update proctable comments #7131
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
| # Workflow is based on the Astropy GitHub actions workflow, ci_workflows.yml | |
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| tags: | |
| - '*' | |
| pull_request: | |
| jobs: | |
| tests: | |
| name: Unit tests | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| python-version: '3.13' | |
| numpy-version: '<2.3' # Numba does not yet support NumPy 2.3! | |
| scipy-version: '' | |
| astropy-version: '<8.0' | |
| matplotlib-version: '' | |
| fitsio-version: '' | |
| numba-version: '' | |
| - os: ubuntu-latest | |
| python-version: '3.12' | |
| numpy-version: '<2.2' | |
| scipy-version: '<1.16' | |
| astropy-version: '<7.0' | |
| matplotlib-version: '<3.12' | |
| fitsio-version: '' | |
| numba-version: '' | |
| - os: ubuntu-latest | |
| python-version: '3.11' | |
| numpy-version: '<2.1' | |
| scipy-version: '<1.14' | |
| astropy-version: '<6.1' | |
| matplotlib-version: '<3.11' | |
| fitsio-version: '' | |
| numba-version: '<0.70' | |
| - os: ubuntu-latest | |
| python-version: '3.10' | |
| numpy-version: '<2.0' | |
| scipy-version: '<1.14' | |
| astropy-version: '<6.1' | |
| matplotlib-version: '<3.10' | |
| fitsio-version: '' | |
| numba-version: '<0.70' | |
| # os: [ubuntu-latest] | |
| # python-version: ['3.9', '3.10'] # fuji+guadalupe, not ready for 3.11 yet? | |
| # astropy-version: ['==5.0', '<6'] # fuji+guadalupe, latest | |
| # fitsio-version: ['==1.1.6', '<2'] # fuji+guadalupe, latest | |
| # numpy-version: ['<1.23'] # to keep asscalar, used by astropy | |
| # numba-version: ['<0.61.0'] # for compatibility with old numpy | |
| steps: | |
| - name: Install System Packages | |
| run: sudo apt install libbz2-dev subversion | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - 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 pytz healpy llvmlite speclite | |
| python -m pip install 'numpy${{ matrix.numpy-version }}' 'scipy${{ matrix.scipy-version }}' 'astropy${{ matrix.astropy-version }}' 'matplotlib${{ matrix.matplotlib-version }}' specutils | |
| python -m pip cache remove fitsio | |
| python -m pip cache remove numba | |
| python -m pip install --no-deps --force-reinstall --ignore-installed 'fitsio${{ matrix.fitsio-version }}' 'numba${{ matrix.numba-version }}' | |
| python -m pip install pytest | |
| - name: Install DESI dependencies | |
| env: | |
| DESIUTIL_VERSION: 3.6.0 # required for astropy 7.x | |
| SPECTER_VERSION: 0.11.0 | |
| GPU_SPECTER_VERSION: main | |
| DESIMODEL_VERSION: 0.19.3 | |
| DESITARGET_VERSION: main | |
| REDROCK_VERSION: 0.20.4 | |
| run: | | |
| # --no-build-isolation needed for older code tags with latest pip/setuputils | |
| python -m pip install --no-build-isolation desiutil==${DESIUTIL_VERSION} | |
| python -m pip install --no-build-isolation git+https://github.com/desihub/specter.git@${SPECTER_VERSION} | |
| python -m pip install --no-build-isolation git+https://github.com/desihub/gpu_specter.git@${GPU_SPECTER_VERSION} | |
| python -m pip install --no-build-isolation git+https://github.com/desihub/desimodel.git@${DESIMODEL_VERSION} | |
| python -m pip install --no-build-isolation git+https://github.com/desihub/desitarget.git@${DESITARGET_VERSION} | |
| python -m pip install --no-build-isolation git+https://github.com/desihub/redrock.git@${REDROCK_VERSION} | |
| - name: Install desimodel data | |
| env: | |
| DESIMODEL_DATA: branches/test-0.19 | |
| run: install_desimodel_data --desimodel-version ${DESIMODEL_DATA} | |
| - name: Run the test | |
| run: pytest | |
| coverage: | |
| name: Test coverage | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| # matches python 3.10 environment above, approximately matching NERSC | |
| os: [ubuntu-latest] | |
| python-version: ['3.10'] | |
| numpy-version: ['<2.0'] | |
| scipy-version: ['<1.14'] | |
| astropy-version: ['<6.1'] | |
| matplotlib-version: ['<3.10'] | |
| fitsio-version: [''] | |
| numba-version: ['<0.70'] | |
| steps: | |
| - name: Install System Packages | |
| run: sudo apt install libbz2-dev subversion | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - 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 pytz healpy llvmlite speclite | |
| python -m pip install 'numpy${{ matrix.numpy-version }}' 'scipy${{ matrix.scipy-version }}' 'astropy${{ matrix.astropy-version }}' 'matplotlib${{ matrix.matplotlib-version }}' | |
| python -m pip cache remove fitsio | |
| python -m pip cache remove numba | |
| python -m pip install --no-deps --force-reinstall --ignore-installed 'fitsio${{ matrix.fitsio-version }}' 'numba${{ matrix.numba-version }}' | |
| python -m pip install pytest pytest-cov coveralls | |
| - name: Install DESI dependencies | |
| env: | |
| DESIUTIL_VERSION: 3.6.0 # required for astropy 7.x | |
| SPECTER_VERSION: 0.11.0 | |
| GPU_SPECTER_VERSION: main | |
| DESIMODEL_VERSION: 0.19.3 | |
| DESITARGET_VERSION: main | |
| REDROCK_VERSION: 0.20.4 | |
| run: | | |
| # --no-build-isolation needed for older code tags with latest pip/setuputils | |
| python -m pip install --no-build-isolation desiutil==${DESIUTIL_VERSION} | |
| python -m pip install --no-build-isolation git+https://github.com/desihub/desimodel.git@${DESIMODEL_VERSION} | |
| python -m pip install --no-build-isolation git+https://github.com/desihub/specter.git@${SPECTER_VERSION} | |
| python -m pip install --no-build-isolation git+https://github.com/desihub/gpu_specter.git@${GPU_SPECTER_VERSION} | |
| python -m pip install --no-build-isolation git+https://github.com/desihub/desitarget.git@${DESITARGET_VERSION} | |
| python -m pip install --no-build-isolation git+https://github.com/desihub/redrock.git@${REDROCK_VERSION} | |
| - name: Install desimodel data | |
| env: | |
| DESIMODEL_DATA: branches/test-0.19 | |
| run: install_desimodel_data --desimodel-version ${DESIMODEL_DATA} | |
| - name: Run the test | |
| run: pytest --cov | |
| # 2026-02-27 : Coveralls is having a major outage; skip the coverage upload | |
| ### - name: Coveralls | |
| ### env: | |
| ### COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
| ### GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| ### run: coveralls | |
| desilite: | |
| name: Test minimal env | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ['3.10'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - 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 pytest | |
| ### python -m pip install astropy scipy numba "numpy<2.0" | |
| ### python -m pip install pytest | |
| ### python -m pip cache remove fitsio | |
| ### python -m pip install --no-deps --force-reinstall --ignore-installed fitsio | |
| ### python -m pip install desiutil | |
| ### python -m pip install git+https://github.com/desihub/desitarget.git | |
| python -m pip install . | |
| - name: Run just the lite env test | |
| run: pytest py/desispec/test/test_lite.py | |
| docs: | |
| name: Doc test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ['3.10'] | |
| 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 Sphinx sphinx-rtd-theme | |
| # run: python -m pip install --upgrade pip wheel docutils\<0.18 Sphinx==3.1.2 | |
| - name: Test the documentation | |
| run: sphinx-build -W --keep-going -b html doc doc/_build/html | |
| api: | |
| name: API doc completeness test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ['3.10'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - 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 desiutil | |
| - name: Generate api.rst | |
| run: desi_api_file --api ./api.rst desispec | |
| - name: Compare generated api.rst to checked-in version | |
| run: diff --ignore-space-change --ignore-blank-lines ./api.rst ./doc/api.rst | |
| style: | |
| name: Style check | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ['3.10'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - 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 pycodestyle | |
| - name: Test the style; failures are allowed | |
| # This is equivalent to an allowed falure. | |
| continue-on-error: true | |
| run: pycodestyle --count py/desispec |