Skip to content

dashboard: manual color limits (vmin/vmax) for 2D plots #3312

dashboard: manual color limits (vmin/vmax) for 2D plots

dashboard: manual color limits (vmin/vmax) for 2D plots #3312

Workflow file for this run

name: CI
on:
push:
branches:
- main
- release
pull_request:
jobs:
formatting:
name: Formatting and static analysis
runs-on: 'ubuntu-24.04'
outputs:
min_python: ${{ steps.vars.outputs.min_python }}
min_tox_env: ${{ steps.vars.outputs.min_tox_env }}
steps:
- uses: actions/checkout@v4
- name: Get Python version for other CI jobs
id: vars
run: |
echo "min_python=$(< .github/workflows/python-version-ci)" >> "$GITHUB_OUTPUT"
echo "min_tox_env=py$(sed 's/\.//g' < .github/workflows/python-version-ci)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-python@v5
with:
python-version-file: '.github/workflows/python-version-ci'
- uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files
- uses: pre-commit-ci/lite-action@v1.1.0
if: always()
with:
msg: Apply automatic formatting
tests:
name: Tests
needs: formatting
strategy:
matrix:
os: ['ubuntu-24.04']
python:
- version: '${{needs.formatting.outputs.min_python}}'
tox-env: '${{needs.formatting.outputs.min_tox_env}}'
uses: ./.github/workflows/test.yml
with:
os-variant: ${{ matrix.os }}
python-version: ${{ matrix.python.version }}
tox-env: ${{ matrix.python.tox-env }}
secrets: inherit
instrument-check:
# Verify that an instrument deployment can construct its backend services
# using only the dependencies declared in its extras. Catches imports that
# accidentally depend on packages installed only via ``[test]`` or another
# instrument's extras, which would break in production.
name: Backend deps (${{ matrix.instrument }})
needs: tests
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
instrument: [bifrost, dream, dummy, estia, loki, nmx, odin, tbl]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version-file: '.github/workflows/python-version-ci'
- run: python -m pip install --upgrade pip
- run: python -m pip install ".[${{ matrix.instrument }}]"
- name: Smoke-check backend services
run: |
for svc in monitor_data detector_data data_reduction timeseries; do
echo "::group::$svc"
python -m ess.livedata.services.$svc \
--instrument ${{ matrix.instrument }} --check
echo "::endgroup::"
done
dashboard-check:
# Verify the dashboard can be constructed for every instrument using only
# the [dashboard] extra (which has no instrument-specific dependencies).
# If this fails for some instrument, either the dashboard has acquired a
# hidden instrument dependency or [dashboard] is missing something.
name: Dashboard deps
needs: tests
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version-file: '.github/workflows/python-version-ci'
- run: python -m pip install --upgrade pip
- run: python -m pip install ".[dashboard]"
- name: Smoke-check dashboard for each instrument
run: |
for inst in dummy tbl bifrost dream loki odin estia nmx; do
echo "::group::$inst"
python -m ess.livedata.dashboard.reduction \
--instrument $inst --transport none \
--no-fetch-announcements --check
echo "::endgroup::"
done
docs:
needs: tests
uses: ./.github/workflows/docs.yml
with:
publish: false
linkcheck: ${{ github.ref == 'refs/heads/main' }}
branch: ${{ github.head_ref == '' && github.ref_name || github.head_ref }}
secrets: inherit