README.md 2.25 KB
Newer Older
Michael Wimmer's avatar
Michael Wimmer committed
1
2
3
4
5
6
# compphys

Lecture notes and teaching material used for the Delft University of Technology course awesome course.

The compiled materials are available at https://compphys.quantumtinkerer.tudelft.nl

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Technical instructions

## Writing the lecture notes

When you add new content to the lecture notes, work in a separate git branch. Only
merge when you are satisfied with the results.

The website is written using markdown. All features as known from the jupyter notebook are
supported (additional extensions can be specified in`mkdocs.yml`). All `.md` files are to
be placed in the folder `src`. For them to show up in the index, they have to be added to 
`mkdocs.yml` under the `nav:` entry in the form
```
  - Name in index: 'filename.md'
```
Entries in the index can also be nested:
```
  - Name of entry:
    - Name of first subentry: 'filename1.md'
    - Name of second subentry: 'filename2.md'
```

It is also possible to have the output of python code to be incorporated in the lecture notes.
To this end, add fenced code blocks like this
Michael Wimmer's avatar
Michael Wimmer committed
30
31
32
33
34
35
36
37
38
39
40
````
```{.python .input}
import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(0, 2*np.pi)
y = np.sin(x)
plt.plot(x, y)
plt.show()
```
````
41
42
43
44
45
46
47
48
49
Internally, those code blocks are converted to be the cells of a jupyter notebook. Like notebook cells,
variables are valid across different code blocks. If you have code that you would like to import
from a separate `.py`-file, put that file into `code`. It will then be visible directly for `import`.

## Deploying changes to the webserver

Changes you make to the documentation are directly deployed to the webserver after pushing.

If you work in a separate branch called `branch_name`, the changes are deployed to
Boris Varbanov's avatar
Boris Varbanov committed
50
`https://computationalphysics.quantumtinkerer.tudelft.nl/test_builds/branch_name`. In this way you can
51
52
53
54
55
56
57
58
check intermediate stages without exposing this to the students directly.

## Testing the build locally

The website can also be built locally by calling
```
python execute.py; mkdocs serve
```
59
60
61
62
63
Make sure the packages
```
mkdocs mkdocs-material python-markdown-math notedown
```
are installed.
64

Michael Wimmer's avatar
Michael Wimmer committed
65
66
67
68
# Origin and technical support

This repository is based on a template for publishing lecture notes, developed
by Anton Akhmerov, who also hosts such repositories for other courses.