Skip to content

Commit

Permalink
sphinx-requirements.txt -> py_requirements.txt
Browse files Browse the repository at this point in the history
Also updated .travis.yml to pip install -r docs/py_requirements.txt and updated
run_test_suite.sh to only run Fortran tests if the executable builds correctly.
  • Loading branch information
mnlevy1981 committed Jun 14, 2018
1 parent 5f685ba commit d2bfa5a
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 107 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ before_install:
- sudo apt-get install gfortran
install:
- pip install pyyaml
- pip install sphinx
- pip install sphinx_rtd_theme==0.2.5b1
- pip install sphinxcontrib-bibtex
- pip install -r docs/py_requirements.txt
python:
- '2.7'
- '3.6'
Expand Down
143 changes: 74 additions & 69 deletions MARBL_tools/run_test_suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,75 +73,80 @@ echo "$ ./bld_lib.py --no_pause"
STATUS=$(check_return $?)
print_status "bld_lib.py --no_pause" >> $OUTFILE

# Build stand-alone executable
cd ${MARBL_ROOT}/tests/bld_tests
echo "$ ./bld_exe.py --no_pause"
./bld_exe.py --no_pause
STATUS=$(check_return $?)
print_status "bld_exe.py --no_pause" >> $OUTFILE

# get_put unit test
cd ${MARBL_ROOT}/tests/unit_tests/get_put
echo "$ ./get_put.py"
./get_put.py
STATUS=$(check_return $?)
print_status "get_put.py" >> $OUTFILE

# marbl_utils unit test
cd ${MARBL_ROOT}/tests/unit_tests/utils_routines
echo "$ ./marbl_utils.py"
./marbl_utils.py
STATUS=$(check_return $?)
print_status "marbl_utils.py" >> $OUTFILE

# Initialize MARBL
cd ${MARBL_ROOT}/tests/regression_tests/init
echo "$ ./init.py"
./init.py
STATUS=$(check_return $?)
print_status "init.py" >> $OUTFILE

# Initialize MARBL, clean up memory, initialize again
cd ${MARBL_ROOT}/tests/regression_tests/init-twice
echo "$ ./init-twice.py"
./init-twice.py
STATUS=$(check_return $?)
print_status "init-twice.py" >> $OUTFILE

# Generate a settings file (Fortran)
cd ${MARBL_ROOT}/tests/regression_tests/gen_input_file
echo "$ ./gen_input_file.py"
./gen_input_file.py
STATUS=$(check_return $?)
print_status "gen_input_file.py" >> $OUTFILE

# Print all diagnostics MARBL can provide
cd ${MARBL_ROOT}/tests/regression_tests/requested_diags
echo "$ ./requested_diags.py"
./requested_diags.py
STATUS=$(check_return $?)
print_status "requested_diags.py" >> $OUTFILE

# Print all forcings MARBL requires
cd ${MARBL_ROOT}/tests/regression_tests/requested_forcings
echo "$ ./requested_forcings.py"
./requested_forcings.py
STATUS=$(check_return $?)
print_status "requested_forcings.py" >> $OUTFILE

# Print all restoring fields being requested
cd ${MARBL_ROOT}/tests/regression_tests/requested_restoring
echo "$ ./requested_restoring.py"
./requested_restoring.py -i ${MARBL_ROOT}/tests/input_files/marbl_with_restore.input
STATUS=$(check_return $?)
print_status "requested_restoring.py" >> $OUTFILE

# Print all tracers MARBL computes tendencies for
cd ${MARBL_ROOT}/tests/regression_tests/requested_tracers
echo "$ ./requested_tracers.py"
./requested_tracers.py
STATUS=$(check_return $?)
print_status "requested_tracers.py" >> $OUTFILE
# Build stand-alone executable (only if library built successfully)
if [ "${STATUS}" == "PASS" ]; then
cd ${MARBL_ROOT}/tests/bld_tests
echo "$ ./bld_exe.py --no_pause"
./bld_exe.py --no_pause
STATUS=$(check_return $?)
print_status "bld_exe.py --no_pause" >> $OUTFILE
fi

# Only test Fortran executable if build was successful
if [ "${STATUS}" == "PASS" ]; then
# get_put unit test
cd ${MARBL_ROOT}/tests/unit_tests/get_put
echo "$ ./get_put.py"
./get_put.py
STATUS=$(check_return $?)
print_status "get_put.py" >> $OUTFILE

# marbl_utils unit test
cd ${MARBL_ROOT}/tests/unit_tests/utils_routines
echo "$ ./marbl_utils.py"
./marbl_utils.py
STATUS=$(check_return $?)
print_status "marbl_utils.py" >> $OUTFILE

# Initialize MARBL
cd ${MARBL_ROOT}/tests/regression_tests/init
echo "$ ./init.py"
./init.py
STATUS=$(check_return $?)
print_status "init.py" >> $OUTFILE

# Initialize MARBL, clean up memory, initialize again
cd ${MARBL_ROOT}/tests/regression_tests/init-twice
echo "$ ./init-twice.py"
./init-twice.py
STATUS=$(check_return $?)
print_status "init-twice.py" >> $OUTFILE

# Generate a settings file (Fortran)
cd ${MARBL_ROOT}/tests/regression_tests/gen_input_file
echo "$ ./gen_input_file.py"
./gen_input_file.py
STATUS=$(check_return $?)
print_status "gen_input_file.py" >> $OUTFILE

# Print all diagnostics MARBL can provide
cd ${MARBL_ROOT}/tests/regression_tests/requested_diags
echo "$ ./requested_diags.py"
./requested_diags.py
STATUS=$(check_return $?)
print_status "requested_diags.py" >> $OUTFILE

# Print all forcings MARBL requires
cd ${MARBL_ROOT}/tests/regression_tests/requested_forcings
echo "$ ./requested_forcings.py"
./requested_forcings.py
STATUS=$(check_return $?)
print_status "requested_forcings.py" >> $OUTFILE

# Print all restoring fields being requested
cd ${MARBL_ROOT}/tests/regression_tests/requested_restoring
echo "$ ./requested_restoring.py"
./requested_restoring.py -i ${MARBL_ROOT}/tests/input_files/marbl_with_restore.input
STATUS=$(check_return $?)
print_status "requested_restoring.py" >> $OUTFILE

# Print all tracers MARBL computes tendencies for
cd ${MARBL_ROOT}/tests/regression_tests/requested_tracers
echo "$ ./requested_tracers.py"
./requested_tracers.py
STATUS=$(check_return $?)
print_status "requested_tracers.py" >> $OUTFILE
fi

echo "----"
cat $OUTFILE
Expand Down
3 changes: 3 additions & 0 deletions docs/py_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Sphinx==1.7.5
sphinx-rtd-theme==0.2.5b1
sphinxcontrib-bibtex==0.4.0
35 changes: 0 additions & 35 deletions docs/sphinx-requirements.txt

This file was deleted.

0 comments on commit d2bfa5a

Please sign in to comment.