Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script for running Jupyter notebooks #174

Merged
merged 5 commits into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,17 @@ A complete build and test can be run with:

It is recommended to do a Docker CI build before submitting a pull request to ensure your changes will (likely) pass Github's CI.

In scenarios where you want to run scripts in `docker/` but don't want to run the build, images can be downloaded via the `pull` script:

```
> docker/pull
```

In scenarios where you want to run scripts in `docker/` but don't want to run the build, images can be downloaded via the `pull` script.
Run a Juypter notebook:

```
> docker/notebook
```

### Using conda

Expand Down Expand Up @@ -187,6 +193,13 @@ or
```

The test script also runs lint and code quality checks.

Run a Juypter notebook:

```
> scripts/notebook
```

### Documentation

To build and serve the docs, all of the requirements must be installed with `scripts/update`.
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ codespell
coverage
flake8
ipython
jupyter
nbsphinx
pylint
sphinx
Expand Down
24 changes: 24 additions & 0 deletions scripts/notebook
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

set -e

if [[ -n "${CI}" ]]; then
set -x
fi

function usage() {
echo -n \
"Usage: $(basename "$0")
Launches a Jupyter notebook.
"
}

if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
if [ "${1:-}" = "--help" ]; then
usage
else
jupyter notebook \
--ip=0.0.0.0 \
--port=8888
fi
fi