Skip to content

Commit

Permalink
Fix a lot of markdown syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanlovett committed Oct 8, 2024
1 parent 159dfac commit 9173de4
Show file tree
Hide file tree
Showing 11 changed files with 147 additions and 129 deletions.
17 changes: 11 additions & 6 deletions connector/general/what-is-a-connector.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
# What is a Connector Course?
---
title: What is a Connector Course?
---

Connector courses allow students to apply theoretical concepts from Data 8 to a particular area of interest. Below are some details that characterize the average 2-unit connector course. This is just to give you a general idea of what connectors are like. Some connectors may not fully match this description.

![](/assets/connectors.jpg)![](/assets/hello.jpg)
```{image} ../../assets/connectors.jpg
:alt: Grid of connector logos and titles
### Prerequisites
```

## Prerequisites

Data 8 is a pre-requisite or co-requisite for connector courses. Students should have already completed Data 8 or be taking it concurrently.

Although this expectation is stated in the official course description, instructors should note that students are formally able to enroll in a connector without having met it. This can create challenges for individual students, and for the range of preparation represented in the whole class. Previous instructors have found it helpful to announce the expectations about Data 8 in their first class and suggest that students find a different class or wait to take the connector until they have met the expectations.

Of course, instructors have the discretion to consider a student's enrollment on a case-by-case basis. If you are thinking about waiving the Data 8 pre-/co-requisite for a particular student, you will want to consider their other preparation, what Data 8 material they will be missing, and the overall effect it may have on the class.

### Units
## Units

Connector courses have generally been two units in the past. There have not been any three unit connectors yet but this is a possibility if your connector is higher in workload.

### General Course Structure
## General Course Structure

* One two-hour class meeting per week, which includes both a lab and lecture portion. Instructors decide how they want to split up two hours between lab and lecture. Some instructors choose to spend the first hour on lecture and the second on lab. Others prefer a more fluid structure and switch back and forth between lecture and lab questions throughout the two hours.
* Weekly in-class lab assignment
* Additional projects/homeworks/exams depending on the instructor's preference
* Weekly office hours

### Workload
## Workload

For students, one unit of work corresponds to three hours of work. The six hours of work for a 2-unit connector can be broken down in the following way:

Expand Down
18 changes: 10 additions & 8 deletions faq/admin.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# Accessing Elevated Privileges in a Hub
---
title: Accessing Elevated Privileges in a Hub
---

```{note}
Curious about elevated privileges in DataHub? If yes, read below!
```

**What does elevated privilege in an hub mean?**
## What are elevated privileges?

Elevated privilege provides the necessary features required to troubleshoot students notebook interface in the hub. If you are an admin user, you can do the following,
Elevated privilege enable course staff to troubleshoot students notebook interface in the hub. If you have such privileges, you can:

1. You can start and stop the students' server in your dedicated hub
2. You can access the student server to debug issues in their notebook
1. Start and stop students' servers
2. Access students' servers to debug issues

```{warning}
Elevated privileges are hub-wide. If you have a GSI teaching your course using a particular hub but is acting as a student in another course which uses the same hub, then this can result in a conflict of interest. Please report such scenarios to the infrastructure team so that we can take the necessary corrective action.
Expand All @@ -26,7 +28,7 @@ Check this image to know your privileges for the admin option,
Here is how the admin dashboard looks like!
```

**How do I get elevated privileges?**
## Obtaining Elevated Privileges

We generally recommend the teaching team alone to have elevated privileges in the hubs they use for the instructional purposes. If you satisfy the above criteria, please create a request using this [template](https://github.com/berkeley-dsep-infra/datahub/issues/new?assignees=&labels=support&template=admin_request.yml).The infrastructure team will assist in the process of assigning elevated privileges to the instructors.

Expand All @@ -47,9 +49,9 @@ To assign elevated privileges to a set of people other than all course staff, fo
If you need any help during this process of creating bcourses groups, please reach out to [email protected]. Please keep in mind that the bcourses page for the course should be published so that users requiring elevated privileges actually have the required access.
```

**How do I navigate to the admin portal?**
## Admin Interface

Please follow the steps below to navigate admin interface,
Follow the steps below to navigate admin interface:

- Login to your hub instance
- Click the admin option from the top bar
Expand Down
12 changes: 7 additions & 5 deletions technology/jupyter/python-errors.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
## Troubleshooting Code Cell Errors
---
title: Troubleshooting Code Cell Errors
---

This category describes errors that occur when running code cells. This list is not exhaustive, but it details some of themost frequent errors that new Notebook users encounter.

#### NameError
## NameError
By far the most common errors that new students encounter are NameErrors.
An example screenshot is below:
![](../../assets/name-error.png) NameErrors occur when a code cell refers to a name that has not yet been defined. This usually happens when:
Expand All @@ -16,14 +18,14 @@ Solutions:
* double-check spelling, capitalization, punctuation, and spaces in variable names
* make sure that if you're referring to a string, you enclose it in quotation marks

#### ValueError
## ValueError
Common when dealing with table data, ValueErrors arise when misspelled column labels are used.
An example screenshot is below:
![](../../assets/column-name-error.png)
Solution:
* The most likely solution is to review the column headers and ensure that the correct value is selected for. Python is case-sensitive, so it's important to check the spelling and capitalization of your strings/variable names.

#### TypeError
## TypeError
When using a function, e.g for table manipulation, it is possible to use the incorrect kind of value. In the example below, the column relabeling function is misused, causing errors in two different ways.

In this error, the function was given too many values:
Expand All @@ -36,7 +38,7 @@ Solutions:
* If you see an error relating to the *number* of arguments, check that you are using the correct number. If you aren't sure, refer to prior uses of the function for reference, or ask a friend.
* If you see an error relating to the type, ensure that the values you use in the function call are appropriate. For example, in the case above, renaming the column requires a string, not a boolean.

#### Cells never stop running
## Cells never stop running
Sometimes, cells can get "stuck" running:
![](../../assets/kernel-busy.png)

Expand Down
40 changes: 26 additions & 14 deletions technology/jupyter/troubleshoot-nbgitpuller.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,42 @@
# Troubleshooting nbgitpuller
---
title: Troubleshooting nbgitpuller
---

You may run into different types of errors when you are using the JupyterHub or Jupyter notebooks. The majority of errors come from a few common causes and can be solved using the following methods.

## nbgitpuller Link Errors

nbgitpuller link errors are usually due to one of three issues:

#### 1. The nbgitpuller link was clicked in an incompatible browser (Microsoft Edge)
### Incompatible Browser

Unfortunately, the nbgitpuller software does not support the Microsoft Edge browser. If you click an nbgitpuller link in Edge, you will likely be taken to your datahub.berkeley.edu dashboard, but you won't see your desired files there.

Solution: open nbgitpuller links in Chrome, Firefox, or Safari
Open nbgitpuller links in Chrome, Firefox, or Safari.

### Link Generated Incorrectly

#### 2. The nbgitpuller link was generated incorrectly
If the nbgitpuller link was not generated correctly, you'll see a red loading bar with an error message that says "Error: Command '['git', 'fetch']' returned non-zero exit status 128." An example screenshot is below:

![](../../assets/broken-nbgitpuller-link.png)
```{image} ../../assets/broken-nbgitpuller-link.png
:alt: Example error output from nbgitpuller
```

Solution: re-generate the nbgitpuller link. Make sure that you've filled in the correct Jupyter hub URL, Github URL, branch, and file. Some tips:
* URLS should NOT end with forward slashes. "https://github.com/ds-modules" is okay; "https://github.com/ds-modules/" will break
* The Git repository url should go to the base repo that contains the materials you want. For example, if you want to link to the "lab01.ipynb" in the fall19 repository of the data-8 organization, the Git URL should be "https://github.com/data-8/fall19", not "https://github.com/data-8/fall19/blob/master/lab01"
* The File to Open needs to include the full path of the file from the base repository. For example, if the "lab01" file is in a folder called "labs", the File to Open needs to be "labs/lab01"

#### 3. The nbgitpuller link has been used before, and some of the content was changed in both DataHub and Github
If you make changes to an assignment on Github after students have started working on it, students that click the nbgitpuller link again may see a red loading bar and a message about a *merge conflict*. This occurs if the instructor and the student both change the same parts of the notebook: nbgitpuller doesn't know how to integrate the instructor's changes without overwriting student work, so it refuses to proceed. You can read [more about nbgitpuller's automatic merging behavior here](https://jupyterhub.github.io/nbgitpuller/topic/automatic-merging.html).
### Modified Content

###### Solutions:
If you make changes to an assignment on GitHub after students have started working on it, students that click the nbgitpuller link again may see a red loading bar and a message about a *merge conflict*. This occurs if the instructor and the student both change the same parts of the notebook: nbgitpuller doesn't know how to integrate the instructor's changes without overwriting student work, so it refuses to proceed. You can read [more about nbgitpuller's automatic merging behavior](https://jupyterhub.github.io/nbgitpuller/topic/automatic-merging.html).

Method 1: The easiest and most conservative solution is to rename the file or folder that contains the incompatible changes, then click the nbgitpuller link again. If the file or folder is renamed to anything else (e.g. "SOC-5-old"), nbgitpuller will clone a fresh copy of the problematic files to the student's Jupyterhub. They can then copy over any work from the old version of the file.
### Solutions

#### Rename Files

The easiest and most conservative solution is to rename the file or folder that contains the incompatible changes, then click the nbgitpuller link again. If the file or folder is renamed to anything else (e.g. "SOC-5-old"), nbgitpuller will clone a fresh copy of the problematic files to the student's Jupyterhub. They can then copy over any work from the old version of the file.

When you face an error like below, do the following steps
```{figure} ../../images/mergeconflict.png
Expand All @@ -48,7 +58,9 @@ Here is the steps required to rename the folder!
- Click on the nbgitpuller link again
- Use the newly cloned repository created after nbgitpuller link was clicked

Method 2: If you have command line experience then you can use "git stash" command in terminal to temporarily remove the incompatible changes.
#### git stash

If you have command line experience then you can use "git stash" command in terminal to temporarily remove the incompatible changes.

- If you are using https://datahub.berkeley.edu then navigate to your file manager which acts as your home page. If you are using other hubs then you can access your file manager by navigating to "Hub URL/user/`Your-Username`/tree" which will take you to the home directory. For eg: If my user name is Julia and I want to access my home directory in R hub then the URL to access my home directory will be https://r.datahub.berkeley.edu/user/julia/tree.
- On the upper right of the page, click the dropdown menu that says “New” and select “Terminal”.
Expand All @@ -58,7 +70,7 @@ Method 2: If you have command line experience then you can use "git stash" comma
:align: center
:name: Launch Terminal
Here is how you launch terminal
Launch a terminal
```

- Navigate to the folder where a) your files are stored and b) you have merge conflict issues
Expand All @@ -67,10 +79,10 @@ Here is how you launch terminal
```{figure} ../../assets/gitstash_output.png
:width: 500px
:align: center
:name: Launch Terminal
:name: git stash output
Here is the output from gitstash command
Output from git stash command
```
- Access the nbgitpuller link again. You will be able to load the notebooks directly.

The best advice, however, is to avoid making changes to assignments once they've been released to students if at all possible.
The best advice, however, is to avoid making changes to assignments once they've been released to students if at all possible.
10 changes: 5 additions & 5 deletions technology/pedagogy-and-technology/options-launch-rkernel.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Step 1: Install Anaconda distribution (JupyterLab application gets installed thr

Step 2: Search for "Anaconda Powershell Prompt" and Open it. Run the following code to install R Kernel in Jupyter Lab,

```{code}
```bash
conda install -c r r-essentials
```

Expand All @@ -30,7 +30,7 @@ The following is a screenshot of running this command in Anaconda Powershell Pro

Step 3: Run the following command in "Anaconda Powershell Prompt" to install tidyverse packages

```{code}
```bash
conda install -c r r-tidyverse
```

Expand All @@ -49,7 +49,7 @@ The following is a screenshot of running the command to install tidyverse packag

Step 4: Run the following command to launch Jupyter Lab

```{code}
```bash
jupyter lab
```

Expand All @@ -75,13 +75,13 @@ Step 1: Launch R Kernel in Google Colab by accessing this [link](https://colab.t

Step 2: Check whether the tidyverse packages (or any other package you need) is already installed in Colab by using the following code,

```{code}
```R
print(installed.packages())
```

Step 3: If not installed, Install tidyverse package using the following command

```{code}
```R
devtools::install_github("tidyverse/tidyverse")
```

Expand Down
Loading

0 comments on commit 9173de4

Please sign in to comment.