Skip to content

Update examples

Update examples #240

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- '**'
pull_request:
env:
NUMBA_NUM_THREADS: 1
MPLBACKEND: Agg
PYTEST_ADDOPTS: --color=yes
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
python --version
pip install codecov pytest-cov
pip install -e '.[test]'
pip freeze
- name: Tests
run: |
pytest --cov=eventio --cov-report=xml
- uses: codecov/codecov-action@v4
examples:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run examples
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
python --version
pip install -e '.[examples]'
cd examples
RESOURCES="../tests/resources/"
MPLBACKEND=agg
python iter_mc_events.py $RESOURCES/40k_pixels.simtel.zst
python plot_events.py $RESOURCES/gamma_test.simtel.gz
python plot_light_on_ground.py -i $RESOURCES/3_gammas_reuse_5.dat
python plot_light_on_ground_by_particle.py $RESOURCES/proton_emitter.eventio.zst
python plot_light_on_ground_rgb.py $RESOURCES/proton_emitter.eventio.zst
python plot_mc_pe.py -i $RESOURCES/gamma_20deg_0deg_run103___cta-prod4-sst-astri_desert-2150m-Paranal-sst-astri.simtel.gz
python plot_production_3d.py -i $RESOURCES/3_gammas_reuse_5.dat
python profile_simtel.py $RESOURCES/gamma_20deg_0deg_run102___cta-prod4-sst-1m_desert-2150m-Paranal-sst-1m.simtel.gz
# python read_all_objects.py
python read_simtel_corsika_events.py $RESOURCES/gamma_20deg_0deg_run102___cta-prod4-sst-1m_desert-2150m-Paranal-sst-1m.simtel.gz
python trigger_times.py --max-shower-events 1 $RESOURCES/gamma_20deg_0deg_run102___cta-prod4-sst-1m_desert-2150m-Paranal-sst-1m.simtel.gz
python try_simtelfile.py $RESOURCES/gamma_20deg_0deg_run102___cta-prod4-sst-1m_desert-2150m-Paranal-sst-1m.simtel.gz