Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify Travis CI setup and parts of Python tests #53

Merged
merged 3 commits into from
Apr 15, 2019

Conversation

mwtoews
Copy link
Collaborator

@mwtoews mwtoews commented Apr 11, 2019

There are a few testing-related things going on with this PR. First, with Travis CI:

  • Change language from c to python to take advantage of built-in features for that language; there is no advantage of using c (also fortran is not a supported language)
  • Use xenial build environment, because it's modern, same speed and fully supported
  • No such thing as apt: true cache
  • Use FC environment variable to control gfortran version and symbolic link identified by pymake
  • Replace miniconda with xenial's Python 3.7

And with the Python testing:

  • Replace assert np.allclose with np.testing.assert_allclose, which provides a nice concise output of differences (if necessary). This required specifying the rtol=1e-05 in a few places for some tests to behave the same as np.allclose.
  • Simplify UZT_NonEq/insert_stopflow_period.py to use conventional Python features. It also now works with Python 2.7 (if that's needed)

to concisely quantify differences in testing.

Note that rtol and atol defaults for each function are different:
 - np.allclose: rtol=1e-05, atol=1e-08
 - np.testing.assert_allclose: rtol=1e-07, atol=0
Also allow script to run in current directory
@emorway-usgs emorway-usgs merged commit fde2c25 into MODFLOW-USGS:develop Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants