Skip to content

Commit

Permalink
Merge pull request #208 from zonca/fix_pixell_imports
Browse files Browse the repository at this point in the history
fix pixell imports
  • Loading branch information
zonca authored Jan 23, 2025
2 parents a51c5ae + 94774d1 commit f9d1f1a
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/import_base_requirements.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Import with base requirements

on:
push:
branches:
- main
pull_request:

jobs:
test_ci_tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: Python 3.12 Import Check
os: ubuntu-22.04
python: 3.12

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: mamba-org/setup-micromamba@v1
with:
environment-name: test-env
create-args: >-
python=${{ matrix.python }}
netcdf4
init-shell: >-
bash
cache-environment: true
post-cleanup: 'all'
- name: Install base requirements
run: pip install .
shell: bash -el {0}
- name: Check import
run: |
python -c "import pysm3"
shell: bash -el {0}
6 changes: 5 additions & 1 deletion src/pysm3/models/interpolating.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
from .. import utils
from ..utils import trapz_step_inplace, map2alm
from .template import Model
import pixell

try:
import pixell
except ImportError:
pixell = None

log = logging.getLogger("pysm3")

Expand Down
6 changes: 5 additions & 1 deletion src/pysm3/utils/spherical_harmonics.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
import logging

from astropy import units as u
import pixell.enmap, pixell.curvedsky

try:
import pixell.enmap, pixell.curvedsky
except ImportError:
pixell = None

from .. import mpi, utils

Expand Down

0 comments on commit f9d1f1a

Please # to comment.