Skip to content

Commit 845e28a

Browse files
authored
Merge pull request #46 from phobson/minor-doc-typos
fix minor doc typos
2 parents 801b29f + e06fe7c commit 845e28a

File tree

13 files changed

+108
-109
lines changed

13 files changed

+108
-109
lines changed

.travis.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ matrix:
2424
- ARGS="--mpl --verbose --pep8"
2525

2626
before_install:
27-
28-
# Here we just install Miniconda, which you shouldn't have to change.
29-
3027
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
3128
- chmod +x miniconda.sh
3229
- ./miniconda.sh -b -p $HOME/miniconda
@@ -35,10 +32,6 @@ before_install:
3532
- conda install --yes nomkl
3633

3734
install:
38-
39-
# We just set up a conda environment with the right Python version. This
40-
# should not need changing.
41-
4235
- conda create --yes -n test python=$TRAVIS_PYTHON_VERSION numpy matplotlib docopt requests pyyaml
4336
- source activate test
4437
- conda install --yes --channel=conda-forge pytest-mpl pytest-cov pytest-pep8 ${EXTRATESTERS}

conda.recipe/meta.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
package:
22
name: mpl-probscale
3-
version: 0.2.2dev
3+
version: 0.2.3
44

55
source:
66
path: ../
77

88
build:
99
script: python setup.py install
10-
number: 1
10+
number: 0
1111

1212
requirements:
1313
build:

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@
8585
# built documents.
8686
#
8787
# The short X.Y version.
88-
version = '0.2.2'
88+
version = '0.2.3'
8989
# The full version, including alpha/beta/rc tags.
90-
release = '0.2.2'
90+
release = '0.2.3'
9191

9292
# The language for content autogenerated by Sphinx. Refer to documentation
9393
# for a list of supported languages.

docs/tutorial/Makefile

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/tutorial/closer_look_at_plot_pos.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
"Additionally, we'll compute the plotting positions two different but commone ways for each plot.\n",
141141
"\n",
142142
"First, in blue circles, we'll show the data with Weibull (α=0, β=0) plotting positions.\n",
143-
"Weibull plotting positions are commonly use in my field, water resources engineering.\n",
143+
"Weibull plotting positions are commonly use in fields such as hydrology and water resources engineering.\n",
144144
"\n",
145145
"In green squares, we'll use Cunnane (α=0.4, β=0.4) plotting positions.\n",
146146
"Cunnane plotting positions are good for normally distributed data and are the default values."
@@ -154,8 +154,8 @@
154154
},
155155
"outputs": [],
156156
"source": [
157-
"w_opts = {'label': 'Weibull (α=0, β=0)', 'marker': 'o', 'markeredgecolor': 'b'}\n",
158-
"c_opts = {'label': 'Cunnane (α=0.4, β=0.4)', 'marker': 's', 'markeredgecolor': 'g'}\n",
157+
"w_opts = {'label': 'Weibull (a=0, b=0)', 'marker': 'o', 'markeredgecolor': 'b'}\n",
158+
"c_opts = {'label': 'Cunnane (a=0.4, b=0.4)', 'marker': 's', 'markeredgecolor': 'g'}\n",
159159
"\n",
160160
"common_opts = {\n",
161161
" 'markerfacecolor': 'none',\n",
@@ -198,7 +198,7 @@
198198
},
199199
"outputs": [],
200200
"source": [
201-
"h_opts = {'label': 'Hazen (α=0.5, β=0.5)', 'marker': '^', 'markeredgecolor': 'r'}\n",
201+
"h_opts = {'label': 'Hazen (a=0.5, b=0.5)', 'marker': '^', 'markeredgecolor': 'r'}\n",
202202
"fig, (ax1, ax2) = pyplot.subplots(figsize=(10, 8), ncols=2, sharex=True, sharey=False)\n",
203203
"\n",
204204
"for dist, ax in zip([None, weibull], [ax1, ax2]):\n",
@@ -280,9 +280,9 @@
280280
"metadata": {
281281
"anaconda-cloud": {},
282282
"kernelspec": {
283-
"display_name": "Python [default]",
283+
"display_name": "probscale",
284284
"language": "python",
285-
"name": "python3"
285+
"name": "probscale"
286286
},
287287
"language_info": {
288288
"codemirror_mode": {

docs/tutorial/closer_look_at_viz.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"\n",
99
"## Overview\n",
1010
"\n",
11-
"The `probscale.probplot` function lets you do a couple of things. They are:\n",
11+
"The `probscale.probplot` function let's you do a couple of things. They are:\n",
1212
"\n",
1313
" 1. Creating percentile, quantile, or probability plots.\n",
1414
" 1. Placing your probability scale either axis.\n",
@@ -200,7 +200,7 @@
200200
" scatter_kws=dict(marker='.', linestyle='none', label='Bill Amount'))\n",
201201
"\n",
202202
"fig = probscale.probplot(tips['total_bill'], ax=ax2, plottype='qq', probax='y',\n",
203-
" datascale='log', problabel='Normal Quantiles',datalabel='Total Bill (USD)',\n",
203+
" datascale='log', problabel='Normal Quantiles', datalabel='Total Bill (USD)',\n",
204204
" scatter_kws=dict(marker='.', linestyle='none', label='Bill Amount'))\n",
205205
"ax.legend(loc='upper left')\n",
206206
"fig.tight_layout()\n",
@@ -708,9 +708,9 @@
708708
"metadata": {
709709
"anaconda-cloud": {},
710710
"kernelspec": {
711-
"display_name": "Python [default]",
711+
"display_name": "probscale",
712712
"language": "python",
713-
"name": "python3"
713+
"name": "probscale"
714714
},
715715
"language_info": {
716716
"codemirror_mode": {

docs/tutorial/getting_started.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,11 @@
208208
"\n",
209209
"beta1 = stats.beta(a=3, b=2)\n",
210210
"ax2.set_xscale('prob', dist=beta1)\n",
211-
"ax2.set_xlabel('Beta probability scale (α=3, β=2)')\n",
211+
"ax2.set_xlabel('Beta probability scale (a=3, b=2)')\n",
212212
"\n",
213213
"beta2 = stats.beta(a=2, b=7)\n",
214214
"ax3.set_xscale('prob', dist=beta2)\n",
215-
"ax3.set_xlabel('Beta probability scale (α=2, β=7)')\n",
215+
"ax3.set_xlabel('Beta probability scale (a=2, b=7)')\n",
216216
"\n",
217217
"ax4.set_xticks(ax1.get_xticks()[12:-12])\n",
218218
"ax4.set_xlabel('Linear scale (for reference)')\n",
@@ -379,9 +379,9 @@
379379
"metadata": {
380380
"anaconda-cloud": {},
381381
"kernelspec": {
382-
"display_name": "Python [default]",
382+
"display_name": "probscale",
383383
"language": "python",
384-
"name": "python3"
384+
"name": "probscale"
385385
},
386386
"language_info": {
387387
"codemirror_mode": {

docs/tutorial/make.py

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import os
2+
import glob
3+
4+
import nbformat
5+
from nbconvert import RSTExporter, preprocessors
6+
7+
8+
def cache(nbfile):
9+
basename, _ = os.path.splitext(nbfile)
10+
bakfile = basename + '.bak'
11+
with open(nbfile, 'r') as nb, open(bakfile, 'w') as bak:
12+
bak.write(nb.read())
13+
return bakfile
14+
15+
16+
def process(nbfile, processor):
17+
meta = {'metadata': {'path': '.'}}
18+
with open(nbfile, 'r') as nbf:
19+
nbook = nbformat.read(nbf, as_version=4)
20+
21+
runner = processor(timeout=600, kernel_name='probscale')
22+
runner.preprocess(nbook, meta)
23+
24+
with open(nbfile, 'w') as nbf:
25+
nbformat.write(nbook, nbf)
26+
27+
28+
def convert(nbfile):
29+
basename, _ = os.path.splitext(nbfile)
30+
img_folder = basename + '_files'
31+
os.makedirs(img_folder, exist_ok=True)
32+
print("\tconverting " + nbfile)
33+
34+
with open(nbfile, 'r') as nb:
35+
nbdata = nbformat.reads(nb.read(), as_version=4)
36+
37+
rst = RSTExporter()
38+
body_raw, images = rst.from_notebook_node(nbdata)
39+
body_final = body_raw.replace('.. image:: ', '.. image:: {}/'.format(img_folder))
40+
41+
with open(basename + '.rst', 'w') as rst_out:
42+
rst_out.write(body_final)
43+
44+
for img_name, img_data in images['outputs'].items():
45+
img_path = os.path.join(img_folder, img_name)
46+
with open(img_path, 'wb') as img:
47+
print('\twriting ' + img_path)
48+
img.write(img_data)
49+
50+
51+
if __name__ == '__main__':
52+
for nbfile in glob.glob('*.ipynb'):
53+
bak = cache(nbfile)
54+
success = False
55+
try:
56+
process(nbfile, preprocessors.ExecutePreprocessor)
57+
convert(nbfile)
58+
success = True
59+
finally:
60+
process(nbfile, preprocessors.ClearOutputPreprocessor)
61+
if success:
62+
os.remove(bak)

docs/tutorial/tools/nb_to_doc.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

docs/tutorial/tools/nbstripout

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)