Skip to content

Commit 4e4995a

Browse files
authored
Major improvements to advanced tutorial (#13)
* Split advanced tutorial into 4 notebooks also add a lot more discussion * forgot to add notebook 5! * repatch * try to add advanced tutorials to testing * add CLI run scripts * Add support for Py>=3.8 in advanced example * 250 -> 300 in notebook 7 (should pass more often) * shift interfaces * shift interfaces (regularly passes locally) * fix syntax error * shift interfaces * shift interfaces again * add comment about overlap error
1 parent c171f05 commit 4e4995a

19 files changed

+1802
-1119
lines changed

.github/workflows/ci.yml

+42-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ defaults:
1515
shell: bash -l {0}
1616

1717
jobs:
18-
tests:
18+
intro-tutorial:
1919
runs-on: ubuntu-latest
20-
name: "Test answer key"
20+
name: "Intro tutorial"
2121
strategy:
2222
matrix:
2323
CONDA_PY:
@@ -34,6 +34,7 @@ jobs:
3434
python-version: ${{ matrix.CONDA_PY }}
3535
environment-file: binder/environment.yml
3636
activate-environment: ops-tutorial
37+
miniforge-variant: Mambaforge
3738
- name: "Install testing tools"
3839
run: python -m pip install pytest nbval
3940
- name: "Conda info"
@@ -51,3 +52,42 @@ jobs:
5152
2_tps_analysis_tutorial.ipynb \
5253
3_committor_analysis_tutorial.ipynb \
5354
4_mstis_sampling_tutorial.ipynb
55+
56+
advanced-tutorial:
57+
runs-on: ubuntu-latest
58+
name: "Advanced tutorial"
59+
strategy:
60+
matrix:
61+
CONDA_PY:
62+
- 3.7
63+
- 3.8
64+
- 3.9
65+
66+
steps:
67+
- uses: actions/checkout@v2
68+
- uses: actions/setup-python@v2
69+
- uses: conda-incubator/setup-miniconda@v2
70+
with:
71+
auto-update-conda: true
72+
python-version: ${{ matrix.CONDA_PY }}
73+
environment-file: binder/environment.yml
74+
activate-environment: ops-tutorial
75+
miniforge-variant: Mambaforge
76+
- name: "Install testing tools"
77+
run: python -m pip install pytest nbval
78+
- name: "Conda info"
79+
run: |
80+
conda info
81+
conda list
82+
- name: "Patch answers"
83+
run: source devtools/patch-all
84+
- name: "Run tests"
85+
run: |
86+
pytest --nbval-lax 5_custom_shooting_setup.ipynb
87+
source devtools/run5.sh
88+
pytest --nbval-lax \
89+
6_custom_shooting_analysis.ipynb \
90+
7_parallel_tis_setup.ipynb
91+
source devtools/run7.sh
92+
pytest --nbval-lax 8_parallel_tis_analysis.ipynb
93+

1_tps_sampling_tutorial.ipynb

+4-2
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,9 @@
326326
"source": [
327327
"## Running the simulation\n",
328328
"\n",
329-
"Now all the parts are in place, and we can run the simulation! First, we open a file to store the results in, and then we build the simulation and run it."
329+
"Now all the parts are in place, and we can run the simulation! First, we open a file to store everything in, and then we build the simulation and run it.\n",
330+
"\n",
331+
"In practice, for a long-running simulation you might save all the relevant information to a \"setup\" file, and then use the OPS Command Line Interface (CLI) to run it (perhaps on a remote computer). The advantage of that approach is that you can re-use the same exact objects, guaranteeing that they will behave the same way and making analysis easier. That approach is described in notebook 5 of this tutorial. In this notebook, we'll directly run the simulation."
330332
]
331333
},
332334
{
@@ -398,7 +400,7 @@
398400
"name": "python",
399401
"nbconvert_exporter": "python",
400402
"pygments_lexer": "ipython3",
401-
"version": "3.7.3"
403+
"version": "3.7.10"
402404
},
403405
"toc": {
404406
"base_numbering": 1,

0 commit comments

Comments
 (0)