From ae24cd70fd941ddca4ddc9564d7cb466e1a01808 Mon Sep 17 00:00:00 2001 From: Joseph D Hughes Date: Fri, 20 Aug 2021 14:33:14 -0500 Subject: [PATCH] readme: update README.md badges and script to update badge branch --- README.md | 8 +++++--- release/make-release.py | 39 ++++++++++++++++++++++++--------------- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 21f9b12354..fd4f7de880 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,11 @@ flopy3 ### Version 3.3.5 — release candidate -[![Build Status](https://travis-ci.org/modflowpy/flopy.svg?branch=develop)](https://travis-ci.org/modflowpy/flopy) +[![flopy continuous integration](https://github.com/modflowpy/flopy/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/modflowpy/flopy/actions/workflows/ci.yml) +[![Read the Docs](https://github.com/modflowpy/flopy/actions/workflows/rtd.yml/badge.svg?branch=develop)](https://github.com/modflowpy/flopy/actions/workflows/rtd.yml) + [![codecov](https://codecov.io/gh/modflowpy/flopy/branch/develop/graph/badge.svg)](https://codecov.io/gh/modflowpy/flopy) -[![Codacy Badge](https://app.codacy.com/project/badge/Grade/b23a5edd021b4aa19e947545ab49e577)](https://www.codacy.com/manual/jdhughes-usgs/flopy?utm_source=github.com&utm_medium=referral&utm_content=modflowpy/flopy&utm_campaign=Badge_Grade) +[![Codacy Badge](https://app.codacy.com/project/badge/Grade/3f44f457aa474a8f83ad60c1842f7be2)](https://www.codacy.com/gh/modflowpy/flopy/dashboard?utm_source=github.com&utm_medium=referral&utm_content=modflowpy/flopy&utm_campaign=Badge_Grade) [![Documentation Status](https://readthedocs.org/projects/flopy/badge/?version=latest)](https://flopy.readthedocs.io/en/latest/?badge=latest) [![Anaconda-Server Badge](https://anaconda.org/conda-forge/flopy/badges/installer/conda.svg)](https://conda.anaconda.org/conda-forge) @@ -145,7 +147,7 @@ How to Cite ##### ***Software/Code citation for FloPy:*** -[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.5 — release candidate: U.S. Geological Survey Software Release, 07 August 2021, http://dx.doi.org/10.5066/F7BK19FH](http://dx.doi.org/10.5066/F7BK19FH) +[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.5 — release candidate: U.S. Geological Survey Software Release, 20 August 2021, http://dx.doi.org/10.5066/F7BK19FH](http://dx.doi.org/10.5066/F7BK19FH) MODFLOW Resources diff --git a/release/make-release.py b/release/make-release.py index 54de7bcb95..3d128c361a 100644 --- a/release/make-release.py +++ b/release/make-release.py @@ -185,8 +185,10 @@ def update_version(): # write new version file f = open(fpth, "w") f.write( - "# {} version file automatically ".format(pak) - + "created using...{0}\n".format(os.path.basename(__file__)) + ( + "# {} version file automatically created " + "using...{}\n".format(pak, os.path.basename(__file__)) + ) ) f.write( "# created on..." @@ -284,26 +286,33 @@ def update_readme_markdown(vmajor, vminor, vmicro): line = "### Version {}".format(version) if not is_approved: line += " — release candidate" - elif "[Build Status]" in line: + elif "[flopy continuous integration]" in line: + line = ( + "[![flopy continuous integration](https://github.com/" + "modflowpy/flopy/actions/workflows/ci.yml/badge.svg?" + "branch={})](https://github.com/modflowpy/flopy/actions/" + "workflows/ci.yml)".format(branch) + ) + elif "[Read the Docs]" in line: line = ( - "[![Build Status](https://travis-ci.org/modflowpy/" - + "flopy.svg?branch={})]".format(branch) - + "(https://travis-ci.org/modflowpy/flopy)" + "[![Read the Docs](https://github.com/modflowpy/flopy/" + "actions/workflows/rtd.yml/badge.svg?branch={})]" + "(https://github.com/modflowpy/flopy/actions/" + "workflows/rtd.yml)".format(branch) ) elif "[Coverage Status]" in line: line = ( "[![Coverage Status](https://coveralls.io/repos/github/" - + "modflowpy/flopy/badge.svg?branch={})]".format(branch) - + "(https://coveralls.io/github/modflowpy/" - + "flopy?branch={})".format(branch) + "modflowpy/flopy/badge.svg?branch={0})]" + "(https://coveralls.io/github/modflowpy/" + "flopy?branch={0})".format(branch) ) elif "[Binder]" in line: # [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/modflowpy/flopy.git/develop) line = ( "[![Binder](https://mybinder.org/badge_logo.svg)]" - + "(https://mybinder.org/v2/gh/modflowpy/flopy.git/" - + "{}".format(branch) - + ")" + "(https://mybinder.org/v2/gh/modflowpy/flopy.git/" + "{})".format(branch) ) elif "http://dx.doi.org/10.5066/F7BK19FH" in line: line = get_software_citation(version, is_approved) @@ -350,13 +359,13 @@ def update_notebook_examples_markdown(): # [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/modflowpy/flopy.git/develop) line = ( "[![Binder](https://mybinder.org/badge_logo.svg)]" - + "(https://mybinder.org/v2/gh/modflowpy/flopy.git/" - + "{}".format(branch) - + ")" + "(https://mybinder.org/v2/gh/modflowpy/flopy.git/" + "{})".format(branch) ) f.write("{}\n".format(line)) f.close() + def update_PyPi_release(vmajor, vminor, vmicro): # create disclaimer text is_approved, disclaimer = get_disclaimer()