Skip to content

Flat and star_field #453

Flat and star_field

Flat and star_field #453

Workflow file for this run

name: build_and_test
on:
push:
branches:
- main
- lsst-dev
- master
pull_request:
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: "3.11"
miniforge-variant: Mambaforge
miniforge-version: latest
show-channel-urls: true
activate-environment: test
- name: Install dependencies
# Might be quicker to install rubin-env plus any necessary additions.
shell: bash -l {0}
run: |
mamba install -y "numpy>1.15" scipy "matplotlib>3.1" pandas llvmlite numba "astropy>=3.2" "photutils>=1.7" astroquery coloredlogs scikit-image>=0.20 h5py emcee tqdm mpi4py schwimmbad "iminuit>=2" "coverage>=3.6" configparser coveralls deprecated pyyaml pytest pytest-cov rubin-libradtran "getCalspec>=2.0.0"
# python -c "from getCalspec.rebuild import rebuild_tables; rebuild_tables()"
pip install lsst.utils
pip install git+https://github.com/LSSTDESC/getObsAtmo.git@main
mamba install astrometry
- name: Download test data
shell: bash -l {0}
run: |
wget -r -q -nc http://data.astrometry.net/5000/index-5002-24.fits
wget -r -q -nc http://data.astrometry.net/5000/index-5000-40.fits
mv data.astrometry.net/5000/index-*.fits $CONDA_PREFIX/data/
export ASTROMETRYNET_DIR=$CONDA_PREFIX
- name: List installed packages
shell: bash -l {0}
run: |
conda list
pip list -v
- name: Build and install
shell: bash -l {0}
run: |
pip install -v --no-deps -e .
- name: Run full chain test
shell: bash -l {0}
run: |
pytest tests/test_fullchain.py --log-cli-level=INFO --cov --cov-report lcov
- name: Run pytests
shell: bash -l {0}
run: |
pytest tests/test_extractor.py --log-cli-level=INFO --cov --cov-append --cov-report lcov
pytest tests/test_simulator.py --log-cli-level=INFO --cov --cov-append --cov-report lcov
pytest tests/test_utils.py --log-cli-level=INFO --cov --cov-append --cov-report lcov
pytest tests/test_fitter.py --log-cli-level=INFO --cov --cov-append --cov-report lcov
pytest tests/test_multispectra.py --log-cli-level=INFO --cov --cov-append --cov-report lcov
- name: Run doctests and coverage
shell: bash -l {0}
run: pytest spectractor tests/test_fullchain.py -v --cov --cov-append --cov-report lcov --doctest-modules spectractor --doctest-continue-on-failure
continue-on-error: true
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov