Create subtable directly from large table #1317
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: '<3.0' | |
| scipy-version: '' | |
| matplotlib-version: '' | |
| astropy-version: '' | |
| numba-version: '' | |
| - os: ubuntu-latest | |
| python-version: '3.12' | |
| numpy-version: '<2.3' | |
| scipy-version: '<1.16' | |
| matplotlib-version: '<3.12' | |
| astropy-version: '<8.0' | |
| numba-version: '' | |
| - os: ubuntu-latest | |
| python-version: '3.11' | |
| numpy-version: '<2.1' | |
| scipy-version: '<1.14' | |
| matplotlib-version: '<3.10' | |
| astropy-version: '<7.0' | |
| numba-version: '<0.70' | |
| - os: ubuntu-latest | |
| python-version: '3.10' | |
| numpy-version: '<2.0' | |
| scipy-version: '<1.14' | |
| matplotlib-version: '<3.10' | |
| astropy-version: '<7.0' | |
| numba-version: '<0.70' | |
| steps: | |
| - name: Install System Packages | |
| run: sudo apt install libbz2-dev subversion | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel | |
| python -m pip install 'numpy${{ matrix.numpy-version }}' 'scipy${{ matrix.scipy-version }}' 'matplotlib${{ matrix.matplotlib-version }}' 'astropy${{ matrix.astropy-version }}' | |
| python -m pip install pytz healpy photutils | |
| python -m pip cache remove fitsio | |
| python -m pip cache remove numba | |
| python -m pip install --no-deps --force-reinstall --ignore-installed fitsio 'numba${{ matrix.numba-version }}' | |
| python -m pip install pytest | |
| - name: Install DESI dependencies | |
| env: | |
| DESIUTIL_VERSION: 3.5.2 | |
| SPECTER_VERSION: 0.11.0 | |
| DESIMODEL_VERSION: 0.20.0 | |
| run: | | |
| python -m pip install desiutil==${DESIUTIL_VERSION} desimodel==${DESIMODEL_VERSION} | |
| python -m pip install --no-build-isolation git+https://github.com/desihub/specter.git@${SPECTER_VERSION} | |
| - name: Install desimodel data | |
| env: | |
| DESIMODEL_DATA: branches/test-0.20 | |
| run: install_desimodel_data --desimodel-version ${DESIMODEL_DATA} | |
| - name: Install surveyops snapshot | |
| env: | |
| SURVEYOPS_VERSION: '2.0' | |
| run: | | |
| wget -nv https://data.desi.lbl.gov/public/epo/example_files/surveyops_${SURVEYOPS_VERSION}_ops.tar.gz | |
| tar xzf surveyops_${SURVEYOPS_VERSION}_ops.tar.gz | |
| - name: Run the test | |
| run: DESI_SURVEYOPS=$(pwd) pytest | |
| # Try to set up the coverage test to be as similar to NERSC/DESI 25.3 as possible. | |
| coverage: | |
| name: Test coverage | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| python-version: | |
| - '3.10' | |
| numpy-version: | |
| - '<1.23' | |
| scipy-version: | |
| - '<1.9' | |
| matplotlib-version: | |
| # later versions of matplotlib require later versions of numpy. | |
| - '<3.6.3' | |
| astropy-version: | |
| - '<6.1' | |
| steps: | |
| - name: Install System Packages | |
| run: sudo apt install libbz2-dev subversion | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel | |
| python -m pip install 'numpy${{ matrix.numpy-version }}' 'scipy${{ matrix.scipy-version }}' 'matplotlib${{ matrix.matplotlib-version }}' 'astropy${{ matrix.astropy-version }}' | |
| python -m pip install pytz healpy photutils==1.6.0 | |
| python -m pip cache remove fitsio | |
| python -m pip cache remove numba | |
| python -m pip install --no-deps --force-reinstall --ignore-installed fitsio numba\<0.60 | |
| python -m pip install pytest pytest-cov coveralls | |
| - name: Install DESI dependencies | |
| env: | |
| DESIUTIL_VERSION: 3.5.2 | |
| SPECTER_VERSION: 0.11.0 | |
| DESIMODEL_VERSION: 0.20.0 | |
| run: | | |
| python -m pip install desiutil==${DESIUTIL_VERSION} desimodel==${DESIMODEL_VERSION} | |
| python -m pip install --no-build-isolation git+https://github.com/desihub/specter.git@${SPECTER_VERSION} | |
| - name: Install desimodel data | |
| env: | |
| DESIMODEL_DATA: branches/test-0.20 | |
| run: install_desimodel_data --desimodel-version ${DESIMODEL_DATA} | |
| - name: Install surveyops snapshot | |
| env: | |
| SURVEYOPS_VERSION: '2.0' | |
| run: | | |
| wget -nv https://data.desi.lbl.gov/public/epo/example_files/surveyops_${SURVEYOPS_VERSION}_ops.tar.gz | |
| tar xzf surveyops_${SURVEYOPS_VERSION}_ops.tar.gz | |
| - name: Run the test with coverage | |
| run: DESI_SURVEYOPS=$(pwd) pytest --cov | |
| - name: Coveralls | |
| env: | |
| COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: coveralls --service=github | |
| docs: | |
| name: Doc test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| python-version: | |
| - '3.13' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Python dependencies | |
| run: python -m pip install --upgrade pip setuptools wheel Sphinx sphinx-rtd-theme | |
| - 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.13' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Python dependencies | |
| run: python -m pip install --upgrade pip setuptools wheel desiutil | |
| - name: Generate api.rst | |
| run: desi_api_file --api ./api.rst desitarget | |
| - name: Compare generated api.rst to checked-in version | |
| # This is equivalent to an allowed falure. | |
| continue-on-error: true | |
| 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.13' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| 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 --statistics --count py/desitarget |