Skip to content

Commit 273dce0

Browse files
authored
Merge pull request #58 from cta-observatory/fix-version-test
Fix version test under numpy 1.x
2 parents a871d3b + 60bbb41 commit 273dce0

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ jobs:
1919
runs-on: ubuntu-latest
2020
strategy:
2121
matrix:
22-
python-version: ["3.11", "3.12", "3.13", "3.14"]
22+
include:
23+
- python-version: "3.11"
24+
extra_requirements: "numpy~=1.26"
25+
- python-version: "3.12"
26+
- python-version: "3.13"
27+
- python-version: "3.14"
2328

2429
steps:
2530
- uses: actions/checkout@v6
@@ -32,10 +37,12 @@ jobs:
3237
python-version: ${{ matrix.python-version }}
3338

3439
- name: Install dependencies
40+
env:
41+
EXTRA_REQUIREMENTS: ${{ matrix.extra_requirements }}
3542
run: |
3643
python --version
3744
pip install codecov pytest-cov flake8
38-
pip install -e .[all]
45+
pip install -e .[all] ${EXTRA_REQUIREMENTS}
3946
pip freeze
4047
4148
- name: Static codechecks

tests/test_io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def test_versions():
146146
from corsikaio.constants import RUNH_VERSION_POSITION
147147
from corsikaio.constants import EVTH_VERSION_POSITION
148148

149-
for path, version in zip(test_files, (6.5, 7.41)):
149+
for path, version in zip(test_files, (np.float32(6.5), np.float32(7.41))):
150150
buffer_size = read_buffer_size(path)
151151

152152
with open(path, 'rb') as f:

0 commit comments

Comments
 (0)