Skip to content

Commit

Permalink
Merge pull request #340 from LSSTDESC/pspec_unit_tests
Browse files Browse the repository at this point in the history
Add simple unit tests for all power spectrum methods. Also adds coveralls and basic TravisCI package caching. The Python tests now have a slow and fast mode -- the former for Travis, the latter for users.
  • Loading branch information
philbull committed Apr 7, 2018
2 parents 4cd7906 + 6652298 commit 488d0ab
Show file tree
Hide file tree
Showing 12 changed files with 707 additions and 2,919 deletions.
38 changes: 27 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,45 @@ python:
- "3.5"
- "3.6"

# Cache pip- and apt-installed dependencies
cache:
apt: true
pip: true

sudo: required

addons:
apt:
packages:
- fftw3
- fftw3-dev
- pkg-config
# - texlive-latex-recommended
# - texlive-latex-extra
# - texlive-fonts-recommended
# - texlive-fonts-extra
# - dvipng

# Travis uses Ubuntu 12.04 and 14.04. None of them have GSL2x in apt-get
# We have to install it from source (this will make the tests slower)
# CLASS also needs to be downloaded and compiled, which there is no easy fix for.
before_install:
- sudo apt-get -qq update
- sudo apt-get install fftw3 fftw3-dev pkg-config
# - sudo apt-get -qq update
# - sudo apt-get install fftw3 fftw3-dev pkg-config
# - sudo apt-get install latexmk
- pip install numpy
- pip install coveralls
- ./install-gsl.sh
- python class_install.py
#addons:
# apt:
# packages:
# - texlive-latex-recommended
# - texlive-latex-extra
# - texlive-fonts-recommended
# - texlive-fonts-extra
# - dvipng

install: python setup.py install
script:
- python tests/run_tests.py --debug --detailed-errors --verbose --process-restartworker
- nosetests tests/run_tests.py --all --debug --detailed-errors --verbose --process-restartworker --with-coverage --cover-package=pyccl
- make check-cpp

after_success:
- coveralls

# Check why the note creation process crashes
# - make -C doc/0000-ccl_note
#after_success:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ STYLE CONVENTION USED
**`function`**
**`type`** or **`structure`**
-->
# CCL [![Build Status](https://travis-ci.org/LSSTDESC/CCL.svg?branch=master)](https://travis-ci.org/LSSTDESC/CCL)
# CCL [![Build Status](https://travis-ci.org/LSSTDESC/CCL.svg?branch=master)](https://travis-ci.org/LSSTDESC/CCL) [![Coverage Status](https://coveralls.io/repos/github/LSSTDESC/CCL/badge.svg?branch=master)](https://coveralls.io/github/LSSTDESC/CCL?branch=master)
LSST DESC Core Cosmology Library (`CCL`) provides routines to compute basic cosmological observables with validated numerical accuracy.

The library is written in C99 and all functionality is directly callable from C and C++ code. We also provide python bindings for higher-level functions.
Expand Down
1 change: 0 additions & 1 deletion aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,6 @@ _LT_CONFIG_SAVE_COMMANDS([
cat <<_LT_EOF >> "$cfgfile"
#! $SHELL
# Generated automatically by $as_me ($PACKAGE) $VERSION
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
# Provide generalized library-building support services.
Expand Down
1 change: 0 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -15533,7 +15533,6 @@ $as_echo X"$file" |
cat <<_LT_EOF >> "$cfgfile"
#! $SHELL
# Generated automatically by $as_me ($PACKAGE) $VERSION
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
# Provide generalized library-building support services.
Expand Down

0 comments on commit 488d0ab

Please sign in to comment.