[ET Trac] #2577: CactusTutorial.ipynb contains code only suitable or tutorial server

Roland Haas trac-noreply at einsteintoolkit.org
Fri Nov 19 15:55:19 CST 2021


#2577: CactusTutorial.ipynb contains code only suitable or tutorial server

 Reporter: Roland Haas
   Status: new
Milestone: 
  Version: development version
     Type: bug
 Priority: major
Component: EinsteinToolkit Virtual Machine

The tutorial notebook is intended for both use inside of the tutorial server \(and docker image\) as well as users' own jupyer notebook server in their account and finally as a read-only, offline version.

The current notebook contains instances of code that will fail or do dangerous things on a user’s laptop. Namley:

```python
import scrolldown
```

will fail unless a Python module `scrolldown` is available. This should be encased in a `try:... except ModuleNotFoundError` block. 

And

```shell
cd ~/
rm -fr ~/Cactus
tar xzf ~etuser/Cactus.tar.gz
```

which is very dangerous since it will remove any `Cactus` directory in a user’s $HOME which is a bad thing to do for offline use where users may want to use a different directory \(eg GW150914 or so\). The tarbal will also only exist on the notebook server and thus `tar` will fail on private jupyter notebook servers or in offline use. This can confuse potential new users that expect to be able to enter each command in the notebook and thus be able to run Cactus.

This cell should be protect by some bash-level if statements that check if it is being run on the notebook server and a comment that this cell will only be used on the notebook server added to the cell as a shell comment \(so that it cannot be lost\).

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2577/cactustutorialipynb-contains-code-only
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/trac/attachments/20211119/e361b8e8/attachment.html 


More information about the Trac mailing list