Skip to content

Commit

Permalink
update student version with curriculum book changes
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Sep 25, 2024
1 parent 86f810e commit 74122d6
Show file tree
Hide file tree
Showing 31 changed files with 181,111 additions and 175,059 deletions.
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"julia.environmentPath": "/Users/marinedenolle/Dropbox/CLASSES/ESS490/curriculum-book"
}
"python.pythonPath": "/Users/marinedenolle/opt/miniconda3/envs/curriculum_book/bin/python"
}
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ To build our website, we need specific Python packages which are managed with th
```

1. Create and activate the "geosmart" conda environment.
```sh
conda env create --file conda/environment.yml
mamba activate curriculum_book
```

__NOTE__: If you're running linux or Windows use `conda/conda-linux-64.lock.yml`
```sh
Expand Down
35 changes: 30 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,35 @@
# GeoSMART Curriculum Jupyter Book (ESS 469/569)

[![Deploy](https://github.com/geo-smart/mlgeo-book/actions/workflows/deploy.yaml/badge.svg)](https://github.com/geo-smart/mlgeo-book/actions/workflows/deploy.yaml)
[![Jupyter Book Badge](https://jupyterbook.org/badge.svg)](https://geo-smart.github.io/mlgeo-book)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/geo-smart/mlgeo-book/HEAD?urlpath=lab)
[![Deploy](https://github.com/geo-smart/mlgeo-instructor/actions/workflows/deploy.yaml/badge.svg)](https://github.com/geo-smart/mlgeo-instructor/actions/workflows/deploy.yaml)
[![Jupyter Book Badge](https://jupyterbook.org/badge.svg)](https://geo-smart.github.io/mlgeo-instructor)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/geo-smart/mlgeo-instructor/HEAD?urlpath=lab)
[![GeoSMART Library Badge](book/img/curricula_badge.svg)](https://geo-smart.github.io/curriculum)
[![Student Version](book/img/student_version_badge.svg)](https://geo-smart.github.io/mlgeo-book/)

## About
## Repository Overview

This repository stores configuration for GeoSMART curriculum content, specifically the student version of the book. This version of the book should never be directly edited, as the student version is automatically generated on push.
This repository stores configuration for GeoSMART curriculum content, specifically the teacher version of the book. Only this version of the book should ever be edited, as the student version is automatically generated on push by github actions.

## Making Changes

Edit the book content by modifying the `_config.yml`, `_toc.yml` and `*.ipynb` files in the `book` directory. The book is hosted on Github Pages and will be automatically updated on push, and the student book will also be created automatically on push.

To modify the exact differences between this book and the student book, edit `.github/workflows/clean_book.py`. When you push, a github action will clone the repo and run this python file which modifies certain parts of `*.ipynb` file contents, then pushes to the student repo. To edit the student repo's README, edit `STUDENT_README.md`. The Github Actions workflow also automatically replaces `README.md` with `STUDENT_README.md` in the student repo.

### `Student Response Sections`

One modifications made by the `clean_book.py` workflow is to clear sections marked for student response. Code cells marked for student response may contain code in the teacher version of the book, but will have their code removed and replaced with a TODO comment in the student version.

To mark a code cell to be cleared, insert a markdown cell directly preceding it with the following content:

````markdown
```{admonition} Student response section
This section is left for the student to complete.
```
````

## Serving Locally

Activate the `curriculum_book` conda environment (or any conda environment that has the necessary jupyter book dependencies). Navigate to the root folder of the curriculum book repository in anaconda prompt, then run `python server.py`.

On startup, the server will run `jb build book` to build all changes to the notebook and create the compiled HTML. The server code can take a `--no-build` flag (or `--nb` shorthand) if you don't want to build any changes you've made to the notebooks. In the case that you don't want to build changes made to the notebooks, you can just run `python serer.py --nb` from any terminal with python installed.
10 changes: 10 additions & 0 deletions STUDENT_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# GeoSMART Curriculum Jupyter Book (ESS 469/569)

[![Deploy](https://github.com/geo-smart/mlgeo-book/actions/workflows/deploy.yaml/badge.svg)](https://github.com/geo-smart/mlgeo-book/actions/workflows/deploy.yaml)
[![Jupyter Book Badge](https://jupyterbook.org/badge.svg)](https://geo-smart.github.io/mlgeo-book)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/geo-smart/mlgeo-book/HEAD?urlpath=lab)
[![GeoSMART Library Badge](book/img/curricula_badge.svg)](https://geo-smart.github.io/curriculum)

## About

This repository stores configuration for GeoSMART curriculum content, specifically the student version of the book. This version of the book should never be directly edited, as the student version is automatically generated on push.
4 changes: 2 additions & 2 deletions book/Chapter1-GettingStarted/1.2_jupyter_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ Used for:
* Text on RStudio files

### Basic Markdown commands
***

Headings <br>

\# Heading level 1 <br>
\#\# Heading level 2 <br>
\#\#\# Heading level 3 <br>
***


Paragraphs: Leave a blank line

Expand Down
35 changes: 30 additions & 5 deletions book/Chapter1-GettingStarted/1.6_data_gallery.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,35 @@ This course provides various tracks for students in geosciences. The data sets c

The tracks are: geophysical sciences (seismology and geodetic tracks), cryospheric sciences, atmospheric sciences, ocean sciences, hydrology, and forestry.

To download the data, we provide a series of notebooks.
We provide a series of small, curated data set for the course. These data set are open-access data, with their own licenses.

The data comes in various forms:
- seasonal or semi-periodic
- extreme events
- transient waves
To download similar data, we made a MLGEO-dataset (https://github.com/UW-MLGEO/MLGeo-dataset).

To download specific data,
# How to Download a File from a MLGeo-dataset Repository

To download a file from a GitHub repository, follow these steps:

1. **Identify the File URL**:
- Navigate to the CSV file in the GitHub repository.
- Click on the file to view its contents.
- Click the "Raw" button to get the direct URL to the file.

2. **Construct the Download URL**:
- The URL format is:
```
https://raw.githubusercontent.com/UW-MLGEO/MLGEO-dataset/blob/main/data/file.csv
```
4. **Download the File**:
- You can use various methods to download the file, such as using a web browser, `wget`, or `curl`.
## Using a Web Browser
Simply paste the constructed URL into your web browser's address bar and press Enter. The file will either be displayed or downloaded automatically.
## Using `wget`
Open your terminal and run:
```sh
wget https://raw.githubusercontent.com/example-user/example-repo/main/data/data.csv
111 changes: 53 additions & 58 deletions book/Chapter2-DataManipulation/2.10_dimensionality_reduction.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 74122d6

Please sign in to comment.