Skip to content

Make MPI an optional dependency #401

Make MPI an optional dependency

Make MPI an optional dependency #401

Workflow file for this run

name: Test
on:
pull_request:
push: { branches: [master] }
workflow_dispatch:
env:
python_version: '3.8'
RDMAV_FORK_SAFE: 1
jobs:
unit_tests:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repo
uses: actions/[email protected]
- name: Setup NoisePy
uses: ./.github/actions/setup
with:
python-version: ${{env.python_version}}
- name: pytest
run: PYTHONPATH=src pytest tests/.
s0_download:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repo
uses: actions/[email protected]
- name: Setup NoisePy
uses: ./.github/actions/setup
with:
python-version: ${{env.python_version}}
- name: Test Download (S0)
working-directory: ./src
run: noisepy download --start_date 2019-02-01T00:00:00 --end_date 2019-02-01T01:00:00 --stations ARV,BAK --inc_hours 1 --raw_data_path $RUNNER_TEMP/RAW_DATA
- name: Cache data
uses: actions/cache/save@v3
with:
key: download_data-${{ github.sha }}
path: ${{runner.temp}}
s1_s2:
strategy:
fail-fast: true
matrix:
python_version: ['3.8', '3.10']
method: [linear, robust, nroot, selective, auto_covariance, pws]
freq_norm: [rma, no, phase_only]
runs-on: ubuntu-22.04
needs: s0_download
steps:
- name: Checkout Repo
uses: actions/[email protected]
- name: Setup NoisePy
uses: ./.github/actions/setup
with:
python-version: ${{matrix.python_version}}
- name: Cache data
id: cache
uses: actions/cache/restore@v3
with:
key: download_data-${{ github.sha }}
path: ${{runner.temp}}
- name: Check cache hit
if: steps.cache.outputs.cache-hit != 'true'
run: exit 1
- name: Test Cross-Correlation (S1)
working-directory: ./src
run: |
noisepy cross_correlate --raw_data_path $RUNNER_TEMP/RAW_DATA --ccf_path $RUNNER_TEMP/CCF --freq_norm ${{matrix.freq_norm}}
- name: Test Stacking (S2)
working-directory: ./src
run: |
noisepy stack --raw_data_path $RUNNER_TEMP/RAW_DATA --ccf_path $RUNNER_TEMP/CCF --stack_path $RUNNER_TEMP/STACK --stack_method ${{matrix.method}}
s1_s2_mpi:
strategy:
fail-fast: true
matrix:
python_version: ['3.10']
method: [linear]
freq_norm: [rma]
runs-on: ubuntu-22.04
needs: s0_download
steps:
- name: Checkout Repo
uses: actions/[email protected]
- name: Setup NoisePy
uses: ./.github/actions/setup
with:
python-version: ${{matrix.python_version}}
mpi: 'true'
- name: Cache data
id: cache
uses: actions/cache/restore@v3
with:
key: download_data-${{ github.sha }}
path: ${{runner.temp}}
- name: Check cache hit
if: steps.cache.outputs.cache-hit != 'true'
run: exit 1
- name: Test Cross-Correlation (S1)
working-directory: ./src
run: |
noisepy cross_correlate --raw_data_path $RUNNER_TEMP/RAW_DATA --ccf_path $RUNNER_TEMP/CCF --freq_norm ${{matrix.freq_norm}}
- name: Test Stacking (S2)
working-directory: ./src
run: |
mpiexec -n 3 noisepy stack --mpi --raw_data_path $RUNNER_TEMP/RAW_DATA --ccf_path $RUNNER_TEMP/CCF --stack_path $RUNNER_TEMP/STACK --stack_method ${{matrix.method}}
s3_dates:
strategy:
fail-fast: true
matrix:
python_version: ['3.8', '3.10']
runs-on: ubuntu-22.04
steps:
- name: Checkout Repo
uses: actions/[email protected]
- name: Setup NoisePy
uses: ./.github/actions/setup
with:
python-version: ${{matrix.python_version}}
- name: Test S3 data for a date range
run: |
noisepy cross_correlate --raw_data_path s3://scedc-pds/continuous_waveforms/ \
--ccf_path $RUNNER_TEMP/CCF_S3 --freq_norm rma \
--xml_path s3://scedc-pds/FDSNstationXML/CI/ \
--stations "SBC,RIO" --start_date 2022-02-02 --end_date 2022-02-04
s3_singlepath:
strategy:
fail-fast: true
matrix:
python_version: ['3.8', '3.10']
runs-on: ubuntu-22.04
steps:
- name: Checkout Repo
uses: actions/[email protected]
- name: Setup NoisePy
uses: ./.github/actions/setup
with:
python-version: ${{matrix.python_version}}
- name: Test S3 data with a single path
run: |
noisepy cross_correlate --raw_data_path s3://scedc-pds/continuous_waveforms/2022/2022_002/ \
--ccf_path $RUNNER_TEMP/CCF_S3 --freq_norm rma \
--xml_path s3://scedc-pds/FDSNstationXML/CI/ \
--stations "SBC,RIO"