README.md 1.6 KB
Newer Older
Paul McCarthy's avatar
readme  
Paul McCarthy committed
1
2
3
4
5
6
# 2018 WIN PyTreat


This repository contains Jupyter notebooks and data for the 2018 WIN PyTreat.


Paul McCarthy's avatar
Paul McCarthy committed
7
The upstream repository can be found at:
Paul McCarthy's avatar
Paul McCarthy committed
8
9

https://git.fmrib.ox.ac.uk/fsl/pytreat-2018-practicals
Paul McCarthy's avatar
readme  
Paul McCarthy committed
10
11
12
13


To contribute to the practicals:

Paul McCarthy's avatar
Paul McCarthy committed
14
1. Fork the upstream repository on gitlab
Paul McCarthy's avatar
readme  
Paul McCarthy committed
15

Paul McCarthy's avatar
Paul McCarthy committed
16
2. Make a local clone of your fork:
Paul McCarthy's avatar
readme  
Paul McCarthy committed
17

Paul McCarthy's avatar
Paul McCarthy committed
18
19
20
    ```
    git clone git@git.fmrib.ox.ac.uk:<username>/pytreat-2018-practicals
    ```
Paul McCarthy's avatar
Paul McCarthy committed
21
22
23

3. Add the upstream repository as a remote:

Paul McCarthy's avatar
Paul McCarthy committed
24
25
26
    ```
    git remote add upstream git@git.fmrib.ox.ac.uk:fsl/pytreat-2018-practicals.git
    ```
Paul McCarthy's avatar
Paul McCarthy committed
27
28
29
30
31

4. Make your changes on your local repository

5. Rebase onto the upstream repository, and push your changes to your fork:

Paul McCarthy's avatar
Paul McCarthy committed
32
33
34
35
36
    ```
    git fetch --all
    git rebase upstream master
    git push origin master
    ```
Paul McCarthy's avatar
Paul McCarthy committed
37
38
39

6. In gitlab, submit a merge request from your fork back to the upstream
   repository.
Paul McCarthy's avatar
Paul McCarthy committed
40
41
42
43
44


To run these notebooks in the `fslpython` environment, you must first install
jupyter:

Paul McCarthy's avatar
Paul McCarthy committed
45

Paul McCarthy's avatar
Paul McCarthy committed
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
```
source $FSLDIR/fslpython/bin/activate fslpython
conda install jupyter
pip install notedown
source deactivate
ln -s $FSLDIR/fslpython/envs/fslpython/bin/jupyter $FSLDIR/bin/fsljupyter
ln -s $FSLDIR/fslpython/envs/fslpython/bin/notedown $FSLDIR/bin/fslnotedown
```


> [`notedown`](https://github.com/aaren/notedown) is a handy tool which allows
> you to convert a markdownd (`.md`) file to a Jupyter notebook (`.ipynb`)
> file. So you can write your practical in your text editor of choice, and
> then convert it into a notebook, instead of writing the practical in the web
> browser interface.


Now you can start the notebook server from the repository root:

```
fsljupyter notebook
```