Skip to content

Commit bd70f32

Browse files
authored
Fixtests (#19)
* bump python max to 3.13 * try upgrade install * explicitly upgrade packaging * exclude 3.8 * change the icetray image for function-tests * old style import * put the i3tray import in try except * fix exclude
1 parent 7d7068c commit bd70f32

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

.github/workflows/wipac-cicd.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ jobs:
6565
fail-fast: false
6666
matrix:
6767
py3: ${{ fromJSON(needs.py-versions.outputs.matrix) }}
68+
exclude:
69+
- py3: 3.8
70+
- py3: 3.10
6871
container:
6972
image: icecube/icetray:icetray-prod-current-ubuntu22.04
7073
steps:
@@ -74,7 +77,7 @@ jobs:
7477
python-version: ${{ matrix.py3 }}
7578
- name: pip setup
7679
run: |
77-
pip install --upgrade pip wheel setuptools pytest
80+
pip install --upgrade pip wheel setuptools pytest packaging
7881
pip install .[tests]
7982
- name: test
8083
run: |
@@ -90,8 +93,10 @@ jobs:
9093
matrix:
9194
py3: ${{ fromJSON(needs.py-versions.outputs.matrix) }}
9295
file: [Level2pass2_IC86.2011_data_Run00118435_Subrun00000000_00000144_event58198553.i3, Level2pass2_IC86.2013_data_Run00124340_Subrun00000000_00000052_event19400842.i3]
96+
exclude:
97+
- py3: 3.8
9398
container:
94-
image: icecube/icetray:icetray-prod-current-ubuntu22.04-X64
99+
image: icecube/icetray:icetray-prod-current-ubuntu22.04
95100
steps:
96101
- uses: actions/checkout@v3
97102
# - uses: actions/setup-python@v3
@@ -108,7 +113,7 @@ jobs:
108113
- name: test routine
109114
run: |
110115
/usr/local/icetray/env-shell.sh << EOF
111-
pip install --upgrade pip wheel setuptools pytest
116+
pip install --upgrade pip wheel setuptools pytest packaging
112117
pip install .[tests]
113118
python3 skywriter/i3_to_json.py --extra "OnlineL2_SplineMPE" --extra "OnlineL2_BestFit" --basegcd /opt/i3-data/baseline_gcds/baseline_gcd_136897.i3 test-file.zst
114119
EOF

skywriter/i3_to_json.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616

1717

1818
# try old-style import for CI
19-
from icecube.icetray import I3Tray # type: ignore[import]
20-
21-
# from I3Tray import I3Tray # type: ignore[import]
19+
try:
20+
from I3Tray import I3Tray # type: ignore[import]
21+
except ImportError:
22+
from icecube.icetray import I3Tray # type: ignore[import]
2223

2324

2425
from icecube import ( # type: ignore[import] # noqa: F401

0 commit comments

Comments
 (0)