DEV: Add github actions test for analyzeH5 script #45
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
pip install pytest | |
pip install numpy | |
pip install scipy | |
pip install statsmodels | |
pip install h5py | |
pip install matplotlib | |
- name: Run fit-functions tests | |
run: | | |
pytest tests/testFitFunctions.py | |
- name: Run AnalyzeH5.py and diff against expected plots | |
run: | | |
mkdir test | |
python scripts/AnalyzeH5.py -f testData/lowFlux/SimpleClusters_c0_r334_n100.h5 -p test -r 666 -s 2,15 | |
diff test/AnalyzeH5_r666_c0_r1_c14_testLabel_E.png testData/expected/analyzeH5Expected/AnalyzeH5_r666_c0_r1_c14_testLabel_E.png | |
diff test/AnalyzeH5_r666_c0_testLabel_E.png testData/expected/analyzeH5Expected/AnalyzeH5_r666_c0_testLabel_E.png | |
diff test/AnalyzeH5_r666_c0_testLabel_gainDistribution.png testData/expected/analyzeH5Expected/AnalyzeH5_r666_c0_testLabel_gainDistribution.png | |
diff test/AnalyzeH5_r666_c0_r1_c14_testLabel_fitInfo.npy testData/expected/analyzeH5Expected/AnalyzeH5_r666_c0_r1_c14_testLabel_fitInfo.npy |