Skip to content

Commit

Permalink
Merge pull request #161 from cta-observatory/ctapipe_0.17
Browse files Browse the repository at this point in the history
Update source for ctapipe to 0.17
  • Loading branch information
maxnoe authored Dec 18, 2022
2 parents 00bf419 + dcfd41d commit bbae295
Show file tree
Hide file tree
Showing 36 changed files with 335 additions and 134 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: CI

on: [push, pull_request]
on:
push:
branches:
- master
tags:
- '**'
pull_request:

env:
NUMBA_NUM_THREADS: 1
Expand All @@ -12,11 +18,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8"]
ctapipe-version: ["v0.12.0", ]
python-version: ["3.8", "3.9", "3.10"]
ctapipe-version: ["v0.17.0", ]

defaults:
run:
shell: bash -exl {0}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

Expand All @@ -35,15 +45,19 @@ jobs:
environment-file: environment.yml

- name: Install
shell: bash -l {0}
env:
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 -e .
git describe --tags
- name: Test Plugin
run: |
# check the LSTEventSource is available for LST
python eventsource_subclasses.py | grep LSTEventSource
- name: Download test data
env:
TEST_DATA_USER: ${{ secrets.test_data_user }}
Expand All @@ -52,10 +66,7 @@ jobs:
./download_test_data.sh
- name: Tests
shell: bash -l {0}
run: |
# github actions starts a new shell for each "step", so we need to
# activate our env again
pytest --cov=ctapipe_io_lst --cov-report=xml
- uses: codecov/codecov-action@v1
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ test_data
__pycache__

# ignore version cache file (generated automatically when setup.py is run)
ctapipe_io_lst/_version.py
ctapipe_io_lst/_version_cache.py
src/ctapipe_io_lst/_version.py
src/ctapipe_io_lst/_version_cache.py

# Ignore .c files by default to avoid including generated code. If you want to
# add a non-generated .c extension, use `git add -f filename.c`.
Expand Down
5 changes: 1 addition & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
include README.rst
include setup.cfg

prune ctapipe_io_lst/_dev_version
prune src/ctapipe_io_lst/_dev_version
prune .github
exclude .gitignore
exclude .codacy.yml
Expand Down
22 changes: 0 additions & 22 deletions ctapipe_io_lst/constants.py

This file was deleted.

Binary file removed ctapipe_io_lst/resources/LSTCam-003.camgeom.fits.gz
Binary file not shown.
Binary file removed ctapipe_io_lst/resources/LSTCam-004.camgeom.fits.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 4 additions & 4 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ channels:
- conda-forge
- default
dependencies:
- astropy>=4.2
- python=3.8 # nail the python version, so conda does not try upgrading / dowgrading
- ctapipe=0.12
- astropy=5.2
- python=3.10 # nail the python version, so conda does not try upgrading / dowgrading
- ctapipe=0.17
- eventio
- corsikaio
- protozfits=2.0
- zeromq
- ipython
- numba
- numpy>=1.20,<1.23
- numpy=1.22
- numpydoc
- pytest
- pyyaml
Expand Down
5 changes: 5 additions & 0 deletions eventsource_subclasses.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from ctapipe.io import EventSource
from ctapipe.core import non_abstract_children

for cls in non_abstract_children(EventSource):
print(cls.__name__)
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[build-system]
requires = ["setuptools >= 40.6.0", "wheel", "setuptools_scm[toml]>=3.4"]
requires = ["setuptools >= 64.0.3", "setuptools_scm[toml]>=3.4"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "src/ctapipe_io_lst/_version.py"
55 changes: 50 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,17 +1,62 @@
[metadata]
name = ctapipe_io_lst
description = ctapipe plugin for reading LST prototype files
long-description = file: README.md
long-description-content-type = text/markdown; charset=UTF-8; variant=GFM
author = LST Consortium
author_email = [email protected]
long_description = file: README.md
long_description_content_type = text/markdown; charset=UTF-8; variant=GFM
author = CTA LST Project
author_email = [email protected]
license = BSD 3-clause

project_urls =
Bug Tracker = https://github.com/cta-observatory/ctapipe_io_lst/issues
Source Code = https://github.com/cta-observatory/ctapipe_io_lst

classifiers =
Development Status :: 4 - Beta
License :: OSI Approved :: MIT License
Intended Audience :: Science/Research
Topic :: Scientific/Engineering :: Astronomy
Topic :: Scientific/Engineering :: Physics
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10


[options]
packages = find:
package_dir =
= src
python_requires = >=3.8
zip_safe = False
install_requires=
astropy~=5.2
ctapipe~=0.17.0
protozfits~=2.0
numpy>=1.20

[options.package_data]
* = resources/*

[options.packages.find]
where = src
exclude =
ctapipe_io_lst._dev_version

[options.extras_require]
tests =
pytest
dev =
setuptools_scm[toml]
all =
%(tests)s
%(dev)s


[tool:pytest]
minversion = 3.0
addopts = -v


[aliases]
test = pytest

Expand Down
20 changes: 2 additions & 18 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,2 @@
from setuptools import setup, find_packages
import os

setup(
packages=find_packages(exclude=["ctapipe_io_lst._dev_version"]),
use_scm_version={"write_to": os.path.join("ctapipe_io_lst", "_version.py")},
install_requires=[
'astropy~=4.2',
'ctapipe~=0.12',
'protozfits~=2.0',
'setuptools_scm',
'numpy>=1.20,<1.23'
],
package_data={
'ctapipe_io_lst': ['resources/*'],
},
tests_require=['pytest'],
)
from setuptools import setup
setup()
Loading

0 comments on commit bbae295

Please sign in to comment.