Skip to content

Commit 090849e

Browse files
authored
doc: clarify readthedocs versions (#1169)
closes #1165
1 parent 08dfff9 commit 090849e

File tree

6 files changed

+119
-43
lines changed

6 files changed

+119
-43
lines changed

.docs/conf.py

Lines changed: 57 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,70 @@
1515

1616
# add flopy root directory to the python path
1717
sys.path.insert(0, os.path.abspath(".."))
18-
from flopy import __version__
18+
from flopy import __version__, __author__
1919

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

23+
# -- determine if this version is a release candidate
24+
with open("../README.md", "r") as f:
25+
lines = f.readlines()
26+
rc_text = ""
27+
for line in lines:
28+
if line.startswith("### Version"):
29+
if "release candidate" in line:
30+
rc_text = "release candidate"
31+
break
32+
33+
# -- update version number in main.rst
34+
rst_name = "main.rst"
35+
with open(rst_name, "r") as f:
36+
lines = f.readlines()
37+
with open(rst_name, "w") as f:
38+
for line in lines:
39+
if line.startswith("**Documentation for version"):
40+
line = "**Documentation for version {}".format(__version__)
41+
if rc_text != "":
42+
line += " --- {}".format(rc_text)
43+
line += "**\n"
44+
f.write(line)
45+
46+
# -- update authors in introduction.rst
47+
rst_name = "introduction.rst"
48+
with open(rst_name, "r") as f:
49+
lines = f.readlines()
50+
tag_start = "FloPy Development Team"
51+
tag_end = "How to Cite"
52+
write_line = True
53+
with open(rst_name, "w") as f:
54+
for line in lines:
55+
if line.startswith(tag_start):
56+
write_line = False
57+
# update author list
58+
line += (
59+
"======================\n\n"
60+
"FloPy is developed by a team of MODFLOW users that have "
61+
"switched over to using\nPython for model development and "
62+
"post-processing. Members of the team\n"
63+
"currently include:\n\n"
64+
)
65+
authors = __author__.split(sep=",")
66+
for author in authors:
67+
line += " * {}\n".format(author.strip())
68+
line += " * and others\n\n"
69+
f.write(line)
70+
elif line.startswith(tag_end):
71+
write_line = True
72+
if write_line:
73+
f.write(line)
74+
75+
2376
# -- create source rst files ------------------------------------------------
2477
cmd = "sphinx-apidoc -e -o source/ ../flopy/"
2578
print(cmd)
2679
os.system(cmd)
2780

28-
# -- programatically create rst files ---------------------------------------
81+
# -- programmatically create rst files ---------------------------------------
2982
cmd = ("python", "create_rstfiles.py")
3083
print(" ".join(cmd))
3184
os.system(" ".join(cmd))
@@ -38,8 +91,8 @@
3891

3992
# -- Project information -----------------------------------------------------
4093
project = "flopy Documentation"
41-
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."
42-
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."
94+
copyright = "2021, {}".format(__author__)
95+
author = __author__
4396

4497
# The version.
4598
version = __version__

.docs/introduction.rst

Lines changed: 42 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,33 @@
11
What is FloPy
22
=============
33

4-
The FloPy package consists of a set of Python scripts to run MODFLOW, MT3D, SEAWAT and other MODFLOW-related groundwater programs. FloPy enables you to run all these programs with Python scripts. The FloPy project started in 2009 and has grown to a fairly complete set of scripts with a growing user base. FloPy3 was released in December 2014 with a few great enhancements that make FloPy3 backwards incompatible. The first significant change is that FloPy3 uses zero-based indexing everywhere, which means that all layers, rows, columns, and stress periods start numbering at zero. This change was made for consistency as all array-indexing was already zero-based (as are all arrays in Python). This may take a little getting-used-to, but hopefully will avoid confusion in the future. A second significant enhancement concerns the ability to specify time-varying boundary conditions that are specified with a sequence of layer-row-column-values, like the WEL and GHB packages. A variety of flexible and readable ways have been implemented to specify these boundary conditions. FloPy is an open-source project and any assistance is welcomed. Please email the development team if you want to contribute.
4+
The FloPy package consists of a set of Python scripts to run MODFLOW, MT3D,
5+
SEAWAT and other MODFLOW-related groundwater programs. FloPy enables you to
6+
run all these programs with Python scripts. The FloPy project started in 2009
7+
and has grown to a fairly complete set of scripts with a growing user base.
8+
FloPy3 was released in December 2014 with a few great enhancements that make
9+
FloPy3 backwards incompatible. The first significant change is that FloPy3
10+
uses zero-based indexing everywhere, which means that all layers, rows,
11+
columns, and stress periods start numbering at zero. This change was made
12+
for consistency as all array-indexing was already zero-based (as are
13+
all arrays in Python). This may take a little getting-used-to, but hopefully
14+
will avoid confusion in the future. A second significant enhancement concerns
15+
the ability to specify time-varying boundary conditions that are specified
16+
with a sequence of layer-row-column-values, like the WEL and GHB packages.
17+
A variety of flexible and readable ways have been implemented to specify these
18+
boundary conditions.
19+
20+
Recently, FloPy has been further enhanced to include full support for
21+
MODFLOW 6. The majority of recent development has focused on FloPy
22+
functionality for MODFLOW 6, helper functions to use GIS shapefiles and
23+
raster files to create MODFLOW datasets, and common plotting and
24+
export functionality.
25+
26+
FloPy is an open-source project and any assistance is welcomed. Please email
27+
the development team if you want to contribute.
528

629
Return to the Github `FloPy <https://github.com/modflowpy/flopy>`_ website.
730

8-
931
FloPy Installation
1032
==================
1133

@@ -52,32 +74,24 @@ FloPy Development Team
5274
======================
5375

5476
FloPy is developed by a team of MODFLOW users that have switched over to using
55-
Python for model development and post processing. Members of the team currently
56-
include:
57-
58-
* Mark Bakker
59-
* Vincent Post
60-
* Joe Hughes
61-
* Chris Langevin
62-
* Jeremy White
63-
* Andy Leaf
64-
* Scott Paulinski
65-
* Josh Larsen
66-
* Mike Toews
67-
* Eric Morway
68-
* Jason Bellino
69-
* Jeff Starn
70-
* Mike Fienen
71-
72-
with contributions from:
73-
74-
* Kolja Rotzoll
75-
* Alain Frances
76-
* and others
77-
78-
Feel free to contact one of us if you would like to participate in FloPy
79-
development.
80-
77+
Python for model development and post-processing. Members of the team
78+
currently include:
79+
80+
* Mark Bakker
81+
* Vincent Post
82+
* Joseph D. Hughes
83+
* Christian D. Langevin
84+
* Jeremy T. White
85+
* Andrew T. Leaf
86+
* Scott R. Paulinski
87+
* Jason C. Bellino
88+
* Eric D. Morway
89+
* Michael W. Toews
90+
* Joshua D. Larsen
91+
* Michael N. Fienen
92+
* Jon Jeffrey Starn
93+
* Davíd Brakenhoff
94+
* and others
8195

8296
How to Cite
8397
===========

.docs/main.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
FloPy Documentation
77
===================
88

9+
**Documentation for version 3.3.4 --- release candidate**
10+
911
Return to the Github `FloPy <https://github.com/modflowpy/flopy>`_ website where the code resides.
1012

1113
Contents:

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,12 @@ The release candidate version can also be installed from the git repository usin
4141
Documentation
4242
-----------------------------------------------
4343

44-
FloPy code documentation is available at [https://flopy.readthedocs.io](https://flopy.readthedocs.io)
44+
Documentation is available on **Read the Docs** and includes information
45+
on FloPy; tutorials for using FloPy with MODFLOW 6 and previous versions
46+
of MODFLOW, MT3DMS, MT3D-USGS, MODPATH, and ZONEBUDGET; and code documentation.
47+
48+
- Read the Docs for the [latest release](https://flopy.readthedocs.io).
49+
- Read the Docs for the [current release candidate](https://flopy.readthedocs.io/en/latest/).
4550

4651

4752
Getting Started
@@ -140,7 +145,7 @@ How to Cite
140145

141146
##### ***Software/Code citation for FloPy:***
142147

143-
[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., 2021, FloPy v3.3.4 &mdash; release candidate: U.S. Geological Survey Software Release, 18 February 2021, http://dx.doi.org/10.5066/F7BK19FH](http://dx.doi.org/10.5066/F7BK19FH)
148+
[Bakker, Mark, Post, Vincent, Hughes, J. D., Langevin, C. D., White, J. T., Leaf, A. T., Paulinski, S. R., Bellino, J. C., Morway, E. D., Toews, M. W., Larsen, J. D., Fienen, M. N., Starn, J. J., and Brakenhoff, Davíd, 2021, FloPy v3.3.4 &mdash; release candidate: U.S. Geological Survey Software Release, 05 August 2021, http://dx.doi.org/10.5066/F7BK19FH](http://dx.doi.org/10.5066/F7BK19FH)
144149

145150

146151
MODFLOW Resources

examples/Tutorials/modflow6/tutorial01_mf6.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
# an iterative model solution (`IMS`), which controls how the GWF model is
5757
# solved.
5858

59-
# ### Create the Flopy simulation object
59+
# ### Create the FloPy simulation object
6060

6161
sim = flopy.mf6.MFSimulation(
6262
sim_name=name, exe_name="mf6", version="mf6", sim_ws="."

flopy/version.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# flopy version file automatically created using...make-release.py
2-
# created on...February 18, 2021 16:28:18
2+
# created on...August 05, 2021 14:43:06
33

44
major = 3
55
minor = 3
@@ -8,21 +8,23 @@
88

99
__pakname__ = "flopy"
1010

11-
# edit author dictionary as necessary
11+
# edit author dictionary as necessary (
12+
# in order of commits after Bakker and Post
1213
author_dict = {
1314
"Mark Bakker": "[email protected]",
1415
"Vincent Post": "[email protected]",
15-
"Christian D. Langevin": "[email protected]",
1616
"Joseph D. Hughes": "[email protected]",
17-
"Jeremy T. White": "[email protected]",
17+
"Christian D. Langevin": "[email protected]",
18+
"Jeremy T. White": "[email protected]",
1819
"Andrew T. Leaf": "[email protected]",
1920
"Scott R. Paulinski": "[email protected]",
20-
"Joshua D. Larsen": "[email protected]",
21-
"Michael W. Toews": "[email protected]",
22-
"Eric D. Morway": "[email protected]",
2321
"Jason C. Bellino": "[email protected]",
24-
"Jon Jeffrey Starn": "[email protected]",
22+
"Eric D. Morway": "[email protected]",
23+
"Michael W. Toews": "[email protected]",
24+
"Joshua D. Larsen": "[email protected]",
2525
"Michael N. Fienen": "[email protected]",
26+
"Jon Jeffrey Starn": "[email protected]",
27+
"Davíd Brakenhoff": "[email protected]",
2628
}
2729
__author__ = ", ".join(author_dict.keys())
2830
__author_email__ = ", ".join(s for _, s in author_dict.items())

0 commit comments

Comments
 (0)