Skip to content

Commit

Permalink
add coverage for subprocesses (#578)
Browse files Browse the repository at this point in the history
* add coverage for subprocesses

* adding more binaries to get coverage on

* hoping to fix the pythno3 so issue

* trying to firce py 3.6 otherwise it gets downgraded

* using cdat-forge channel

* ...
  • Loading branch information
muryanto1 authored and doutriaux1 committed Oct 11, 2018
1 parent 822f5f8 commit 4b2c179
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ aliases:
name: create_conda_env
environment:
PKGS: "vcs vcsaddons mesalib matplotlib scipy cia testsrunner 'proj4<5'"
CHANNELS: "-c cdat/label/nightly -c conda-forge -c cdat -c pcmdi"
CHANNELS: "-c cdat/label/nightly -c cdat-forge -c conda-forge -c cdat -c pcmdi"
command: |
export PATH=$WORKDIR/miniconda/bin:$PATH
conda config --set always_yes yes --set changeps1 no
conda update -y -q conda
conda config --set anaconda_upload no
if [[ $PY_VER = "py2" ]]; then
conda create -q -n $PY_VER $CHANNELS $PKGS $FFMPEG "python<3"
conda create -n $PY_VER -q -n $PY_VER $CHANNELS "python<3" $PKGS $FFMPEG
else
conda create -q -n $PY_VER $CHANNELS $PKGS $FFMPEG "python>3" $COVERAGE_PKGS
conda create -n $PY_VER -q -n $PY_VER $CHANNELS "python>3" $PKGS $FFMPEG $COVERAGE_PKGS
fi
- &setup_pmp
Expand Down Expand Up @@ -59,7 +59,7 @@ aliases:
- &conda_upload
name: conda_upload
environment:
CHANNELS: "-c conda-forge -c cdat -c pcmdi"
CHANNELS: "-c cdat-forge -c conda-forge -c cdat -c pcmdi"
PKG_NAME: "pcmdi_metrics"
LABEL: "nightly"
command: |
Expand Down
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ script:
- export CDAT_ANONYMOUS_LOG="False"
- export FFMPEG="ffmpeg"
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export FFMPEG="'ffmpeg>4' 'libpng>1.6.34'"; fi
- conda create -q -n py2 -c cdat/label/nightly -c conda-forge -c cdat -c pcmdi vcs vcsaddons mesalib testsrunner cia "proj4<5" "python<3" scipy $FFMPEG
- conda create -q -n py3 -c cdat/label/nightly -c conda-forge -c cdat -c pcmdi vcs vcsaddons mesalib testsrunner cia "proj4<5" "python>3" scipy $FFMPEG
- conda create -n py2 -c conda-forge/label/gcc7 "python<3"
- conda install -q -n py2 -c cdat/label/nightly -c conda-forge -c cdat -c pcmdi vcs vcsaddons mesalib testsrunner cia "proj4<5" scipy $FFMPEG
- conda create -n py3 -c conda-forge/label/gcc7 "python>3"
- conda install -q -n py3 -c cdat/label/nightly -c conda-forge -c cdat -c pcmdi vcs vcsaddons mesalib testsrunner cia "proj4<5" scipy $FFMPEG
# Useful for debugging any issues with conda
- conda info -a
- source activate py2
Expand Down
14 changes: 13 additions & 1 deletion tests/coverage.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
{
"include": ["pcmdi_metrics", "pcmdi_metrics/pcmdi"]
"include": ["pcmdi_metrics"],
"subprocess": ["bin/mean_climate_driver.py",
"bin/pcmdi_compute_climatologies.py",
"bin/computeStdDailyMeansWrapped.py",
"bin/fourierDiurnalAllGridWrapped.py",
"bin/compositeDiurnalStatisticsWrapped.py",
"bin/std_of_hourlyvaluesWrappedInOut.py",
"bin/std_of_meandiurnalcycWrappedInOut.py",
"bin/savg_fourierWrappedInOut.py",
"bin/fourierDiurnalGridpoints.py",
"bin/std_of_dailymeansWrappedInOut.py",
"bin/mpindex_compute.py",
"bin/driver_monsoon_sperber.py"]
}

0 comments on commit 4b2c179

Please sign in to comment.