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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ How to Cite

##### ***Citation for FloPy:***

[Bakker, M., Post, V., Langevin, C. D., Hughes, J. D., White, J. T., Starn, J. J. and Fienen, M. N., 2016, Scripting MODFLOW Model Development Using Python and FloPy: Groundwater, v. 54, p. 733–739, doi:10.1111/gwat.12413.](http://dx.doi.org/10.1111/gwat.12413)
[Bakker, Mark, Post, Vincent, Langevin, C. D., Hughes, J. D., White, J. T., Starn, J. J. and Fienen, M. N., 2016, Scripting MODFLOW Model Development Using Python and FloPy: Groundwater, v. 54, p. 733–739, doi:10.1111/gwat.12413.](http://dx.doi.org/10.1111/gwat.12413)

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

[Bakker, M., Post, V., 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., 2019, FloPy v3.3.1 — release candidate: U.S. Geological Survey Software Release, 15 December 2019, http://dx.doi.org/10.5066/F7BK19FH](http://dx.doi.org/10.5066/F7BK19FH)
[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., 2020, FloPy v3.3.1 — release candidate: U.S. Geological Survey Software Release, 11 June 2020, http://dx.doi.org/10.5066/F7BK19FH](http://dx.doi.org/10.5066/F7BK19FH)


MODFLOW Resources
Expand Down
4 changes: 2 additions & 2 deletions flopy/version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# flopy version file automatically created using...make-release.py
# created on...May 26, 2020 17:16:58
# created on...June 11, 2020 11:16:17

major = 3
minor = 3
Expand All @@ -21,7 +21,7 @@
'Michael W. Toews': 'M.Toews@gns.cri.nz',
'Eric D. Morway': 'emorway@usgs.gov',
'Jason C. Bellino': 'jbellino@usgs.gov',
'Jeffrey Starn': 'jjstarn@usgs.gov',
'Jon Jeffrey Starn': 'jjstarn@usgs.gov',
'Michael N. Fienen': 'mnfienen@usgs.gov',
}
__author__ = ', '.join(author_dict.keys())
Expand Down
39 changes: 26 additions & 13 deletions release/make-release.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/python

from __future__ import print_function
import subprocess
import os
import sys
Expand All @@ -27,15 +26,18 @@

pak = 'flopy'

# authors list for Software/Code citation for FloPy
# author should be defined LastName FirstName MiddleInitial
# MiddleInitial can be absent. Use spaces instead of commas to separate
# LastName, FirstName, and MiddleInitial.
authors = ['Bakker Mark', 'Post Vincent', 'Langevin Christian D',
'Hughes Joseph D', 'White Jeremy T', 'Leaf Andrew T',
'Paulinski Scott R', 'Larsen Joshua D', 'Toews Michael W',
'Morway Eric D', 'Bellino Jason C', 'Starn Jeffrey J',
'Fienen Michael N']
# local import of package variables in flopy/version.py
# imports author_dict
exec(open(os.path.join("..", "flopy", "version.py")).read())

# build authors list for Software/Code citation for FloPy
authors = []
for key in author_dict.keys():
t = key.split()
author = '{}'.format(t[-1])
for str in t[0:-1]:
author += ' {}'.format(str)
authors.append(author)

approved = '''Disclaimer
----------
Expand Down Expand Up @@ -130,17 +132,27 @@ def get_software_citation(version, is_approved):
sb = ''
if not is_approved:
sb = ' — release candidate'
# format author names
line = '['
for ipos, author in enumerate(authors):
if ipos > 0:
line += ', '
if ipos == len(authors) - 1:
line += 'and '
sv = author.split()
tauthor = '{}, {}.'.format(sv[0], sv[1][0])
if len(sv) > 2:
tauthor += ' {}.'.format(sv[2][0])
tauthor = '{}'.format(sv[0])
if len(sv) < 3:
gname = sv[1]
if len(gname) > 1:
tauthor += ', {}'.format(gname)
else:
tauthor += ', {}.'.format(gname[0])
else:
tauthor += ', {}. {}.'.format(sv[1][0], sv[2][0])
# add formatted author name to line
line += tauthor

# add the rest of the citation
line += ', {}, '.format(now.year) + \
'FloPy v{}{}: '.format(version, sb) + \
'U.S. Geological Survey Software Release, ' + \
Expand Down Expand Up @@ -443,3 +455,4 @@ def update_USGSmarkdown(vmajor, vminor, vmicro):

if __name__ == "__main__":
update_version()
get_software_citation('3.1.1', True)