Skip to content

Commit

Permalink
Merge pull request #144 from QuantEcon/update_setup
Browse files Browse the repository at this point in the history
Update setup
  • Loading branch information
wupeifan authored Jun 9, 2021
2 parents d93e292 + bcc4d91 commit 97bc875
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 45 deletions.
Binary file added lectures/_static/binderhub_jupyter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lectures/_static/cloud_launch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lectures/_static/github_main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lectures/_static/wait_binderhub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 25 additions & 19 deletions lectures/introduction/cloud_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ any other required software on your own computer.
The `Launch Notebook` button opens a new tab in your browser where a Jupyter notebook version of the
current lecture page will be opened with the selected cloud service.

The settings icon allows you to change your cloud environment from the default. To use
click the over the settings icon on the bottom right of the page (see image).
You can change your cloud environment by selecting another server from the drop down menu (see image):

<br>

Expand All @@ -35,10 +34,30 @@ click the over the settings icon on the bottom right of the page (see image).

<br>

Making a selection will open a new tab in your browser where a Jupyter notebook version of the
current lecture page will be opened with the selected cloud service.

We discuss each of the options below.

### BinderHub

#### Launching BinderHub

To launch course material through BinderHub:

**1.** Choose the `BinderHub` under `select a server: public` on the launch bar to change the backend hub.

**2.** Click on the `Launch Notebook` button.

**3.** Wait for `BinderHub` to connect to the repo

```{figure} https://raw.githubusercontent.com/QuantEcon/lecture-datascience.myst/main/lectures/_static/wait_binderhub.png
```

**4.** You can use the Jupyter Network interface with `BinderHub`

```{figure} https://raw.githubusercontent.com/QuantEcon/lecture-datascience.myst/main/lectures/_static/binderhub_jupyter.png
```

### Google Colab

[Google Colab](https://research.google.com/colaboratory/faq.html) is a cloud service hosted by
Expand All @@ -58,9 +77,7 @@ to underlying Jupyter software.

To launch course material through Google Colab:

**1.** Choose the settings icon on the launch bar to change the backend hub

You will need to select choose `google colab` from the public options.
**1.** Choose the `colab` under `select a server: public` on the launch bar to change the backend hub.

**2.** Click on the `Launch Notebook` button.

Expand Down Expand Up @@ -110,14 +127,3 @@ If you would like to store your work, you can save it onto your Google Drive by
You can create a new notebook by clicking `File` on the menubar and selecting
`New Python 3 notebook`.

### BinderHub

#### Launching BinderHub

To launch course material through BinderHub:

**1.** Choose the settings icon on the launch bar to change the backend hub

You will need to select choose `BinderHub` from the public options.

**2.** Click on the `Launch Notebook` button.
15 changes: 7 additions & 8 deletions lectures/introduction/local_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ For Windows users, we recommend installing for "just me" instead of "all users".

## Downloading the QuantEcon Data Science Lectures

To download the QuantEcon Data Science lectures, we use the `Clone` button on the toolbar
as seen in the following image.
To download the QuantEcon Data Science lectures, go to its [Github repo](https://github.com/QuantEcon/lecture-datascience.notebooks), click on the
Code button.

<br>

```{figure} https://raw.githubusercontent.com/QuantEcon/lecture-datascience.myst/main/lectures/_static/clone_button.png
```{figure} https://raw.githubusercontent.com/QuantEcon/lecture-datascience.myst/main/lectures/_static/github_main.png
```

Expand All @@ -54,7 +54,8 @@ You can download the lectures through either **Github Desktop** or **Terminal**:
**Github Desktop** (Mac/Windows only), recommended for most users.

1. Install [Github Desktop](https://desktop.github.com/).
1. Click the "Open in Github Desktop" option in the clone button menu. It should open a Github
1. Go to the [Github repo](https://github.com/QuantEcon/lecture-datascience.notebooks).
1. Click the "Open with Github Desktop" option in the Code button menu. It should open a Github
Desktop popup that looks like this:
```{figure} https://raw.githubusercontent.com/QuantEcon/lecture-datascience.myst/main/lectures/_static/download_lectures_github_desktop.png
```
Expand All @@ -66,10 +67,8 @@ You can download the lectures through either **Github Desktop** or **Terminal**:
1. Make sure that `git` is installed on your computer. (`git` is not installed on Windows by default. You can download and install it from [here](https://git-scm.com/download/win)).
1. Open a terminal.
1. Set the path to where you would like to download the lectures. The default one is your home directory.
1. Run `git clone https://github.com/QuantEcon/lecture-datascience.notebooks` which will
download the repository with notebooks in your working directory. *Pro tip*: If you would rather
not type this command on your own, you can click "Copy clone command to clipboard" on the clone
button menu and paste it into the terminal.
1. Run `git clone https://github.com/QuantEcon/lecture-datascience.notebooks.git` which will
download the repository with notebooks in your working directory.

## Package Management

Expand Down
19 changes: 1 addition & 18 deletions lectures/introduction/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,11 @@ to run this lecture. You can follow {doc}`cloud setup instructions <../introduct

Here are instructions to restore some or all lectures to their original states.

### Hubs

To refresh a **single** notebook:

1. Open the lecture folder in the JupyterHub where it's installed (e.g., the [PIMS Syzygy](https://pims.syzygy.ca) server.)
1. Navigate to the lecture in question (i.e., by double-clicking on the folder for that section), and delete it by right-clicking.
1. Go back to the {doc}`lectures website <../index>`, navigate to the page for that lecture.
1. Make sure the settings wheel next to the launch bar is pointing at the right hub, and click the link again. This will repopulate the file freshly from the server.

Otherwise, follow these steps:

1. Open the lecture folder in the JupyterHub where it's installed (e.g., the [PIMS Syzygy](https://pims.syzygy.ca) server.)
1. Close all open lectures by clicking the `x` in their tabs.
1. Open the `utilities.ipynb` notebook (which is in the top level of the repository, outside folders like `introduction`)
1. To **completely reset** your lectures to the latest from the server, run the second cell. This will **also delete** any additional files you have added
1. To **update** files you haven't changed, run the first cell. This will **also pull** any new files that we have added to the GitHub repository (e.g., new lectures.)

### Local Machines

The workflow is a bit different on a local machine. We are assuming that you have followed the {doc}`local setup instructions <../introduction/local_install>`, and have installed GitHub desktop.

1. Open GitHub desktop, and navigate to the repository (you can click "find" under "edit" in the top menu bar, and then type `lecture-datascience.notebooks`, if you are having trouble.)
1. Open GitHub desktop, and navigate to the repository (you can click "find" under "edit" in the top menu bar, and then type `lecture-datascience.myst`, if you are having trouble.)
1. To **reset everything**, click "discard all changes" under "branch" in the top menu bar.
1. To **reset a specific notebook**, right-click the specific file in the changes side tab, and then click "discard changes."
1. To **pull the latest from the server**, first make sure you don't have any conflicting changes (i.e., do step (2) above), and then click "pull" under "repository" in the top menu bar.
Expand Down

3 comments on commit 97bc875

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.