Skip to content

Commit

Permalink
fail to generate docs if the code isn't there
Browse files Browse the repository at this point in the history
  • Loading branch information
ocefpaf committed Apr 18, 2024
1 parent 1091147 commit b4fa140
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/copy_from_GSW-C.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
srcdir = Path('..', '..', 'GSW-C')
destdir = Path('..', 'src', 'c_gsw')

if not srcdir.exists():
raise IOError(
f"Could not find the GSW-C source code in {srcdir}."
"Please read the development notes to find how to setup your GSW-Python development environment."
)

for fname in fnames:
src = srcdir.joinpath(fname)
dest = destdir.joinpath(fname)
Expand Down
6 changes: 6 additions & 0 deletions tools/matlab_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
basedir = Path('..').resolve()

gsw_matlab_dir = basedir.joinpath('..', 'GSW-Matlab', 'Toolbox').resolve()
if not gsw_matlab_dir.exists():
raise IOError(
f"Could not find the GSW-Matlab source code in {gsw_matlab_dir}."
"Please read the development notes to find how to setup your GSW-Python development environment."
)

gsw_matlab_subdirs = ['library', 'thermodynamics_from_t']

# pattern for functions returning one variable
Expand Down

0 comments on commit b4fa140

Please sign in to comment.