Skip to content

Commit

Permalink
Release3.2.13 (#725)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhughes-usgs committed Nov 17, 2019
1 parent 0dac08e commit 2a92634
Show file tree
Hide file tree
Showing 330 changed files with 28,602 additions and 11,980 deletions.
30 changes: 30 additions & 0 deletions .flake8
@@ -0,0 +1,30 @@
[flake8]
exclude =
.git,
__pycache__,
build,
dist
ignore =
# https://flake8.pycqa.org/en/latest/user/error-codes.html
F401, # 'module' imported but unused
# https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
E121, # continuation line under-indented for hanging indent
E122, # continuation line missing indentation or outdented
E126, # continuation line over-indented for hanging indent
E127, # continuation line over-indented for visual indent
E128, # continuation line under-indented for visual indent
E221, # multiple spaces before operator
E222, # multiple spaces after operator
E226, # missing whitespace around arithmetic operator
E231, # missing whitespace after ','
E241, # multiple spaces after ','
E402, # module level import not at top of file
E501, # line too long (> 79 characters)
E722, # do not use bare 'except'
W291, # trailing whitespace
W292, # no newline at end of file
W293, # blank line contains whitespace
W391, # blank line at end of file
W503, # line break before binary operator
W504 # line break after binary operator
statistics = True
68 changes: 15 additions & 53 deletions .travis.yml
Expand Up @@ -6,20 +6,21 @@ services:
- xvfb
matrix:
include:
- env: TVER=PY27
- env: RUN_TYPE=test
python: 2.7
- env: TVER=PY35
- env: RUN_TYPE=test
python: 3.5
- env: TVER=PY36
- env: RUN_TYPE=test
python: 3.6
- env: TVER=PY37
- env: RUN_TYPE=test
python: 3.7
- env: TVER=PY37N
- env: RUN_TYPE=misc
python: 3.7
- env: TVER=PY37D
python: 3.7-dev
allow_failures:
- env: TVER=PY37D
# - env: RUN_TYPE=test
# python: 3.8-dev
# allow_failures:
# - env: RUN_TYPE=test
# python: 3.8-dev
cache:
pip: true
directories:
Expand All @@ -32,57 +33,18 @@ addons:
packages:
- gfortran-8
- g++-8
- python-pip
- libhdf5-serial-dev
- netcdf-bin
- libnetcdf-dev
- gdal-bin
- libgdal-dev
env:
global:
- NO_NET=1
install:
- if [[ ! -d "$HOME/.local/bin" ]]; then mkdir "$HOME/.local/bin"; fi
- export PATH="$HOME/.local/bin:$PATH"
- ln -fs /usr/bin/gfortran-8 "$HOME/.local/bin/gfortran" && gfortran --version
- ls -l /usr/bin/gfortran-8
- ln -fs /usr/bin/gcc-8 "$HOME/.local/bin/gcc" && gcc --version
- ls -l /usr/bin/gcc-8
- ln -fs /usr/bin/g++-8 "$HOME/.local/bin/g++" && g++ --version
- ls -l /usr/bin/g++-8
- export CXX="g++"
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then pip install -r requirements27.travis.txt;
echo requests version1; python -c "import requests; print(requests.__version__)";
else pip install -r requirements.travis.txt; fi
- pip install https://github.com/modflowpy/pymake/zipball/master
- pip install --upgrade jupyter
- pip install nbconvert
- pip install nose-timer
- pip install coveralls
- pip install pylint
script:
- export PYTHONPATH=$PYTHONPATH:.
- echo python path; python -c "from __future__ import print_function; import sys;
print(sys.path)"
- python -c "import os; is_travis = 'TRAVIS' in os.environ; print('TRAVIS {}'.format(is_travis))"
- echo flopy version; python -c "from __future__ import print_function; import flopy;
print(flopy.__version__)"
- echo numpy version; python -c "import numpy; print(numpy.version.version)"
- echo pandas version; python -c "import pandas as pd; print(pd.__version__)"
- echo pyshp; python -c "import shapefile; print(shapefile.__version__)"
- echo nosetests version; nosetests --version
- echo jupyter version; jupyter --version
- echo jupyter runtime directory; jupyter --runtime-dir
- echo pylint version; pylint --version
- nosetests -v build_exes.py --with-id --with-timer -w ./autotest
- if [[ $TVER == PY37N ]]; then nosetests -v autotest_scripts.py --with-id --with-timer
-w ./autotest --with-coverage --cover-package=flopy; nosetests -v autotest_notebooks.py
--with-id --with-timer -w ./autotest --with-coverage --cover-package=flopy; else
nosetests -v --with-id --with-timer -w ./autotest --with-coverage --cover-package=flopy;
fi
after_success:
- coveralls
- if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then pylint --errors-only ./flopy; fi
- PYTHONPATH=$PYTHONPATH:.
install: ./travis/install.sh
before_script: ./travis/before_script.sh
script: ./travis/script.sh
after_success: coveralls
notifications:
slack:
secure: mwy5srgrEc1TWc5x0sOTGxVoSWSHYj8afkVyGtgVonI4b+816BIW0qLy7SIX46vtR+oexXoAWsYXmgNwItFWIDhP6uNN1o5yyVIU7WI68Y3k8KpdfNC90d2HIH3TIxdIR1ezrATOWDAGoG3lnprAI6I3zVVUga4EwUMnwc+/GoK3qluxp/0yEK114n2j7LuAXOzCgyuaaelPLrDwTo8ZIWLKaV3yg5oM/mYpP2PGbYsnvs+FpAfMN9GkEGzgDgATNs+O455s1Dx1cdxtgJVw91b74Fc+eOlk4Ywrdg6PcQYeHFLehSxXDkCkLYSjktDRvX07Dlg9CG3nr5y1RBB2p33L73A1kLUjEfvZB9yaYm3Pow9PxUDJcb//GAQauWiQZQw84mfHVqer3HBA8S5AwcWMHPUo2/9jfkyT7+tOAghUYLt2LdKnTXrf8ZFSG1NN4aR8RMUyxHFaXgVrCbWy35wl59fgoUY3q6IzNVjgobkJGeapVOeqiut2UHB6b6lNDEGoGr9dLcpB09IYEIDpVq5bqnflC3ZuihlzQS/k/EW/L2StFN3xIg7RumuEwvkhsOHxoeWcbfmQreGBwWrp2jP5Sl8q8Ymu2WcO4F6r3sC+9VaK8nEWR/CHurnnBsGqH6Inng00Y6cRp4gP1R9zIJNpxz51spZbspFAEzMpst4=
15 changes: 10 additions & 5 deletions README.md
@@ -1,11 +1,12 @@

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

### Version 3.2.12
### Version 3.2.13
[![Build Status](https://travis-ci.org/modflowpy/flopy.svg?branch=master)](https://travis-ci.org/modflowpy/flopy)
[![PyPI Version](https://img.shields.io/pypi/v/flopy.png)](https://pypi.python.org/pypi/flopy)
[![Coverage Status](https://coveralls.io/repos/github/modflowpy/flopy/badge.svg?branch=master)](https://coveralls.io/github/modflowpy/flopy?branch=master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b23a5edd021b4aa19e947545ab49e577)](https://www.codacy.com/app/jdhughes-usgs/flopy?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=modflowpy/flopy&amp;utm_campaign=Badge_Grade)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b23a5edd021b4aa19e947545ab49e577)](https://www.codacy.com/app/jdhughes-usgs/flopy?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=modflowpy/flopy&amp;utm_campaign=Badge_Grade)[![Binder](https://aws-uswest2-binder.pangeo.io/badge_logo.svg)](https://aws-uswest2-binder.pangeo.io/v2/gh/modflowpy/flopy.git/master)


Introduction
-----------------------------------------------
Expand Down Expand Up @@ -111,7 +112,7 @@ Installation

**Python versions:**

FloPy requires **Python** 2.7 or **Python** 3.3 (or higher)
FloPy requires **Python** 2.7 or **Python** 3.5 (or higher). **<span style="color:red" style="text-decoration:underline">Support for Python versions < 3.5 will be dropped in the next version of FloPy (version 3.3.0)</span>**


**Dependencies:**
Expand Down Expand Up @@ -200,7 +201,11 @@ Additional dependencies to use optional FloPy helper methods are listed below.
| `.loadtxt()` in `flopy.utils.flopyio` - ***used if available*** | **pandas** >= 0.15 |
| `.generate_classes()` in `flopy.mf6.utils` | [**pymake**](https://github.com/modflowpy/pymake) |
| `.intersect()` in `flopy.discretization.VertexGrid` | **matplotlib** >= 1.4 |

| `GridIntersect()` in `flopy.utils.gridintersect` | **shapely** |
| `GridIntersect().plot_polygon()` in `flopy.utils.gridintersect` | **shapely** and **descartes** |
| `Raster()` in `flopy.utils.Raster` | **rasterio**, **affine**, and **scipy** |
| `Raster().sample_polygon()` in `flopy.utils.Raster` | **shapely** |
| `Raster().crop()` in `flopy.utils.Raster` | **shapely** |

How to Cite
-----------------------------------------------
Expand All @@ -211,7 +216,7 @@ How to Cite

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

[Bakker, M., Post, V., Langevin, C.D., Hughes, J.D., White, J.T., Starn, J.J., and Fienen, M.N., 2019, FloPy v3.2.12: U.S. Geological Survey Software Release, 31 May 2019, http://dx.doi.org/10.5066/F7BK19FH](http://dx.doi.org/10.5066/F7BK19FH)
[Bakker, M., Post, V., Langevin, C.D., Hughes, J.D., White, J.T., Starn, J.J., and Fienen, M.N., 2019, FloPy v3.2.13: U.S. Geological Survey Software Release, 17 November 2019, http://dx.doi.org/10.5066/F7BK19FH](http://dx.doi.org/10.5066/F7BK19FH)


MODFLOW Resources
Expand Down
8 changes: 4 additions & 4 deletions autotest/t003_test.py
Expand Up @@ -112,7 +112,7 @@ def test_load_nam_mt_nonexistant_file():
test_loadoc_nstpfail()
test_load_nam_mf_nonexistant_file()
test_load_nam_mt_nonexistant_file()
# test_loadoc_lenfail()
# test_loadfreyberg()
# test_loadoahu()
# test_loadtwrip()
test_loadoc_lenfail()
test_loadfreyberg()
test_loadoahu()
test_loadtwrip()
17 changes: 15 additions & 2 deletions autotest/t004_test_utilarray.py
Expand Up @@ -685,8 +685,21 @@ def test_mflist():
sp_data = {0: [[1, 1, 1, 1.0], [1, 1, 2, 2.0], [1, 1, 3, 3.0]],
1: [1, 2, 4, 4.0]}
wel = flopy.modflow.ModflowWel(ml, stress_period_data=sp_data)
m4ds = ml.wel.stress_period_data.masked_4D_arrays
spd = wel.stress_period_data

# verify dataframe can be cast when spd.data.keys() != to ml.nper
# verify that dataframe is cast correctly by recreating spd.data items
df = wel.stress_period_data.get_dataframe()
for per, data in spd.data.items():
fluxcol = 'flux{}'.format(per)
dfper = df.dropna(subset=[fluxcol], axis=0).copy()
dfper.rename(columns={fluxcol: 'flux'}, inplace=True)
dfdata = dfper[['k', 'i', 'j', 'flux']].to_records(index=False)
dfdata = dfdata.astype(data.dtype)
errmsg = 'data not equal:\n {}\n {}'.format(dfdata, data)
assert np.array_equal(dfdata, data), errmsg

m4ds = ml.wel.stress_period_data.masked_4D_arrays
sp_data = flopy.utils.MfList.masked4D_arrays_to_stress_period_data \
(flopy.modflow.ModflowWel.get_default_dtype(), m4ds)
assert np.array_equal(sp_data[0], ml.wel.stress_period_data[0])
Expand Down Expand Up @@ -782,7 +795,7 @@ def test_util3d_reset():
# test_util2d_external_fixed_nomodelws()
# test_util2d_external_fixed_path_nomodelws()
# test_transient2d()
#test_transient3d()
# test_transient3d()
# test_util2d()
# test_util3d()
# test_how()

0 comments on commit 2a92634

Please sign in to comment.