Skip to content

Typo

Typo #1306

Workflow file for this run

name: firecrown-ci
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
schedule:
- cron: '0 0 * * *'
jobs:
firecrown-miniforge:
continue-on-error: true
name: Firecrown (${{ matrix.os }}, python-${{ matrix.python-version }}, Miniforge)
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: ["ubuntu", "macos"]
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Setup miniforge
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
activate-environment: firecrown
python-version: ${{ matrix.python-version }}
miniforge-variant: Mambaforge
show-channel-urls: true
use-mamba: true
- name: Cache date
id: get-date
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
shell: bash
- name: Cache Conda env
uses: actions/cache@v3
with:
path: ${{ env.CONDA }}/envs
key: miniforge-${{ runner.os }}--${{ runner.arch }}--python-${{ matrix.python-version }}--${{ steps.get-date.outputs.today }}-${{ hashFiles('environment.yml') }}-${{ env.CACHE_NUMBER }}
env:
CACHE_NUMBER: 0
id: cache
- name: Update environment
run: |
conda env update -n firecrown -f environment.yml
if: steps.cache.outputs.cache-hit != 'true'
- name: Setting up Firecrown
shell: bash -l {0}
run: |
export FIRECROWN_DIR=${PWD}
conda env config vars set FIRECROWN_DIR=${FIRECROWN_DIR}
conda activate firecrown
pip install --no-deps -e .
- name: Setting up CosmoSIS
shell: bash -l {0}
run: |
source ${CONDA_PREFIX}/bin/cosmosis-configure
pushd ${CONDA_PREFIX}
cosmosis-build-standard-library
export CSL_DIR=${PWD}/cosmosis-standard-library
conda env config vars set CSL_DIR=${CSL_DIR}
conda activate firecrown
if: steps.cache.outputs.cache-hit != 'true'
- name: Setting up Cobaya
shell: bash -l {0}
run: python -m pip install cobaya
if: steps.cache.outputs.cache-hit != 'true'
- name: Running black check
shell: bash -l {0}
run: |
black --check firecrown
black --check tests
black --check examples
- name: Running flake8
shell: bash -l {0}
run: |
flake8 firecrown
flake8 examples
flake8 tests
- name: Running mypy
shell: bash -l {0}
run: |
mypy -p firecrown --ignore-missing-imports
mypy -p examples --ignore-missing-imports
mypy -p tests --ignore-missing-imports
- name: Running pylint
shell: bash -l {0}
run: |
pylint --rcfile pylintrc_for_tests --recursive=y tests
pylint --recursive=y firecrown/connector
pylint --recursive=y firecrown/*.py
pylint --recursive=y firecrown/likelihood/*.py
pylint --recursive=y firecrown/likelihood/gauss_family/*.py
- name: Running pytest
shell: bash -l {0}
run: python -m pytest -vv
- name: Running example - cosmosis - cosmic-shear
shell: bash -l {0}
run: |
cd examples/cosmicshear
python generate_cosmicshear_data.py
cosmosis cosmicshear.ini
- name: Running example - cosmosis - des-y1-3x2pt
shell: bash -l {0}
run: |
cd examples/des_y1_3x2pt
cosmosis des_y1_3x2pt.ini
- name: Running example - cosmosis - des-y1-3x2pt-PT
shell: bash -l {0}
run: |
cd examples/des_y1_3x2pt
cosmosis des_y1_3x2pt_PT.ini
- name: Running example - cobaya - des-y1-3x2pt
shell: bash -l {0}
run: |
cd examples/des_y1_3x2pt
cobaya-run cobaya_evaluate.yaml
- name: Running example - cobaya - des-y1-3x2pt-PT
shell: bash -l {0}
run: |
cd examples/des_y1_3x2pt
cobaya-run cobaya_evaluate_PT.yaml
- name: Running example - NumCosmo - des-y1-3x2pt
shell: bash -l {0}
run: |
cd examples/des_y1_3x2pt
python numcosmo_run.py
- name: Running example - NumCosmo - des-y1-3x2pt-PT
shell: bash -l {0}
run: |
cd examples/des_y1_3x2pt
python numcosmo_run_PT.py
- name: Running example - cosmosis - srd_sn
shell: bash -l {0}
run: |
cd examples/srd_sn
cosmosis sn_srd.ini
- name: Running example - NumCosmo - srd_sn
shell: bash -l {0}
run: |
cd examples/srd_sn
python numcosmo_run.py