Skip to content

OOI processing

OOI processing #1259

name: OOI processing
on:
# To run manually
workflow_dispatch:
inputs:
node:
description: 'Alphanumeric node id (e.g. PC01A)'
required: false
default: 'PC01A'
start_time:
description: 'start_time formatted as Y-m-dTH-M-S'
required: false
end_time:
description: 'end_time formatted as Y-m-dTH-M-S'
required: false
segment_length:
description: 'Segment length in minutes (float)'
required: false
default: 5.0
# Run workflow at 12:00 UTC every day
schedule:
- cron: '0 12 * * *'
env:
NODE: ${{ github.event.inputs.node || 'PC01A' }}
SEGMENT_LENGTH: ${{ github.event.inputs.segment_length || 5 }}
OUTPUT_DIR: spectrograms
jobs:
process:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U setuptools wheel
python -m pip install ooipy 'numpy<1.22'
- name: Custom timeframe
if: ${{ github.event.inputs.start_time }}
run: |
python ooi_processing.py -o ${{ env.OUTPUT_DIR }} --node ${{ env.NODE }} \
-l ${{ env.SEGMENT_LENGTH }} -s ${{ github.event.inputs.start_time }} \
-e ${{ github.event.inputs.end_time }}
- name: Default timeframe
if: ${{ !github.event.inputs.start_time }}
run: |
python ooi_processing.py -o ${{ env.OUTPUT_DIR }} --node ${{ env.NODE }} \
-l ${{ env.SEGMENT_LENGTH }}
- name: Upload spectrograms
uses: actions/upload-artifact@v2
with:
name: Spectrograms
path: |
${{ env.OUTPUT_DIR }}/*.png