Skip to content

Commit

Permalink
Merge pull request Geosyntec#37 from phobson/doc-strings
Browse files Browse the repository at this point in the history
updated docstrings
  • Loading branch information
phobson committed Apr 5, 2016
2 parents 016e4fd + 31c538e commit 5dd3e13
Show file tree
Hide file tree
Showing 28 changed files with 3,979 additions and 308 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ install:
# We just set up a conda environment with the right Python version. This
# should not need changing.

- conda create --yes -n test python=$TRAVIS_PYTHON_VERSION seaborn statsmodels numexpr openpyxl pyodbc nose mock
- conda create --yes -n test python=$TRAVIS_PYTHON_VERSION pandas=0.17 seaborn statsmodels numexpr openpyxl pyodbc nose mock
- source activate test
- conda install --yes --channel=phobson pybmpdb pynsqd
- conda install --yes coverage docopt requests pyyaml
- pip install coveralls
- pip install .

script:
- python tests.py --with-coverage --cover-package=pycvc --verbose
- python check_pycvc.py --verbose

after_success:
- if [ ${COVERAGE} = true ]; then coveralls; fi
File renamed without changes.
6 changes: 4 additions & 2 deletions conda.recipe/dev/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ requirements:
build:
- python
- setuptools
- wqio
- pandas=0.17
- wqio=0.3.2
- pybmpdb
- pynsqd
- pyodbc
Expand All @@ -24,7 +25,8 @@ requirements:

run:
- python
- wqio
- pandas=0.17
- wqio=0.3.2
- pybmpdb
- pynsqd
- pyodbc
Expand Down
6 changes: 4 additions & 2 deletions conda.recipe/release/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ requirements:
build:
- python
- setuptools
- wqio
- pandas=0.17
- wqio=0.3.2
- pybmpdb
- pynsqd
- pyodbc
Expand All @@ -25,7 +26,8 @@ requirements:

run:
- python
- wqio
- pandas=0.17
- wqio=0.3.2
- pybmpdb
- pynsqd
- pyodbc
Expand Down
8 changes: 6 additions & 2 deletions examples/1a - Prepare Tidy Data (simple method).ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"outputs": [],
"source": [
"cvcdbfile = \"C:/users/phobson/Desktop/scratch/cvc/cvc.accdb\"\n",
"cvcdb = pycvc.Database(cvcdbfile, nsqdata, bmpdb, testing=False)"
"cvcdb = pycvc.Database(cvcdbfile, nsqdata, bmpdb)"
]
},
{
Expand Down Expand Up @@ -380,6 +380,9 @@
"metadata": {},
"source": [
"## Export project-wide tidy datasets\n",
"No decisions are made about excluding exceptional storm events at thise point.\n",
"\n",
"That is deffered to when the data is loaded in other notebooks.\n",
"\n",
"### Hydrologic (storm) data"
]
Expand Down Expand Up @@ -433,7 +436,8 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": false,
"scrolled": true
},
"outputs": [],
"source": [
Expand Down
4 changes: 2 additions & 2 deletions examples/1b - Prepare Tidy Data (SWMM models).ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"outputs": [],
"source": [
"cvcdbfile = \"C:/users/phobson/Desktop/scratch/cvc/cvc.accdb\"\n",
"cvcdb = pycvc.Database(cvcdbfile, nsqdata, bmpdb, testing=False)"
"cvcdb = pycvc.Database(cvcdbfile, nsqdata, bmpdb)"
]
},
{
Expand Down Expand Up @@ -274,7 +274,7 @@
" return newcol.replace(' nsqd ', ' ').replace(' effluent ', ' ')\n",
"\n",
"LV_Influent = (\n",
" LV1.medians(\"concentration\", timegroup='season')\n",
" LV1.medians(\"concentration\", groupby_col='season')\n",
" .rename(columns={'effluent stat': 'median'})\n",
" .rename(columns=rename_influent_cols)\n",
")\n",
Expand Down
11 changes: 0 additions & 11 deletions examples/3 - Water Quality Summaries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -353,17 +353,6 @@
"### Boxplots with external sources"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"bmptidy.head()\n"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
17 changes: 11 additions & 6 deletions examples/4 - Storm Depth Histograms Examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
},
"outputs": [],
"source": [
"pycvc.viz.hydro_histogram(hydro, hue='site', row='has_outflow')"
"fg = pycvc.viz.hydro_histogram(hydro, hue='site', row='has_outflow', save=False)\n",
"pycvc.viz.savefig(fg.fig, 'Hist_Site_Outflow', extra='HydroHistogram')"
]
},
{
Expand All @@ -80,13 +81,15 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": false,
"scrolled": true
},
"outputs": [],
"source": [
"pycvc.viz.hydro_histogram(hydro, row='site', col='has_outflow', hue='season',\n",
"fg = pycvc.viz.hydro_histogram(hydro, row='site', col='has_outflow', hue='season',\n",
" hue_order=['winter', 'spring', 'summer', 'autumn'],\n",
" margin_titles=True, palette='BrBG_r')\n"
" margin_titles=True, palette='BrBG_r', save=False)\n",
"pycvc.viz.savefig(fg.fig, 'Hist_Site_Outflow_Season', extra='HydroHistogram')"
]
},
{
Expand All @@ -104,7 +107,8 @@
},
"outputs": [],
"source": [
"pycvc.viz.hydro_histogram(hydro, col='site', hue='year', col_wrap=2)"
"fg = pycvc.viz.hydro_histogram(hydro, col='site', hue='year', col_wrap=2, save=False)\n",
"pycvc.viz.savefig(fg.fig, 'Hist_Site_Year', extra='HydroHistogram')"
]
},
{
Expand All @@ -122,7 +126,8 @@
},
"outputs": [],
"source": [
"pycvc.viz.hydro_histogram(hydro.query(\"site == 'ED-1'\"), palette='Blues')"
"fg = pycvc.viz.hydro_histogram(hydro.query(\"site == 'ED-1'\"), palette='Blues', save=False)\n",
"pycvc.viz.savefig(fg.fig, 'Hist_ED1only', extra='HydroHistogram')"
]
}
],
Expand Down
Loading

0 comments on commit 5dd3e13

Please sign in to comment.