supress wavelength sampling warning for twilight sky #1039
Workflow file for this run
This file contains 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
name: Run Tests and Build Documentation | |
on: | |
# Trigger the workflow on push (to main) or pull request | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
Tests: | |
name: Run Tests (${{ matrix.python-version }}, ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "macos-latest"] | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
channels: conda-forge,defaults | |
channel-priority: strict | |
show-channel-urls: true | |
- name: configure conda and install requirements | |
shell: bash -l {0} | |
run: | | |
conda config --set always_yes yes | |
conda install --quiet --file=requirements.txt | |
conda install --quiet --file=test-requirements.txt | |
- name: install rubin_sim | |
shell: bash -l {0} | |
run: | | |
echo `pwd` | |
ls ${{ github.workspace }} | |
python -m pip install . | |
- name: download rubin_sim_data components needed for unit tests | |
shell: bash -l {0} | |
run: | | |
export RUBIN_SIM_DATA_DIR=${{ github.workspace }}/data_dir | |
rs_download_data --tdqm_disable -d 'site_models,throughputs,skybrightness,skybrightness_pre' | |
rs_download_data --tdqm_disable -d tests --force | |
- name: conda list | |
shell: bash -l {0} | |
run: conda list | |
- name: run tests | |
shell: bash -l {0} | |
run: | | |
export RUBIN_SIM_DATA_DIR=${{ github.workspace }}/data_dir | |
pytest | |
Docs: | |
name: Build and push documentation | |
needs: Tests | |
runs-on: "macos-latest" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: "3.10" | |
channels: conda-forge,defaults | |
channel-priority: strict | |
show-channel-urls: true | |
- name: configure and install conda and requirements | |
shell: bash -l {0} | |
run: | | |
conda config --set always_yes yes | |
conda install --quiet --file=requirements.txt | |
conda install lsst-documenteer-pipelines | |
- name: install rubin_sim | |
shell: bash -l {0} | |
run: | | |
echo `pwd` | |
ls ${{ github.workspace }} | |
python -m pip install . | |
- name: download rubin_sim_data components needed to set up metrics for metricList | |
shell: bash -l {0} | |
run: | | |
export RUBIN_SIM_DATA_DIR=${{ github.workspace }} | |
rs_download_data --tdqm_disable -d 'maf,throughputs' | |
- name: conda list | |
shell: bash -l {0} | |
run: conda list | |
- name: build documentation | |
shell: bash -l {0} | |
run: | | |
export RUBIN_SIM_DATA_DIR=${{ github.workspace }} | |
cd doc | |
python metric_list.py | |
make html | |
- name: Install LTD Conveyor | |
shell: bash -l {0} | |
run: | | |
python -m pip install ltd-conveyor | |
- name: upload documentation | |
shell: bash -l {0} | |
env: | |
LTD_PASSWORD: ${{ secrets.LTD_PASSWORD }} | |
LTD_USERNAME: ${{ secrets.LTD_USERNAME }} | |
run: | | |
ltd upload --gh --dir doc/_build/html --product rubin-sim |