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
3 changes: 2 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[flake8]
exclude =
build/,
legacy/
legacy/,
.venv/
3 changes: 0 additions & 3 deletions .github/environment.yml

This file was deleted.

55 changes: 13 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,59 +7,30 @@ on:
- releases/*
pull_request: null

env:
CACHE_NUMBER: 0 # increase to reset cache manually
CONDA_ENV: .github/environment.yml

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout SOOPERCOOL repository
uses: actions/checkout@v3
uses: actions/checkout@v7

- name: Install python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgsl-dev libfftw3-dev libcfitsio-dev

- uses: awvwgk/setup-fortran@main
id: setup-fortran
- name: Install uv & python
uses: astral-sh/setup-uv@v10.1.0
with:
compiler: gcc
version: 11

- run: ${{ env.FC }} --version
env:
FC: ${{ steps.setup-fortran.outputs.fc }}
python-version: "3.13"

- name: Install dependencies
- name: Install soopercool
run: |
sudo -H apt-get install libgsl-dev libfftw3-dev libcfitsio-dev

- name: Install soopercool & dependencies
run: |
python -m pip install -U pip
pip install -U wheel
pip install -U setuptools
pip install -U numpy
pip install -U scipy
pip install -U healpy
pip install -U sacc
pip install -U camb
pip install -U pymaster
pip install -U flake8
pip install -U pytest
pip install -U pytest-cov
pip install -U coveralls
pip install -U pixell
pip install .
uv venv
uv pip install --group dev .

- name: Lint
uses: py-actions/flake8@v2
with:
args: "--config .flake8"
run: uv run --no-sync flake8 --config .flake8

- name: Tests
run: pytest -vv --cov=soopercool

run: uv run --no-sync pytest -vv --cov=soopercool
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ dependencies = [
"scikit-learn",
]

[dependency-groups]
dev = [
"flake8",
"pytest",
"pytest-cov",
]

[project.scripts]
soopercool-get-analysis-mask = "pipeline.get_analysis_mask:cli"
soopercool-prepare-cov-inputs = "pipeline.prepare_cov_inputs:cli"
Expand Down
6 changes: 0 additions & 6 deletions soopercool/mpi_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,14 @@ def init(switch=False, logger=None):


def is_initialized():
global _initialized
return _initialized


def is_mpion():
global _switch
return _switch


def taskrange(imax, imin=0, shift=0, logger=None):
"""
"""
global rank, size

if (not isinstance(imin, int) or not isinstance(imax, int)
or not isinstance(shift, int)):
raise TypeError("imin, imax and shift must be integers")
Expand Down