Skip to content

Commit

Permalink
Merge pull request #19 from ericbarefoot/separate_bmi
Browse files Browse the repository at this point in the history
Separate BMI wrapper from core model
  • Loading branch information
ericbarefoot committed Apr 23, 2020
2 parents 4088c68 + 9a328b6 commit 8117c2d
Show file tree
Hide file tree
Showing 34 changed files with 1,197 additions and 811 deletions.
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
deltaRCM_Output/

### a standard OSX .gitignore ###

# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

#################

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ python:
# command to install dependencies
install:
- pip install pytest
- pip install -r requirements.txt
# command to run tests
script:
- python setup.py install
# - pip install -e .
- pytest

jobs:
Expand All @@ -16,14 +18,16 @@ jobs:
python: "3.8"
install:
- pip install -r requirements.txt
- pip install -e .
- pip install pytest pytest-cov coveralls
script: pytest --cov=pyDeltaRCM/
after_success:
- coveralls
- stage: docs
python: "3.8"
install:
- pip install -r requirements.txt
- pip install -r requirements.txt
- pip install -e .
- pip install sphinx sphinx-automodapi
- sudo apt update -y && sudo apt install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended dvipng
script: (cd docs && make html)
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
recursive-include pyDeltaRCM *.yml
exclude *.yml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pyDeltaRCM_WMT

[![Build Status](https://travis-ci.com/DeltaRCM/pyDeltaRCM_WMT.svg?branch=develop)](https://travis-ci.org/DeltaRCM/pyDeltaRCM_WMT)
[![Build Status](https://travis-ci.com/DeltaRCM/pyDeltaRCM_WMT.svg?branch=develop)](https://travis-ci.com/DeltaRCM/pyDeltaRCM_WMT)

[![Coverage Status](https://coveralls.io/repos/github/DeltaRCM/pyDeltaRCM_WMT/badge.svg?branch=develop)](https://coveralls.io/github/DeltaRCM/pyDeltaRCM_WMT?branch=develop)

Expand Down
33 changes: 0 additions & 33 deletions deltaRCM.yaml

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
# ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx_automodapi.automodapi',
'sphinx.ext.napoleon',
'sphinx.ext.graphviz',
'sphinx.ext.imgmath',
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
27 changes: 27 additions & 0 deletions docs/source/guides/userguide.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
**********
User Guide
**********

Guide to users!


Configuring the input yaml file
===============================

The configuration for a pyDeltaRCM run is set up by a parameter set, described in the ``yaml`` markup format.
To configure a run, you should create a file called, for example, ``run_parameters.yml``.
Inside this file you can specify parameters for your run, with each parameter on a new line. For example, if ``run_parameters.yml`` contained the line:

.. code-block:: yaml
S0: 0.005
then a :obj:`~pyDeltaRCM.deltaRCM_driver.pyDeltaRCM` model instance initialized with this file specified as ``input_file`` will have a slope of 0.005.
Multiple parameters can be specified line by line.

Default values are substituted for any parameter not explicitly given in the ``input_file`` ``.yaml`` file.
Default values are defined as:

.. literalinclude:: ../../../pyDeltaRCM/default.yml
:language: yaml
:linenos:
6 changes: 3 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ User documentation
.. toctree::
:maxdepth: 2

reference/getting_started
reference/userguide
guides/getting_started
guides/userguide


Developer documentation
Expand All @@ -28,5 +28,5 @@ Developer documentation
.. toctree::
:maxdepth: 2

reference/devguide
guides/devguide
reference/index
4 changes: 4 additions & 0 deletions docs/source/meta/conduct.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
***************
Code of Conduct
***************


.. include:: ../../../CODE_OF_CONDUCT.rst
5 changes: 0 additions & 5 deletions docs/source/reference/userguide.rst

This file was deleted.

11 changes: 10 additions & 1 deletion ez_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ def download_file_powershell(url, target):
ps_cmd = (
"[System.Net.WebRequest]::DefaultWebProxy.Credentials = "
"[System.Net.CredentialCache]::DefaultCredentials; "
'(new-object System.Net.WebClient).DownloadFile("%(url)s", "%(target)s")'
'(new-object System.Net.WebClient).DownloadFile("%(url)s", \
"%(target)s")'
% locals()
)
cmd = [
Expand All @@ -254,6 +255,8 @@ def has_powershell():
except Exception:
return False
return True


download_file_powershell.viable = has_powershell


Expand All @@ -270,6 +273,8 @@ def has_curl():
except Exception:
return False
return True


download_file_curl.viable = has_curl


Expand All @@ -286,6 +291,8 @@ def has_wget():
except Exception:
return False
return True


download_file_wget.viable = has_wget


Expand All @@ -301,6 +308,8 @@ def download_file_insecure(url, target):
# Write all the data in one block to avoid creating a partial file.
with open(target, "wb") as dst:
dst.write(data)


download_file_insecure.viable = lambda: True


Expand Down
Loading

0 comments on commit 8117c2d

Please sign in to comment.