Skip to content

Commit

Permalink
Merge pull request #170 from cta-observatory/ctapipe0.18
Browse files Browse the repository at this point in the history
Make source compatible with ctapipe 0.18, test with 0.17 and 0.18
  • Loading branch information
maxnoe committed Feb 14, 2023
2 parents b092494 + d071803 commit 0f8b8cd
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
ctapipe-version: ["v0.17.0", ]
ctapipe-version: ["0.17.0", "0.18.0"]

defaults:
run:
Expand Down Expand Up @@ -48,8 +48,8 @@ jobs:
CTAPIPE_VERSION: ${{ matrix.ctapipe-version }}
run: |
pip install -e .
# we install ctapipe using pip to be able to select any commit, e.g. the current master
pip install pytest-cov "git+https://github.com/cta-observatory/ctapipe@$CTAPIPE_VERSION"
pip install pytest-cov "ctapipe==$CTAPIPE_VERSION"
ctapipe-info --version | grep "$CTAPIPE_VERSION"
git describe --tags
- name: Test Plugin
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
dependencies:
- astropy=5.2
- python=3.10 # nail the python version, so conda does not try upgrading / dowgrading
- ctapipe=0.17
- ctapipe=0.18
- eventio
- corsikaio
- protozfits=2.0
Expand Down
4 changes: 2 additions & 2 deletions eventsource_subclasses.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from ctapipe.io import EventSource
from ctapipe.core import non_abstract_children
import logging

for cls in non_abstract_children(EventSource):
for cls in EventSource.non_abstract_subclasses().values():
print(cls.__name__)
5 changes: 4 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ python_requires = >=3.8
zip_safe = False
install_requires=
astropy~=5.2
ctapipe~=0.17.0
ctapipe>=0.17.0,<=0.19.0a0
protozfits~=2.0
numpy>=1.20

Expand All @@ -52,6 +52,9 @@ all =
%(tests)s
%(dev)s

[options.entry_points]
ctapipe_io =
LSTEventSource = ctapipe_io_lst:LSTEventSource

[tool:pytest]
minversion = 3.0
Expand Down
2 changes: 1 addition & 1 deletion src/ctapipe_io_lst/tests/test_calib.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
'ctapipe_io_lst', 'tests/resources'
))

test_data = Path(os.getenv('LSTCHAIN_TEST_DATA', 'test_data'))
test_data = Path(os.getenv('LSTCHAIN_TEST_DATA', 'test_data')).absolute()
test_r0_path = test_data / 'real/R0/20200218/LST-1.1.Run02008.0000_first50.fits.fz'
test_r0_calib_path = test_data / 'real/R0/20200218/LST-1.1.Run02006.0004.fits.fz'
test_missing_module_path = test_data / 'real/R0/20210215/LST-1.1.Run03669.0000_first50.fits.fz'
Expand Down
2 changes: 1 addition & 1 deletion src/ctapipe_io_lst/tests/test_event_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from ctapipe_io_lst.constants import N_MODULES
from ctapipe_io_lst.containers import LSTArrayEventContainer

test_data = Path(os.getenv('LSTCHAIN_TEST_DATA', 'test_data'))
test_data = Path(os.getenv('LSTCHAIN_TEST_DATA', 'test_data')).absolute()
test_run_summary = test_data / 'real/monitoring/RunSummary/RunSummary_20200218.ecsv'


Expand Down
2 changes: 1 addition & 1 deletion src/ctapipe_io_lst/tests/test_pointing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import astropy.units as u
from ctapipe.core import Provenance

test_data = Path(os.getenv('LSTCHAIN_TEST_DATA', 'test_data'))
test_data = Path(os.getenv('LSTCHAIN_TEST_DATA', 'test_data')).absolute()
test_drive_report = test_data / 'real/monitoring/DrivePositioning/DrivePosition_log_20200218.txt'
test_bending_report = test_data / 'real/monitoring/DrivePositioning/BendingModelCorrection_log_20220220.txt'
test_drive_report_with_bending = test_data / 'real/monitoring/DrivePositioning/DrivePosition_log_20220220.txt'
Expand Down
2 changes: 1 addition & 1 deletion src/ctapipe_io_lst/tests/test_stage1.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import astropy.units as u


test_data = Path(os.getenv('LSTCHAIN_TEST_DATA', 'test_data'))
test_data = Path(os.getenv('LSTCHAIN_TEST_DATA', 'test_data')).absolute()
test_r0_path = test_data / 'real/R0/20200218/LST-1.1.Run02008.0000_first50.fits.fz'
test_drive_report = test_data / 'real/monitoring/DrivePositioning/DrivePosition_log_20200218.txt'
test_run_summary = test_data / 'real/monitoring/RunSummary/RunSummary_20200218.ecsv'
Expand Down

0 comments on commit 0f8b8cd

Please sign in to comment.