Skip to content

Commit 89e6d96

Browse files
authored
docs(rtd): include developer guide section, troubleshoot rendering (#1889)
The styleguide is missing from the RTD site, try specifying RST and MD suffixes explicitly. And introduce developer guide section with styleguide, DEVELOPER.md, and CONTRIBUTING.md.
1 parent e8d2c60 commit 89e6d96

File tree

5 files changed

+42
-15
lines changed

5 files changed

+42
-15
lines changed

.build_rtd_docs/conf.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,25 @@
5656
# copy the file
5757
shutil.copy(src, dst)
5858

59+
# -- copy developer docs
60+
dstdir = "_dev"
61+
fpth = "DEVELOPER.md"
62+
src = os.path.join("..", fpth)
63+
dst = os.path.join(dstdir, fpth)
64+
# clean up an existing _mf6run directory
65+
if os.path.isdir(dstdir):
66+
shutil.rmtree(dstdir)
67+
# make the directory
68+
os.makedirs(dstdir)
69+
# copy the file
70+
shutil.copy(src, dst)
71+
72+
# -- copy contributor docs
73+
fpth = "CONTRIBUTING.md"
74+
src = os.path.join("..", fpth)
75+
dst = os.path.join(dstdir, fpth)
76+
shutil.copy(src, dst)
77+
5978
# -- copy deprecations markdown ---------------------------------------------
6079
print("Copy the deprecations table")
6180
dstdir = "_mf6run"
@@ -126,6 +145,8 @@
126145
# # Tell sphinx what the pygments highlight language should be.
127146
# highlight_language = 'fortran'
128147

148+
source_suffix = {".rst": "restructuredtext", ".md": "markdown"}
149+
129150
# Add any paths that contain templates here, relative to this directory.
130151
templates_path = ["_templates"]
131152

.build_rtd_docs/dev.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Developer Guide
2+
---------------
3+
4+
This section includes developer instructions and conventions.
5+
6+
.. toctree::
7+
:maxdepth: 1
8+
:glob:
9+
10+
_dev/CONTRIBUTING.md
11+
_dev/DEVELOPER.md
12+
styleguide.md

.build_rtd_docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ Contents:
1515
_mf6run/run-time-comparison.md
1616
_mf6run/deprecations.md
1717
mf6io
18-
styleguide.md
18+
dev
1919

.build_rtd_docs/styleguide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Style Guide
1+
# Fortran Style Guide
22

33
The goal of this guide is to provide a standard for MODFLOW 6 contributors to follow, in pursuit of consistent, readable, well-organized, and unsurprising source code.
44

DEVELOPER.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@ To build and test a parallel version of the program, first read the instructions
1111
- [Git](#git)
1212
- [Fortran compiler](#fortran-compiler)
1313
- [GNU Fortran](#gnu-fortran)
14-
- [Linux](#linux)
15-
- [macOS](#macos)
16-
- [Windows](#windows)
1714
- [Intel Fortran](#intel-fortran)
18-
- [Windows](#windows-1)
15+
- [Windows](#windows)
1916
- [Compiler compatibility](#compiler-compatibility)
2017
- [Compile](#compile)
2118
- [Test](#test)
@@ -27,9 +24,6 @@ To build and test a parallel version of the program, first read the instructions
2724
- [`flopy`](#flopy)
2825
- [`modflow-devtools`](#modflow-devtools)
2926
- [Optional tools](#optional-tools)
30-
- [GNU Make](#gnu-make)
31-
- [Visual Studio](#visual-studio)
32-
- [Doxygen & LaTeX](#doxygen--latex)
3327
- [Installation](#installation)
3428
- [Building](#building)
3529
- [Formatting](#formatting)
@@ -90,12 +84,12 @@ GNU Fortran or Intel Fortran compilers can be used to build MODFLOW 6. It may be
9084

9185
GNU Fortran can be installed on all three major platforms.
9286

93-
##### Linux
87+
*Linux*
9488

9589
- Fedora-based: `dnf install gcc-gfortran`
9690
- Debian-based: `apt install gfortran`
9791

98-
##### macOS
92+
*macOS*
9993

10094
- [Homebrew](https://brew.sh/): `brew install gcc@13`
10195
- [MacPorts](https://www.macports.org/): `sudo port install gcc13`
@@ -108,7 +102,7 @@ export LDFLAGS="$LDFLAGS -Wl,-ld_classic"
108102

109103
See [this ticket](https://github.com/mesonbuild/meson/issues/12282) on the Meson repository for more information.
110104

111-
##### Windows
105+
*Windows*
112106

113107
[Minimalist GNU for Windows](https://www.mingw-w64.org/) is the recommended way to obtain the GCC toolchain on Windows. Several MinGW distributions are available.
114108

@@ -224,15 +218,15 @@ The tests use a set of shared fixtures and utilities provided by the [`modflow-d
224218

225219
Some other tools are useful but not required to develop MODFLOW 6.
226220

227-
#### GNU Make
221+
*GNU Make*
228222

229223
This repository provides makefiles, generated by `mfpymake`, which can be used to build MODFLOW 6 with [GNU Make](https://www.gnu.org/software/make/). For further instructions we refer to the [GNU Make Manual](https://www.gnu.org/software/make/manual/).
230224

231-
#### Visual Studio
225+
*Visual Studio*
232226

233227
Visual Studio installers can be downloaded from the [official website](https://visualstudio.microsoft.com/). MODFLOW 6 solution files can be found in the `msvs` folder.
234228

235-
#### Doxygen & LaTeX
229+
*Doxygen & LaTeX*
236230

237231
[Doxygen](https://www.doxygen.nl/index.html) is used to generate the [MODFLOW 6 source code documentation](https://modflow-usgs.github.io/modflow6/). [Graphviz](https://graphviz.org/) is used by doxygen to produce source code diagrams. [LaTeX](https://www.latex-project.org/) is used to generate the MODFLOW 6 release notes and Input/Output documents (docs/mf6io/mf6io.nightlybuild).
238232

0 commit comments

Comments
 (0)