Skip to content

Add recipe for simulating synthetic lightcurves and fitting the PSD of an observed curve. #114

Add recipe for simulating synthetic lightcurves and fitting the PSD of an observed curve.

Add recipe for simulating synthetic lightcurves and fitting the PSD of an observed curve. #114

Workflow file for this run

name: ci
on:
pull_request:
types: [opened, synchronize, reopened, closed]
jobs:
process:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
permissions:
contents: write
env:
GAMMAPY_DATA: /home/runner/work/gammapy-recipes/gammapy-recipes/gammapy-datasets
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: create and activate env
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: gammapy-recipes
environment-file: environment.yml
auto-update-conda: true
- id: grabmodifs
uses: trilom/file-changes-action@v1.2.4
with:
output: ', '
- name: update env and download data
run: |
IFS=', ' read -r -a array <<< "${{ steps.grabmodifs.outputs.files }}"
for file in ${array[@]}; do
if [[ ${file} =~ "recipes/" ]]; then
folder="$(dirname "${file}")"
env="${folder}/env.yml"
fi
done
if [ -n "${folder}" ] && [ -d "${folder}" ]; then
conda env update --name gammapy-recipes --file ${env}
gammapy download datasets
fi
- name: test notebooks
run: |
IFS=', ' read -r -a array <<< "${{ steps.grabmodifs.outputs.files }}"
for file in ${array[@]}; do
if [[ ${file} =~ "recipes/" ]]; then
folder="$(dirname "${file}")"
fi
done
if [ -n "${folder}" ] && [ -d "${folder}" ]; then
python scripts/process.py --src ${folder}
fi
- name: build docs
run: |
rm -Rf docs/_build/html
cd docs && python -m sphinx . _build/html -b html && cd ..
rm -Rf gammapy-datasets
- name: commit changes
uses: stefanzweifel/git-auto-commit-action@v5
if: github.event.pull_request.merged == true
with:
commit_author: GitHub Actions <actions@github.com>
commit_message: commit built documentation
branch : master