Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into sed-flux-dep
HUGE code update. Tests pass. The sed_flux_dep eroder is 100% ported from the 2016 master, so may be troublesome with existing drivers from 2014. # Conflicts: # .gitignore # landlab/components/stream_power/examples/drive_sp_params_storms.txt # landlab/components/stream_power/examples/perturb_sed_flux_dep.py # landlab/components/stream_power/examples/perturb_sp_driver.py # landlab/components/stream_power/examples/perturb_sp_storms.py # landlab/components/stream_power/examples/simple_sp_driver.py # landlab/components/stream_power/examples/test_sed_flux_dep.py # landlab/components/stream_power/sed_flux_dep_incision.py # landlab/components/transport_limited_fluvial/tl_fluvial_monodirectional_ v3.py # landlab/plot/channel_profile.py
- Loading branch information
1 parent
30d63cf
commit 22ff8f5
Showing
557 changed files
with
65,556 additions
and
20,871 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
if (($env:appveyor_repo_tag -eq "true") -and ($env:appveyor_repo_tag_name.StartsWith("v"))) { | ||
write-output "Deploying to PyPI..." | ||
Invoke-Expression "twine upload -u mcflugen -p $env:PYPI_PASS dist/*" | ||
write-output "OK" | ||
} else { | ||
write-output "Not deploying." | ||
write-output "Is a tagged commit... $env:appveyor_repo_tag" | ||
if (($env:appveyor_repo_tag -eq "true")) { | ||
write-output "Tag name... $env:appveyor_repo_tag_name" | ||
} | ||
write-output "Branch name... $env:appveyor_repo_branch" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Sample script to install anaconda under windows | ||
# Authors: Stuart Mumford | ||
# Borrwed from: Olivier Grisel and Kyle Kastner | ||
# License: BSD 3 clause | ||
|
||
$MINICONDA_URL = "http://repo.continuum.io/miniconda/" | ||
|
||
function DownloadMiniconda ($version, $platform_suffix) { | ||
$webclient = New-Object System.Net.WebClient | ||
$filename = "Miniconda-" + $version + "-Windows-" + $platform_suffix + ".exe" | ||
|
||
$url = $MINICONDA_URL + $filename | ||
|
||
$basedir = $pwd.Path + "\" | ||
$filepath = $basedir + $filename | ||
if (Test-Path $filename) { | ||
Write-Host "Reusing" $filepath | ||
return $filepath | ||
} | ||
|
||
# Download and retry up to 3 times in case of network transient errors. | ||
Write-Host "Downloading" $filename "from" $url | ||
$retry_attempts = 2 | ||
for($i=0; $i -lt $retry_attempts; $i++){ | ||
try { | ||
$webclient.DownloadFile($url, $filepath) | ||
break | ||
} | ||
Catch [Exception]{ | ||
Start-Sleep 1 | ||
} | ||
} | ||
if (Test-Path $filepath) { | ||
Write-Host "File saved at" $filepath | ||
} else { | ||
# Retry once to get the error message if any at the last try | ||
$webclient.DownloadFile($url, $filepath) | ||
} | ||
return $filepath | ||
} | ||
|
||
function InstallMiniconda ($python_version, $architecture, $python_home) { | ||
Write-Host "Installing miniconda" $python_version "for" $architecture "bit architecture to" $python_home | ||
if (Test-Path $python_home) { | ||
Write-Host $python_home "already exists, skipping." | ||
return $false | ||
} | ||
if ($architecture -eq "x86") { | ||
$platform_suffix = "x86" | ||
} else { | ||
$platform_suffix = "x86_64" | ||
} | ||
$filepath = DownloadMiniconda $python_version $platform_suffix | ||
Write-Host "Installing" $filepath "to" $python_home | ||
$args = "/InstallationType=AllUsers /S /AddToPath=1 /RegisterPython=1 /D=" + $python_home | ||
Write-Host $filepath $args | ||
Start-Process -FilePath $filepath -ArgumentList $args -Wait -Passthru | ||
#Start-Sleep -s 15 | ||
if (Test-Path C:\conda) { | ||
Write-Host "Miniconda $python_version ($architecture) installation complete" | ||
} else { | ||
Write-Host "Failed to install Python in $python_home" | ||
Exit 1 | ||
} | ||
} | ||
|
||
function main () { | ||
InstallMiniconda $env:MINICONDA_VERSION $env:PLATFORM $env:PYTHON | ||
} | ||
|
||
main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# Sample script to install Miniconda under Windows | ||
# Authors: Olivier Grisel, Jonathan Helmus and Kyle Kastner, Robert McGibbon | ||
# License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/ | ||
|
||
$MINICONDA_URL = "http://repo.continuum.io/miniconda/" | ||
|
||
|
||
function DownloadMiniconda ($python_version, $platform_suffix) { | ||
$webclient = New-Object System.Net.WebClient | ||
if ($python_version -match "3.4") { | ||
$filename = "Miniconda3-3.5.5-Windows-" + $platform_suffix + ".exe" | ||
} else { | ||
$filename = "Miniconda-3.5.5-Windows-" + $platform_suffix + ".exe" | ||
} | ||
$url = $MINICONDA_URL + $filename | ||
|
||
$basedir = $pwd.Path + "\" | ||
$filepath = $basedir + $filename | ||
if (Test-Path $filename) { | ||
Write-Host "Reusing" $filepath | ||
return $filepath | ||
} | ||
|
||
# Download and retry up to 3 times in case of network transient errors. | ||
Write-Host "Downloading" $filename "from" $url | ||
$retry_attempts = 2 | ||
for($i=0; $i -lt $retry_attempts; $i++){ | ||
try { | ||
$webclient.DownloadFile($url, $filepath) | ||
break | ||
} | ||
Catch [Exception]{ | ||
Start-Sleep 1 | ||
} | ||
} | ||
if (Test-Path $filepath) { | ||
Write-Host "File saved at" $filepath | ||
} else { | ||
# Retry once to get the error message if any at the last try | ||
$webclient.DownloadFile($url, $filepath) | ||
} | ||
return $filepath | ||
} | ||
|
||
|
||
function InstallMiniconda ($python_version, $architecture, $python_home) { | ||
Write-Host "Installing Python" $python_version "for" $architecture "bit architecture to" $python_home | ||
if (Test-Path $python_home) { | ||
Write-Host $python_home "already exists, skipping." | ||
return $false | ||
} | ||
if ($architecture -match "32") { | ||
$platform_suffix = "x86" | ||
} else { | ||
$platform_suffix = "x86_64" | ||
} | ||
|
||
$filepath = DownloadMiniconda $python_version $platform_suffix | ||
Write-Host "Installing" $filepath "to" $python_home | ||
$install_log = $python_home + ".log" | ||
$args = "/S /D=$python_home" | ||
Write-Host $filepath $args | ||
Start-Process -FilePath $filepath -ArgumentList $args -Wait -Passthru | ||
if (Test-Path $python_home) { | ||
Write-Host "Python $python_version ($architecture) installation complete" | ||
} else { | ||
Write-Host "Failed to install Python in $python_home" | ||
Get-Content -Path $install_log | ||
Exit 1 | ||
} | ||
} | ||
|
||
|
||
function InstallCondaPackages ($python_home, $spec) { | ||
$conda_path = $python_home + "\Scripts\conda.exe" | ||
$args = "install --yes " + $spec | ||
Write-Host ("conda " + $args) | ||
Start-Process -FilePath "$conda_path" -ArgumentList $args -Wait -Passthru | ||
} | ||
|
||
function UpdateConda ($python_home) { | ||
$conda_path = $python_home + "\Scripts\conda.exe" | ||
Write-Host "Updating conda..." | ||
$args = "update --yes conda" | ||
Write-Host $conda_path $args | ||
Start-Process -FilePath "$conda_path" -ArgumentList $args -Wait -Passthru | ||
} | ||
|
||
|
||
function main () { | ||
InstallMiniconda $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON | ||
UpdateConda $env:PYTHON | ||
InstallCondaPackages $env:PYTHON "conda-build=1.4.0 pip jinja2 binstar" | ||
InstallCondaPackages $env:PYTHON "conda-build=1.4.0 scipy>=0.12 numpy nose>=1.3 matplotlib netCDF4 sympy pandas cython>=0.22 wheel" | ||
} | ||
|
||
main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
@echo off | ||
:: To build extensions for 64 bit Python 3, we need to configure environment | ||
:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of: | ||
:: MS Windows SDK for Windows 7 and .NET Framework 4 | ||
:: | ||
:: More details at: | ||
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows | ||
:: | ||
SET COMMAND_TO_RUN=%* | ||
SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows | ||
SET MAJOR_PYTHON_VERSION="%PYTHON_VERSION:~0,1%" | ||
SET WINDOWS_SDK_VERSION="v7.0" | ||
IF %MAJOR_PYTHON_VERSION%=="3" ( | ||
SET WINDOWS_SDK_VERSION="v7.1" | ||
) | ||
ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% | ||
|
||
IF "%DISTUTILS_USE_SDK%"=="1" ( | ||
|
||
IF "%PLATFORM%"=="x64" ( | ||
ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture | ||
SET MSSdk=1 | ||
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION% | ||
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release | ||
ECHO Executing: %COMMAND_TO_RUN% | ||
call %COMMAND_TO_RUN% || EXIT 1 | ||
) ELSE ( | ||
ECHO Using default MSVC build environment for 32 bit architecture | ||
ECHO Executing: %COMMAND_TO_RUN% | ||
call %COMMAND_TO_RUN% || EXIT 1 | ||
) | ||
) ELSE ( | ||
ECHO Using default MSVC build environment | ||
ECHO Executing: %COMMAND_TO_RUN% | ||
call %COMMAND_TO_RUN% || EXIT 1 | ||
) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
if [[ "$TRAVIS_TAG" == v* && "$TRAVIS_BRANCH" == "release" ]]; then | ||
echo "Installing deployment requirements." | ||
pip install twine wheel | ||
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then | ||
echo "Creating a source distribution." | ||
python setup.py sdist | ||
else | ||
echo "Creating a binary wheel distribution." | ||
python setup.py bdist_wheel | ||
fi | ||
echo "Uploading to PyPI." | ||
twine upload -u mcflugen -p$PYPI_PASS dist/* | ||
echo "Done." | ||
else | ||
echo "Not deploying." | ||
echo "Tag is... $TRAVIS_TAG" | ||
echo "Branch name is... $TRAVIS_BRANCH" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#! /bin/bash | ||
|
||
PYTHON=${PYTHON:-python} | ||
|
||
run_test() | ||
{ | ||
mkdir -p _test | ||
cd _test | ||
|
||
INSTALLDIR=$($PYTHON -c "import os; import landlab; print(os.path.dirname(landlab.__file__))") | ||
|
||
coverage run --source=$INSTALLDIR ../scripts/test-installed-landlab.py && (coverage report && cp .coverage ..) | ||
} | ||
|
||
run_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
languages: | ||
Python: true | ||
exclude_paths: | ||
- "docs/*" | ||
- "scripts/*" | ||
- "landlab/components/**/*" | ||
- "landlab/examples/*" | ||
- "landlab/**/test_*.py" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ignore-patterns: | ||
- ez_setup.py | ||
- setup.py | ||
ignore-paths: | ||
- docs | ||
strictness: veryhigh | ||
doc-warnings: True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,50 @@ | ||
language: python | ||
python: | ||
- "2.6" | ||
- "2.7" | ||
- "3.3" | ||
- "3.4" | ||
env: | ||
matrix: | ||
- TRAVIS_PYTHON_VERSION="2.6" NUMPY_VERSION="1.9" | ||
- TRAVIS_PYTHON_VERSION="2.7" NUMPY_VERSION="1.9" | ||
- TRAVIS_PYTHON_VERSION="2.7" NUMPY_VERSION="1.10" | ||
- TRAVIS_PYTHON_VERSION="3.3" NUMPY_VERSION="1.9" | ||
- TRAVIS_PYTHON_VERSION="3.4" NUMPY_VERSION="1.9" | ||
- TRAVIS_PYTHON_VERSION="3.4" NUMPY_VERSION="1.10" | ||
- TRAVIS_PYTHON_VERSION="3.5" NUMPY_VERSION="1.9" | ||
- TRAVIS_PYTHON_VERSION="3.5" NUMPY_VERSION="1.10" | ||
global: | ||
secure: UxPkdFKl0xtk+H+98CNHSnYN8SJrEq5xJjLtPUPR+5UF5lLKL7godwrOdYeO0B0fXPi2Plw0vtoIID6H1AV4x+8QD/AgAizoWIh8KLim3E7rDX0v0M3WnUHctvYwt76mGCYvIGH6qR2Ziml37Ec6nz2aTuz0oex27P6dq0BKkXs= | ||
os: | ||
- linux | ||
- osx | ||
|
||
- linux | ||
- osx | ||
matrix: | ||
allow_failures: | ||
- os: osx | ||
env: TRAVIS_PYTHON_VERSION="2.6" NUMPY_VERSION="1.9" | ||
sudo: false | ||
install: | ||
- echo "Build on $TRAVIS_OS_NAME for Python $TRAVIS_PYTHON_VERSION" | ||
- bash .travis/install_python.sh | ||
- export PATH="$HOME/miniconda/bin:$PATH" | ||
- source activate test-env | ||
- pip install coveralls | ||
- if [[ "$TRAVIS_PYTHON_VERSION" == 3.* ]]; then | ||
bash .travis/convert_to_python_3.sh; | ||
fi | ||
- python setup.py install | ||
|
||
script: | ||
- (cd docs && make html) | ||
- nosetests --with-coverage --cover-package=landlab | ||
|
||
- echo "Build on $TRAVIS_OS_NAME for Python $TRAVIS_PYTHON_VERSION" | ||
- bash .ci/travis/install_python.sh | ||
- export PATH="$HOME/miniconda/bin:$PATH" | ||
- source activate test-env | ||
- pip install coveralls | ||
- conda install numpy=$NUMPY_VERSION | ||
- conda install scipy | ||
- python setup.py install | ||
script: | ||
- if [[ "$TRAVIS_PYTHON_VERSION" == 2.7 ]]; then (cd docs && make html 2> /dev/null); fi | ||
- bash .ci/travis/run_travis_test.sh | ||
virtualenv: | ||
system_site_packages: false | ||
|
||
after_success: | ||
coveralls | ||
- bash .ci/travis/deploy_to_pypi.sh | ||
- coveralls | ||
deploy: | ||
provider: pypi | ||
user: mcflugen | ||
password: | ||
secure: V15DceMv4DUmjgxToaxrP3KaQxsLbfrTkB1s6D8YNQZvYJiVvNlBpC1nF8yWbOt3IWJQSGjaQEnObd2ZhHe2Kq/H+QsEFyBKlYF7SNp35FyS5zLuf2qhnNhmzhqkspwBpiGe88c1PQPFzfqdIUQXp7ZAv6L8YRvNy2sbzvgxh6I= | ||
on: | ||
tags: true | ||
branch: release | ||
repo: landlab/landlab | ||
distributions: sdist bdist_wheel | ||
notifications: | ||
slack: | ||
secure: gRKbqjPgp0ZcFtecHOwjLAFbzzBr2zyFrxk7OAS/cea/9U8bLQNA0jZs3ZHtAgR53gdnFlx/GI10d/KD9XMKU55gQkO4FSvfYMK7Xzs2tfnEa5flTqQKRfjB1oJ2fmb81yshUe+xKsXBoedP7SPYv2mutMOY8srKwUcuE0yGmAw= |
Oops, something went wrong.