Skip to content

Commit ef830ed

Browse files
committed
Add Jupyter Book TOC and intro; update myst
Add a Jupyter Book table of contents and introductory page: create notebooks/_toc.yml with the chapters list and add notebooks/intro.md with repository setup and Binder/book badges. Update notebooks/myst.yml to the new top-level metadata (title, author, github, logo) and disable notebook execution (execute_notebooks: off), removing the previous 'project' and 'site' structure to match the Jupyter Book / MyST configuration.
1 parent 9c092f2 commit ef830ed

3 files changed

Lines changed: 74 additions & 12 deletions

File tree

notebooks/_toc.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
format: jb-book
2+
root: intro
3+
chapters:
4+
- file: 01-Introduction
5+
- file: 02-Strings
6+
- file: 03-Lists
7+
- file: 04-Control.Flow.Tools
8+
- file: 05-Modules
9+
- file: 06-Input.And.Output
10+
- file: 07-Errors.and.Exceptions
11+
- file: 08-Classes
12+
- file: 09-Iterators
13+
- file: 10-Multiprocessing
14+
- file: 11-Standard.Library
15+
- file: 12-Matplotlib
16+
- file: 13-Numpy
17+
- file: 14-SciPy
18+
- file: 15-Sympy
19+
- file: 16-Fortran
20+
- file: 17-Cython
21+
- file: 18-Numba
22+
- file: 19-LandauDamping
23+
- file: 20-Maxwell.2D
24+
- file: 21-Gray.Scott.Model
25+
- file: 22-Matplotlib.Animation

notebooks/intro.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Python notebooks
2+
3+
[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/pnavaro/python-notebooks/master)
4+
[![Book](https://github.com/pnavaro/python-notebooks//workflows/book/badge.svg)](https://pnavaro.github.io/python-notebooks)
5+
6+
This tutorial is made for scientists who want to learn Python and eventually step from Matlab.
7+
8+
Python is a general programming language with many scientific libraries.
9+
It is optimized to be easy to develop in. The same is not true for Matlab which is
10+
a domain-specific language.
11+
12+
1. Install [Miniforge](https://github.com/conda-forge/miniforge)
13+
14+
2. Download this repository:
15+
16+
```
17+
git clone https://github.com/pnavaro/python-notebooks.git
18+
```
19+
20+
or download as a [zip file](https://github.com/pnavaro/python-notebooks/archive/master.zip).
21+
22+
3. Create a new conda environment:
23+
24+
```
25+
conda env create -f environment.yml -n python-navaro
26+
conda activate python-navaro # Linux OS/X
27+
```
28+
29+
4. If you have an existing installation of Jupyter install the new kernel with:
30+
31+
```
32+
conda run -n python-navaro python -m ipykernel install --user --name python-navaro
33+
```
34+
35+
5. Open notebooks with:
36+
37+
```
38+
cd python-notebooks
39+
jupyter notebook
40+
```
41+
42+
Pierre

notebooks/myst.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
version: 1
2-
project:
3-
title: Python notebooks
4-
authors:
5-
- name: Pierre Navaro
6-
github: pnavaro/python-notebooks
7-
toc:
1+
title: Python notebooks
2+
author: Pierre Navaro
3+
github: pnavaro/python-notebooks
4+
logo: logo.png
5+
execute:
6+
execute_notebooks : off
7+
toc:
88
- file: 01-Introduction
99
- file: 02-Strings
1010
- file: 03-Lists
@@ -28,8 +28,3 @@ project:
2828
- file: 21-Gray.Scott.Model
2929
- file: 22-Matplotlib.Animation
3030

31-
site:
32-
options:
33-
logo: logo.png
34-
folders: true
35-
template: book-theme

0 commit comments

Comments
 (0)