Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 61 additions & 34 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,66 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04]
pyv: [ '3.10','3.11', '3.12', '3.13']
max-parallel: 5
python-version: ['3.12', '3.13', '3.14']
ctapipe-version: ['latest', 'nightly']
max-parallel: 6
runs-on: ${{ matrix.os }}
# Allow failures for nightly ctapipe or 3.14 builds
continue-on-error: ${{ matrix.ctapipe-version == 'nightly' || matrix.python-version == '3.14' }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.pyv }}
run: |
# Install Miniconda
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
echo "$HOME/miniconda/bin" >> $GITHUB_PATH
source $HOME/miniconda/bin/activate
# Install Mamba via conda (since we don't have mamba yet)
$HOME/miniconda/bin/conda config --add channels conda-forge
$HOME/miniconda/bin/conda install -y mamba=2.0.8
mamba install -y python=${{ matrix.pyv }}
- name: Add MKL_THREADING_LAYER variable
run: echo "MKL_THREADING_LAYER=GNU" >> $GITHUB_ENV
- name: Install dependencies with Mamba
run: |
source $HOME/miniconda/bin/activate
mamba env update --file environment.yml --name base
- name: Lint with flake8
run: |
source $HOME/miniconda/bin/activate
mamba install flake8
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Install with pip
run: |
pip install -e .
- name: Test with pytest
run: |
source $HOME/miniconda/bin/activate
mamba install pytest
pytest
- uses: actions/checkout@v4

- name: Set up Miniconda
run: |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
echo "$HOME/miniconda/bin" >> $GITHUB_PATH
source $HOME/miniconda/etc/profile.d/conda.sh
conda activate base
conda config --add channels conda-forge
conda install -y mamba

- name: Create environment for Python ${{ matrix.python-version }}
run: |
source $HOME/miniconda/etc/profile.d/conda.sh
conda activate base
mamba create -y -n dl1dh -c conda-forge python==${{ matrix.python-version }}
conda activate dl1dh

- name: Pre-script setup
run: |
source $HOME/miniconda/etc/profile.d/conda.sh
conda activate dl1dh
sudo apt-get update
sudo apt-get install -y git
pip install --upgrade pip
pip install pylint pylint-exit anybadge
pip install eventio
if [ "${{ matrix.ctapipe-version }}" = "nightly" ]; then
pip install git+https://github.com/cta-observatory/ctapipe.git
else
pip install ctapipe
fi
pip install pytest flake8

- name: Add MKL_THREADING_LAYER variable
run: echo "MKL_THREADING_LAYER=GNU" >> $GITHUB_ENV

- name: Lint with flake8
run: |
source $HOME/miniconda/etc/profile.d/conda.sh
conda activate dl1dh
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

- name: Install package with pip
run: |
source $HOME/miniconda/etc/profile.d/conda.sh
conda activate dl1dh
pip install -e .

- name: Run pytest
run: |
source $HOME/miniconda/etc/profile.d/conda.sh
conda activate dl1dh
pytest
9 changes: 8 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,18 @@ Previously named image-extractor (v0.1.0 - v0.6.0). Currently under development,
Installation
------------

First, create and activate a fresh conda environment:

.. code-block:: bash

mamba create -n dl1dh -c conda-forge python==3.12 ctapipe
mamba activate dl1dh

The lastest version fo this package can be installed as a conda or pip package:

.. code-block:: bash

conda install ctlearn-project::dl1_data_handler
mamba install ctlearn-project::dl1_data_handler

or

Expand Down
18 changes: 0 additions & 18 deletions environment.yml

This file was deleted.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ classifiers = [
"Topic :: Scientific/Engineering :: Astronomy",
"Topic :: Scientific/Engineering :: Physics",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]

requires-python = ">=3.10"
requires-python = ">=3.12"
dependencies = [
"ctapipe>=0.22, <0.26",
"ctapipe>=0.28",
"astropy",
"eventio",
"numpy",
"pandas",
"pip",
Expand Down
Loading