Add helper function for reading epoch and effarea #143
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: v2dl3-Eventdisplay-CI | |
on: | |
pull_request: | |
paths-ignore: | |
- 'utils/**vegas**' | |
- 'utils/compare_fits_dirs.sh' | |
- '.github/v2dl3-vegas.yml' | |
- '.git*' | |
- 'CITATION.cff' | |
- 'environment-vegas.yml' | |
- 'LICENSE' | |
- 'README.md' | |
- 'setup.py' | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install mamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: environment-eventdisplay.yml | |
create-args: python=${{ matrix.python-version }} | |
init-shell: bash | |
- name: pytest | |
shell: bash -leo pipefail {0} | |
env: | |
PYTHONPATH: . | |
run: | | |
pytest . | |
- name: download test data | |
run: | | |
./utils/download_Eventdisplay_test_data.sh | |
- name: Eventdisplay-pointlike | |
shell: bash -leo pipefail {0} | |
env: | |
PYTHONPATH: . | |
run: | | |
# point-like tests | |
python pyV2DL3/script/v2dl3_for_Eventdisplay.py \ | |
-f ./64080.anasum.root \ | |
./effectiveArea.root \ | |
--logfile test-pointlike.fits.log \ | |
test-pointlike-CI.fits.gz | |
python pyV2DL3/script/compareFitsFiles.py \ | |
-f ED-pointlike-CI.fits.gz test-pointlike-CI.fits.gz \ | |
-d test-pointlike.log | |
cat test-pointlike.log | |
grep -q "No differences found" test-pointlike.log | |
- name: Eventdisplay-full-enclosure | |
shell: bash -leo pipefail {0} | |
env: | |
PYTHONPATH: . | |
run: | | |
# full-enclosure tests | |
python pyV2DL3/script/v2dl3_for_Eventdisplay.py --full-enclosure \ | |
-f ./64080.anasum.root \ | |
./effectiveArea.root \ | |
--logfile test-full-enclosure.fits.log \ | |
test-full-enclosure-CI.fits.gz | |
python pyV2DL3/script/compareFitsFiles.py \ | |
-f ED-fullenclosure-CI.fits.gz test-full-enclosure-CI.fits.gz \ | |
-d test-full-enclosure.log | |
cat test-full-enclosure.log | |
grep -q "No differences found" test-full-enclosure.log | |
- name: Eventdisplay-pointlike-DB | |
shell: bash -leo pipefail {0} | |
env: | |
PYTHONPATH: . | |
run: | | |
# point-like tests (with DB) | |
python pyV2DL3/script/v2dl3_for_Eventdisplay.py \ | |
-f ./64080.anasum.root \ | |
./effectiveArea.root \ | |
--db_fits_file ./64080.db.fits.gz \ | |
--logfile test-pointlike-db.fits.log \ | |
test-pointlike-db-CI.fits.gz | |
python pyV2DL3/script/compareFitsFiles.py \ | |
-f ED-pointlike-db-CI.fits.gz test-pointlike-db-CI.fits.gz \ | |
-d test-pointlike-db.log | |
cat test-pointlike-db.log | |
grep -q "No differences found" test-pointlike-db.log | |
- name: Eventdisplay-pointlike-select | |
shell: bash -leo pipefail {0} | |
env: | |
PYTHONPATH: . | |
run: | | |
# point-like tests with event selection | |
python pyV2DL3/script/v2dl3_for_Eventdisplay.py \ | |
-f ./64080.allevents.anasum.root \ | |
./effectiveArea.root \ | |
--evt_filter eventfilter.yml \ | |
--logfile test-pointlike-all.fits.log \ | |
test-pointlike-all-CI.fits.gz | |
python pyV2DL3/script/compareFitsFiles.py \ | |
-f ED-pointlike-all-CI.fits.gz test-pointlike-all-CI.fits.gz \ | |
-d test-pointlike-all.log | |
cat test-pointlike-all.log | |
grep -q "No differences found" test-pointlike-all.log | |
- name: Eventdisplay-full-enclosure-select | |
shell: bash -leo pipefail {0} | |
env: | |
PYTHONPATH: . | |
run: | | |
# full-enclosure tests with event selection | |
python pyV2DL3/script/v2dl3_for_Eventdisplay.py --full-enclosure \ | |
-f ./64080.allevents.anasum.root \ | |
./effectiveArea.root \ | |
--evt_filter eventfilter.yml \ | |
--logfile test-full-enclosure-all.fits.log \ | |
test-full-enclosure-all-CI.fits.gz | |
python pyV2DL3/script/compareFitsFiles.py \ | |
-f ED-full-enclosure-all-CI.fits.gz test-full-enclosure-all-CI.fits.gz \ | |
-d test-full-enclosure-all.log | |
cat test-full-enclosure-all.log | |
grep -q "No differences found" test-full-enclosure-all.log |