Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 12 additions & 18 deletions .docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,25 @@
import os
import sys
import shutil
from subprocess import Popen, PIPE

# add flopy root directory to the python path
sys.path.insert(0, os.path.abspath(".."))
from flopy import __version__
import pymake

# -- determine if running on readthedocs ------------------------------------
on_rtd = os.environ.get('READTHEDOCS') == 'True'

# -- import pymake if not running on readthedocs ----------------------------
if on_rtd:
pymake = None
else:
import pymake

# -- create source rst files ------------------------------------------------
cmd = "sphinx-apidoc -e -o source/ ../flopy/"
print(cmd)
os.system(cmd)

# -- get the MODFLOW executables --------------------------------------------
if not on_rtd:
ws = ".bin"
Expand All @@ -42,18 +51,8 @@
print(" ".join(cmd))
os.system(" ".join(cmd))

# -- Create the flopy rst files ---------------------------------------------
args = ("sphinx-apidoc", "-e", "-o", "source/", "../flopy/")
proc = Popen(args, stdout=PIPE, stderr=PIPE, cwd=".")
stdout, stderr = proc.communicate()
if stdout:
print(stdout.decode("utf-8"))
if stderr:
print("Errors:\n{}".format(stderr.decode("utf-8")))


# -- Project information -----------------------------------------------------
project = "flopy"
project = "flopy Documentation"
copyright = "2020, Bakker, Mark, Post, Vincent, Langevin, C. D., Hughes, J. D., White, J. T., Leaf, A. T., Paulinski, S. R., Larsen, J. D., Toews, M. W., Morway, E. D., Bellino, J. C., Starn, J. J., and Fienen, M. N."
author = "Bakker, Mark, Post, Vincent, Langevin, C. D., Hughes, J. D., White, J. T., Leaf, A. T., Paulinski, S. R., Larsen, J. D., Toews, M. W., Morway, E. D., Bellino, J. C., Starn, J. J., and Fienen, M. N."

Expand Down Expand Up @@ -85,11 +84,6 @@
"recommonmark",
]

# nbsphinx_execute_arguments = [
# "--InlineBackend.figure_formats={'svg', 'pdf'}",
# "--InlineBackend.rc={'figure.dpi': 200}",
# ]

# Settings for GitHub actions integration
if on_rtd:
extensions.append("rtds_action")
Expand Down
8 changes: 4 additions & 4 deletions .docs/main.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to the FloPy Documentation!
===================================
FloPy Documentation
===================

Return to the Github `FloPy <https://github.com/modflowpy/flopy>`_ website where the code resides.

Contents:

.. toctree::
:maxdepth: 2

introduction

Tutorial
Expand All @@ -33,7 +33,7 @@ Contents:

.. toctree::
:maxdepth: 2

code

Indices and tables
Expand Down
1 change: 0 additions & 1 deletion .docs/requirements.rtd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ ipython
ipykernel
rtds_action
git+https://github.com/pandas-dev/pydata-sphinx-theme.git@master
git+https://github.com/modflowpy/pymake.git@master