Skip to content

Commit 887dcd0

Browse files
authored
Merge branch 'master' into restructure
2 parents 3569941 + 279d4d6 commit 887dcd0

14 files changed

+2355
-149
lines changed

.azure-pipelines/azure-pipelines.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
jobs:
2+
- job: macOS
3+
strategy:
4+
matrix:
5+
py37:
6+
python.version: "3.7"
7+
py36:
8+
python.version: "3.6"
9+
pool:
10+
vmImage: macOS-10.14
11+
steps:
12+
# https://docs.microsoft.com/en-us/azure/devops/pipelines/languages/anaconda?view=azure-devops&tabs=macos
13+
- bash: echo "##vso[task.prependpath]$CONDA/bin"
14+
displayName: Add conda to PATH
15+
16+
# On Hosted macOS, the agent user doesn't have ownership of Miniconda's installation directory/
17+
# We need to take ownership if we want to update conda or install packages globally
18+
- bash: sudo chown -R $USER $CONDA
19+
displayName: Take ownership of conda installation
20+
- template: templates/setup-script-nix.yml
21+
- template: templates/nb-docs-nix.yml
22+
23+
- job: linux
24+
strategy:
25+
matrix:
26+
py37:
27+
python.version: "3.7"
28+
py36:
29+
python.version: "3.6"
30+
pool:
31+
vmImage: ubuntu-16.04
32+
steps:
33+
# https://docs.microsoft.com/en-us/azure/devops/pipelines/languages/anaconda?view=azure-devops&tabs=ubuntu-16-04
34+
- bash: echo "##vso[task.prependpath]$CONDA/bin"
35+
displayName: Add conda to PATH
36+
37+
- template: templates/setup-script-nix.yml
38+
- template: templates/nb-docs-nix.yml
39+
40+
- job: windows
41+
strategy:
42+
matrix:
43+
py37:
44+
python.version: "3.7"
45+
py36:
46+
python.version: "3.6"
47+
pool:
48+
vmImage: vs2017-win2016
49+
steps:
50+
# https://docs.microsoft.com/en-us/azure/devops/pipelines/languages/anaconda?view=azure-devops&tabs=vs2017
51+
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
52+
displayName: Add conda to PATH
53+
54+
- template: templates/setup-script-win.yml
55+
- template: templates/nb-docs-win.yml

.azure-pipelines/linux.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
trigger:
2+
- master
3+
4+
variables:
5+
miniconda.url: https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
6+
7+
strategy:
8+
matrix:
9+
py37:
10+
python.version: "3.7"
11+
py36:
12+
python.version: "3.6"
13+
14+
pool:
15+
vmImage: ubuntu-16.04
16+
17+
steps:
18+
# Add conda to PATH.
19+
- bash: echo "##vso[task.prependpath]$CONDA/bin"
20+
displayName: Add conda to PATH
21+
22+
- script: |
23+
# Install Python, py.test, and required packages.
24+
conda env create -f environment.yml
25+
source activate bayesian-modelling-tutorial
26+
conda install -y python=$(python.version)
27+
python -m ipykernel install --user --name bayesian-modelling-tutorial
28+
displayName: 'Create environment, install correct Python, and activate kernel.'
29+
30+
# Q: Does second script not recognize environment context from 1st script?
31+
- script: |
32+
source activate bayesian-modelling-tutorial
33+
mkdir -p docs/notebooks
34+
jupyter nbconvert --config nbconvert_config.py --execute --template full
35+
pandoc README.md -o docs/index.html -c static/pandoc.css -s
36+
displayName: 'Build docs pages'

.azure-pipelines/macos.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
trigger:
2+
- master
3+
4+
variables:
5+
miniconda.url: https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
6+
7+
pool:
8+
vmImage: macOS-10.14
9+
10+
steps:
11+
# Add conda to PATH.
12+
13+
- bash: echo "##vso[task.prependpath]$CONDA/bin"
14+
displayName: Add conda to PATH
15+
16+
# - script: |
17+
# # Install Python, py.test, and required packages.
18+
# conda env create -f environment.yml
19+
# source activate bayesian-modelling-tutorial
20+
# conda install -y python=$(python.version)
21+
# python -m ipykernel install --user --name bayesian-modelling-tutorial
22+
# displayName: 'Create environment, install correct Python, and activate kernel.'
23+
24+
# # Q: Does second script not recognize environment context from 1st script?
25+
# - script: |
26+
# source activate bayesian-modelling-tutorial
27+
# mkdir -p docs/notebooks
28+
# jupyter nbconvert --config nbconvert_config.py --execute --template full
29+
# pandoc README.md -o docs/index.html -c static/pandoc.css -s
30+
# displayName: 'Build docs pages'
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
steps:
2+
- script: |
3+
source activate bayesian-modelling-tutorial
4+
mkdir -p docs/notebooks
5+
jupyter nbconvert --config nbconvert_config.py --execute --template full
6+
pandoc README.md -o docs/index.html -c static/pandoc.css -s
7+
displayName: 'Build docs pages'
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
steps:
2+
- script: |
3+
activate bayesian-modelling-tutorial
4+
mkdir -p docs/notebooks
5+
jupyter nbconvert --config nbconvert_config.py --execute --template full
6+
pandoc README.md -o docs/index.html -c static/pandoc.css -s
7+
displayName: 'Build docs pages'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
steps:
2+
- script: |
3+
conda env create -f environment.yml
4+
source activate bayesian-modelling-tutorial
5+
conda install -y python=$(python.version)
6+
python -m ipykernel install --user --name bayesian-modelling-tutorial
7+
displayName: 'Create environment, install correct Python, and activate kernel.'
8+
9+
- script: |
10+
source activate bayesian-modelling-tutorial
11+
conda list
12+
displayName: 'Display all packages, for diagnostic purposes.'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
steps:
2+
- script: |
3+
conda env create -f environment.yml
4+
activate bayesian-modelling-tutorial
5+
conda install -y python=$(python.version)
6+
python -m ipykernel install --user --name bayesian-modelling-tutorial
7+
displayName: 'Create environment, install correct Python, and activate kernel.'
8+
9+
- script: |
10+
activate bayesian-modelling-tutorial
11+
conda list
12+
displayName: 'Display all packages, for diagnostic purposes.'

README.md

Lines changed: 57 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,24 @@ In your terminal, use `git` to clone the repository locally.
2121
git clone https://github.com/ericmjl/bayesian-stats-modelling-tutorial
2222
```
2323

24-
Alternatively, you can download the zip file of the repository at the top of the main page of the repository. If you prefer not to use git or don't have experience with it, this a good option.
24+
Alternatively, you can download the zip file of the repository at the top of the main page of the repository.
25+
If you prefer not to use git or don't have experience with it, this a good option.
2526

2627
## 2. Download Anaconda (if you haven't already)
2728

28-
If you do not already have the [Anaconda distribution](https://www.anaconda.com/download/) of Python 3, go get it (note: you can also set up your project environment w/out Anaconda using `pip` to install the required packages; however Anaconda is great for Data Science and we encourage you to use it).
29+
If you do not already have the [Anaconda distribution](https://www.anaconda.com/download/) of Python 3,
30+
go get it
31+
(note: you can also set up your project environment w/out Anaconda using `pip` to install the required packages;
32+
however Anaconda is great for Data Science and we encourage you to use it).
2933

3034
## 3. Set up your environment
3135

3236
### 3a. `conda` users
3337

34-
If this is the first time you're setting up your compute environment, use the `conda` package manager to **install all the necessary packages** from the provided `environment.yml` file.
38+
If this is the first time you're setting up your compute environment,
39+
use the `conda` package manager
40+
to **install all the necessary packages**
41+
from the provided `environment.yml` file.
3542

3643
```bash
3744
conda env create -f environment.yml
@@ -57,7 +64,8 @@ conda env update -f environment.yml
5764

5865
### 3b. `pip` users
5966

60-
Please install all of the packages listed in the `environment.yml` file manually. An example command would be:
67+
Please install all of the packages listed in the `environment.yml` file manually.
68+
An example command would be:
6169

6270
```bash
6371
pip install networkx scipy ...
@@ -69,9 +77,37 @@ If you don't want to mess around with dev-ops, click the following badge to get
6977

7078
[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/ericmjl/bayesian-stats-modelling-tutorial/master)
7179

72-
## 4. want to view static HTML notebooks
7380

74-
If you're interested in only viewing the static HTML versions of the notebooks, the links are provided below:
81+
### 4a. Open your Jupyter notebook
82+
83+
In the terminal, execute `jupyter notebook`.
84+
85+
Navigate to the notebooks directory
86+
and open the notebook `01-Student-Probability_a_simulated_introduction.ipynb`.
87+
88+
### 4b. Open your Jupyter notebook in Jupyter Lab!
89+
90+
91+
In the terminal, execute `jupyter lab`.
92+
93+
Navigate to the notebooks directory
94+
and open the notebook `01-Student-Probability_a_simulated_introduction.ipynb`.
95+
96+
Now, if you're using Jupyter lab, for Notebook 2, you'll need to get ipywidgets working.
97+
The documentation is [here](https://ipywidgets.readthedocs.io/en/latest/user_install.html#installing-the-jupyterlab-extension).
98+
99+
In short, you'll need node installed & you'll need to run the following in your terminal:
100+
101+
`jupyter labextension install @jupyter-widgets/jupyterlab-manager`
102+
103+
### 4c. Open your Jupyter notebook using Binder.
104+
105+
Launch Binder using the button at the top of this README.md. Voila!
106+
107+
### 4d. Want to view static HTML notebooks
108+
109+
If you're interested in only viewing the static HTML versions of the notebooks,
110+
the links are provided below:
75111

76112
Part 1: Bayesian Data Science by Simulation
77113

@@ -90,7 +126,20 @@ Part 2: Bayesian Data Science by Probabilistic Programming
90126

91127
# Acknowledgements
92128

93-
Development of this type of material is almost always a result of years of discussions between members of a community. We'd like to thank the community and to mention several people who have played pivotal roles in our understanding the the material: Michael Betancourt, Justin Bois, Allen Downey, Chris Fonnesbeck, Jake VanderPlas. Also, Andrew Gelman rocks!
129+
Development of this type of material is almost always a result of years of discussions between members of a community.
130+
We'd like to thank the community and to mention several people who have played pivotal roles in our understanding the the material:
131+
Michael Betancourt,
132+
Justin Bois,
133+
Allen Downey,
134+
Chris Fonnesbeck,
135+
Jake VanderPlas.
136+
Also, Andrew Gelman rocks!
137+
138+
139+
# Feedback
140+
141+
Please leave feedback for us [here](https://ericma1.typeform.com/to/j88n8P)!
142+
We'll use this information to help improve the teaching and delivery of the material.
94143

95144
# data credits
96145

@@ -103,3 +152,4 @@ Further reading resources that are not specifically tied to any notebooks.
103152
- [Visualization in Bayesian workflow](https://arxiv.org/abs/1709.01449)
104153
- [PyMC3 examples gallery](http://docs.pymc.io/examples.html)
105154
- [Bayesian Analysis Recipes](https://github.com/ericmjl/bayesian-analysis-recipes)
155+
- [Communicating uncertainty about facts, numbers and science](https://royalsocietypublishing.org/doi/full/10.1098/rsos.181870)

0 commit comments

Comments
 (0)