Skip to content

Commit

Permalink
Merge branch 'StokesMOST'
Browse files Browse the repository at this point in the history
  • Loading branch information
mnlevy1981 committed Aug 14, 2024
2 parents 52aac95 + 7248cd8 commit 3ec78ba
Show file tree
Hide file tree
Showing 22 changed files with 2,212 additions and 451 deletions.
18 changes: 17 additions & 1 deletion CVMix_tools/code_consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,14 @@ def check_r8_settings(self, file_and_line, line, comment_char="!"):

fortran_files = [] # pylint: disable=C0103
python_files = [] # pylint: disable=C0103
perl_files = [] # pylint: disable=C0103
for root, dirs, files in os.walk(CVMIX_ROOT):
for thisfile in files:
if thisfile.endswith(".F90"):
fortran_files.append(os.path.join(root, thisfile))
elif thisfile.endswith(".py"):
python_files.append(os.path.join(root, thisfile))
perl_files.append(os.path.join(CVMIX_ROOT, 'doc', 'protex'))

# Use logging to write messages to stdout
logging.basicConfig(format='%(message)s', level=logging.DEBUG)
Expand Down Expand Up @@ -267,7 +269,21 @@ def check_r8_settings(self, file_and_line, line, comment_char="!"):
PYTHON_ERROR_COUNT = Tests.process()
LOGGER.info("Python errors found: %d", PYTHON_ERROR_COUNT)

if FORTRAN_ERROR_COUNT + PYTHON_ERROR_COUNT > 0:
# Perl error checks
LOGGER.info("\nCheck perl files for coding standard violations:")
for thisfile in perl_files:
with open(thisfile, "r") as perl_file:
line_cnt = 0
for thisline in perl_file.readlines():
line_without_cr = thisline.rstrip("\n")
line_cnt = line_cnt + 1
file_and_line_number = "%s:%d" % (thisfile, line_cnt)
Tests.check_for_hard_tabs(file_and_line_number, line_without_cr)
Tests.check_for_trailing_whitespace(file_and_line_number, line_without_cr)
PERL_ERROR_COUNT = Tests.process()
LOGGER.info("Perl errors found: %d", PERL_ERROR_COUNT)

if FORTRAN_ERROR_COUNT + PYTHON_ERROR_COUNT + PERL_ERROR_COUNT > 0:
LOGGER.info("\nTotal error count: %d", FORTRAN_ERROR_COUNT + PYTHON_ERROR_COUNT)
sys.exit(1)

Expand Down
1 change: 1 addition & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
protex_out/*
30 changes: 18 additions & 12 deletions doc/make_protex_file
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
#!/bin/bash
#!/bin/bash -e

SRC=../src
DRIVE=$SRC/drivers
SHARE=$SRC/shared
f90pdf \

mkdir -p protex_out
rm -f protex_out/protex_documentation.*
./protex -s -F -g +n \
$SRC/cvmix_driver.F90 \
$DRIVE/cvmix_bgrnd_BL.F90 \
$DRIVE/cvmix_shear_drv.F90 \
$DRIVE/cvmix_tidal_Simmons.F90 \
$DRIVE/cvmix_ddiff_drv.F90 \
$DRIVE/cvmix_kpp_drv.F90 \
$SRC/cvmix_io.F90 \
$SHARE/cvmix_kinds_and_types.F90 \
$SHARE/cvmix_background.F90 \
$SHARE/cvmix_shear.F90 \
Expand All @@ -13,14 +23,10 @@ f90pdf \
$SHARE/cvmix_convection.F90 \
$SHARE/cvmix_math.F90 \
$SHARE/cvmix_put_get.F90 \
$SHARE/cvmix_utils.F90 \
$SRC/cvmix_driver.F90 \
$DRIVE/cvmix_bgrnd_BL.F90 \
$DRIVE/cvmix_shear_drv.F90 \
$DRIVE/cvmix_tidal_Simmons.F90 \
$DRIVE/cvmix_ddiff_drv.F90 \
$DRIVE/cvmix_kpp_drv.F90 \
$SRC/cvmix_io.F90
$SHARE/cvmix_utils.F90 > \
protex_out/protex_documentation.tex

rm -f output.tex
mv -f output.pdf protex_documentation.pdf
cd protex_out
pdflatex protex_documentation.tex
pdflatex protex_documentation.tex
cp -f protex_documentation.pdf ../
Loading

0 comments on commit 3ec78ba

Please sign in to comment.