Skip to content

Commit

Permalink
Merge pull request #1858 from modflowpy/v3.4.1
Browse files Browse the repository at this point in the history
Release 3.4.1
  • Loading branch information
wpbonelli committed Jun 29, 2023
2 parents 5190394 + ef24eea commit fd40456
Show file tree
Hide file tree
Showing 87 changed files with 113 additions and 234 deletions.
2 changes: 1 addition & 1 deletion .docs/Notebooks/array_output_tutorial.py
Expand Up @@ -25,9 +25,9 @@
# + [markdown] pycharm={"name": "#%% md\n"}
# load and run the Freyberg model

import os

# + pycharm={"name": "#%%\n"}
import os
import sys
from tempfile import TemporaryDirectory

Expand Down
2 changes: 1 addition & 1 deletion .docs/Notebooks/plot_cross_section_example.py
Expand Up @@ -23,9 +23,9 @@
#
# ### Mapping is demonstrated for MODFLOW-2005 and MODFLOW-6 models in this notebook

import os

# + pycharm={"name": "#%%\n"}
import os
import sys
from tempfile import TemporaryDirectory

Expand Down
6 changes: 3 additions & 3 deletions .docs/Notebooks/plot_map_view_example.py
Expand Up @@ -24,9 +24,9 @@
# ### Mapping is demonstrated for MODFLOW-2005, MODFLOW-USG, and MODFLOW-6 models in this notebook
#

import os

# +
import os
import sys
from tempfile import TemporaryDirectory

Expand Down Expand Up @@ -315,8 +315,6 @@
# + [markdown] pycharm={"name": "#%% md\n"}
# Array contours can be exported directly to a shapefile.

from shapefile import Reader

# + pycharm={"name": "#%%\n"}
from flopy.export.utils import ( # use export_contourf for filled contours
export_contours,
Expand All @@ -325,6 +323,8 @@
shp_path = os.path.join(modelpth, "contours.shp")
export_contours(shp_path, contour_set)

from shapefile import Reader

with Reader(shp_path) as r:
nshapes = len(r.shapes())
print("Contours:", nshapes)
Expand Down
70 changes: 0 additions & 70 deletions .github/workflows/release.yml
Expand Up @@ -237,73 +237,3 @@ jobs:

- name: Publish to PyPI
run: python -m twine upload dist/*

reset:
name: Draft reset PR
if: ${{ github.event_name == 'release' }}
runs-on: ubuntu-22.04
permissions:
contents: write
pull-requests: write
defaults:
run:
shell: bash -l {0}
steps:

- name: Checkout master branch
uses: actions/checkout@v3
with:
ref: master

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: 'pip'
cache-dependency-path: pyproject.toml

- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install build twine
pip install .
pip install ".[lint, test, optional]"
- name: Get release tag
uses: oprypin/find-latest-tag@v1
id: latest_tag
with:
repository: ${{ github.repository }}
releases-only: true

- name: Draft pull request
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
# create reset branch from master
reset_branch="post-release-${{ steps.latest_tag.outputs.tag }}-reset"
git switch -c $reset_branch
# update version string (append '+' to indicate development status)
version=$(cat version.txt)
version="$version+"
python scripts/update_version.py -v "$version"
# lint Python files
python scripts/pull_request_prepare.py
# commit and push reset branch
git config core.sharedRepository true
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "ci(release): update to version $version"
git push -u origin $reset_branch
# create PR into develop
body='
# Reinitialize for development
Updates the `develop` branch from `master` following a successful release.
'
gh pr create -B "develop" -H "$reset_branch" --title "Reinitialize develop branch" --draft --body "$body"
2 changes: 1 addition & 1 deletion CITATION.cff
Expand Up @@ -3,7 +3,7 @@ message: If you use this software, please cite both the article from preferred-c
and the software itself.
type: software
title: FloPy
version: 3.4.0
version: 3.4.1
date-released: '2023-06-29'
doi: 10.5066/F7BK19FH
abstract: A Python package to create, run, and post-process MODFLOW-based models.
Expand Down
4 changes: 2 additions & 2 deletions README.md
@@ -1,7 +1,7 @@

<img src="https://raw.githubusercontent.com/modflowpy/flopy/master/examples/images/flopy3.png" alt="flopy3" style="width:50;height:20">

### Version 3.4.0
### Version 3.4.1
[![flopy continuous integration](https://github.com/modflowpy/flopy/actions/workflows/commit.yml/badge.svg?branch=develop)](https://github.com/modflowpy/flopy/actions/workflows/commit.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)

Expand Down Expand Up @@ -142,7 +142,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., Brakenhoff, D. A., and Bonelli, W. P., 2023, FloPy v3.4.0: U.S. Geological Survey Software Release, 29 June 2023, https://doi.org/10.5066/F7BK19FH](https://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., Brakenhoff, D. A., and Bonelli, W. P., 2023, FloPy v3.4.1: U.S. Geological Survey Software Release, 29 June 2023, https://doi.org/10.5066/F7BK19FH](https://doi.org/10.5066/F7BK19FH)


Additional FloPy Related Publications
Expand Down
7 changes: 3 additions & 4 deletions autotest/test_flopy_module.py
Expand Up @@ -3,17 +3,16 @@
from pathlib import Path

import numpy as np
from packaging.version import Version

import flopy


def test_import_and_version_string():
import flopy

# matches any 1-3 component, dot-separated version string
# https://stackoverflow.com/a/82205/6514033
pattern = r"^(\d+\.)?(\d+\.)?(\*|\d+)$"
assert re.match(pattern, flopy.__version__)
# an error is raised if the version string can't be parsed
Version(flopy.__version__)


def test_modflow():
Expand Down
2 changes: 1 addition & 1 deletion code.json
Expand Up @@ -29,7 +29,7 @@
"downloadURL": "https://code.usgs.gov/usgs/modflow/flopy/archive/master.zip",
"vcs": "git",
"laborHours": -1,
"version": "3.4.0",
"version": "3.4.1",
"date": {
"metadataLastUpdated": "2023-06-29"
},
Expand Down
2 changes: 1 addition & 1 deletion docs/PyPI_release.md
Expand Up @@ -30,7 +30,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., Brakenhoff, D. A., and Bonelli, W. P., 2023, FloPy v3.4.0: U.S. Geological Survey Software Release, 29 June 2023, https://doi.org/10.5066/F7BK19FH](https://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., Brakenhoff, D. A., and Bonelli, W. P., 2023, FloPy v3.4.1: U.S. Geological Survey Software Release, 29 June 2023, https://doi.org/10.5066/F7BK19FH](https://doi.org/10.5066/F7BK19FH)


Disclaimer
Expand Down
4 changes: 2 additions & 2 deletions docs/make_release.md
Expand Up @@ -66,7 +66,7 @@ If the branch name does not end with `rc`, the workflow will proceed to open a P

**Note:** the PR should be merged, not squashed. Squashing removes the commit history from the `master` branch and causes `develop` and `master` to diverge, which can cause future PRs updating `master` to replay commits from previous releases.

Publishing the release triggers jobs to publish the `flopy` package to PyPI and open a PR updating `develop` from `master`. This PR also updates version numbers to the just-released version, and appends "+" to the end of the version string to indicate development status.
Publishing the release triggers a final job to publish the `flopy` package to PyPI.

##### Trusted publishing

Expand Down Expand Up @@ -109,7 +109,7 @@ As described above, making a release manually involves the following steps:

1. Merge the `master` branch into the `develop` branch.

2. Set the version as appropriate: `python scripts/update_version.py -v <semver>`.
2. Set the development version as appropriate: `python scripts/update_version.py -v <version>`. The version number must comply with [PEP 440](https://peps.python.org/pep-0440/).

3. Lint Python files: `python scripts/pull_request_prepare.py`

Expand Down
6 changes: 6 additions & 0 deletions docs/version_changes.md
@@ -1,3 +1,9 @@
### Version 3.4.1

#### Bug fixes

* [fix(get-modflow)](https://github.com/modflowpy/flopy/commit/b8dffbc6bc7bee70d18d7ec24c96e33517e4f0e8): Accommodate mf6 release asset name change (#1855). Committed by w-bonelli on 2023-06-29.

### Version 3.4.0

#### New features
Expand Down
2 changes: 1 addition & 1 deletion etc/environment.yml
Expand Up @@ -29,7 +29,7 @@ dependencies:
- pytest-dotenv
- pytest-virtualenv
- pytest-xdist

- virtualenv

# optional
- python-dateutil>=2.4.0
Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfems.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:48 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfpackage


Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfgnc.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:48 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfpackage
from ..data.mfdatautil import ListTemplateGenerator

Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfgwf.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:48 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfmodel
from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator

Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfgwfapi.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:48 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfpackage
from ..data.mfdatautil import ListTemplateGenerator

Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfgwfbuy.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:48 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfpackage
from ..data.mfdatautil import ListTemplateGenerator

Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfgwfchd.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:48 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfpackage
from ..data.mfdatautil import ListTemplateGenerator

Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfgwfcsub.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:48 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfpackage
from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator

Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfgwfdis.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:48 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfpackage
from ..data.mfdatautil import ArrayTemplateGenerator

Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfgwfdisu.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:48 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfpackage
from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator

Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfgwfdisv.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:48 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfpackage
from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator

Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfgwfdrn.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:48 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfpackage
from ..data.mfdatautil import ListTemplateGenerator

Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfgwfevt.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:48 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfpackage
from ..data.mfdatautil import ListTemplateGenerator

Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfgwfevta.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:48 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfpackage
from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator

Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfgwfghb.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:48 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfpackage
from ..data.mfdatautil import ListTemplateGenerator

Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfgwfgnc.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:48 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfpackage
from ..data.mfdatautil import ListTemplateGenerator

Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfgwfgwf.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:47 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfpackage
from ..data.mfdatautil import ListTemplateGenerator

Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfgwfgwt.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:48 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfpackage


Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfgwfhfb.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:48 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfpackage
from ..data.mfdatautil import ListTemplateGenerator

Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfgwfic.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:48 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfpackage
from ..data.mfdatautil import ArrayTemplateGenerator

Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfgwflak.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:48 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfpackage
from ..data.mfdatautil import ListTemplateGenerator

Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/modflow/mfgwfmaw.py
@@ -1,6 +1,6 @@
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on June 29, 2023 01:58:48 UTC
# FILE created on June 29, 2023 14:20:38 UTC
from .. import mfpackage
from ..data.mfdatautil import ListTemplateGenerator

Expand Down

0 comments on commit fd40456

Please sign in to comment.