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 30, 2024
1 parent ea7e76f commit 12ed053
Show file tree
Hide file tree
Showing 4 changed files with 175,007 additions and 174,931 deletions.
43 changes: 38 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,43 @@
# 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.

Making changes requires that you set up a conda environment and build locally before making sure that it will build with github actions. We accepted rendered notebooks, but some oddities, such as kernels different than python, will make it crash. So we recommend that contributors first build the book with the added notebooks.

```sh
conda env create -f ./conda/environment.yml
conda activate curriculum_book

```

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.
44 changes: 36 additions & 8 deletions book/Chapter1-GettingStarted/1.5_version_control_git.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ GitHub has a Command Line Interface to use with the Terminal. Check out the Gith
GitHub has a GUI [desktop app](https://desktop.github.com/) for all OS, including MacOSX and Windows. The desktop app handles the CLI in a user friendly API (Application Programming Interface). The workflow and visualization are really friendly and it is recommended to use from the laptop environment. In JupyterHubs from remote servers, it is still necessary to use CLI.
## Notes on GitHub enhanced authentication
### Notes on GitHub enhanced authentication
GitHub offers 3 ways to enhance authentication. Download the Android/iOS GitHub Mobile app. Just like Duo, GitHub will use the phone for additional layers of authentication.
* Username + Password with two-factor authentication (2FA), which requires the GitHub Mobile App.
Expand Down Expand Up @@ -224,7 +224,7 @@ Then copy the ``environment.yml`` file from the MLGeo2023 course into your own r
git checkout
git status
## Work as a team with GitHub
## Work as a team
The main branch should remain the clean, official version for the public.
Expand Down Expand Up @@ -264,14 +264,38 @@ GitHub Issues: Use template
Further discussions [here](https://rewind.com/blog/best-practices-for-using-github-issues/)
## Additional Resources
The [Turing Way](https://book.the-turing-way.org/reproducible-research/vcs) ha excellent resources for version control.
## Recommended Repository Structure
## Recommended GitHub Repository Structure for Python Software
### Repository Structure
```
your-repo/ ├── .github/ # GitHub-specific files (e.g., issue templates, workflows) │ ├── ISSUE_TEMPLATE/ │ ├── PULL_REQUEST_TEMPLATE.md │ └── workflows/ │ └── ci.yml # Continuous Integration configuration ├── docs/ # Documentation files │ ├── conf.py # Sphinx configuration file │ ├── index.rst # Main documentation file │ └── ... ├── your_package/ # Main package directory │ ├── init.py # Package initialization │ ├── module1.py # Example module │ ├── module2.py # Example module │ └── ... ├── tests/ # Unit tests │ ├── init.py │ ├── test_module1.py # Tests for module1 │ ├── test_module2.py # Tests for module2 │ └── ... ├── .gitignore # Git ignore file ├── environment.yml # Conda environment file ├── requirements.txt # Pip requirements file ├── setup.py # Setup script for packaging ├── README.md # Project README file ├── LICENSE # License file └── CONTRIBUTING.md # Contribution guidelines
```tree
your-repo/
├── .github/ # GitHub-specific files (e.g., issue templates, workflows)
│ ├── ISSUE_TEMPLATE/
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ └── ci.yml # Continuous Integration configuration
├── docs/ # Documentation files
│ ├── conf.py # Sphinx configuration file
│ ├── index.rst # Main documentation file
│ └── ...
├── your_package/ # Main package directory
│ ├── init.py # Package initialization
│ ├── module1.py # Example module
│ ├── module2.py # Example module
│ └── ...
├── tests/ # Unit tests
│ ├── init.py
│ ├── test_module1.py # Tests for module1
│ ├── test_module2.py # Tests for module2
│ └── ...
├── .gitignore # Git ignore file
├── environment.yml # Conda environment file
├── requirements.txt # Pip requirements file
├── setup.py # Setup script for packaging
├── README.md # Project README file
├── LICENSE # License file
└── CONTRIBUTING.md # Contribution guidelines
```
Expand Down Expand Up @@ -359,4 +383,8 @@ Copy the homeworks into your own repository (MLGEO2022_UWNETID). You can play wi
Handling .gitignore to avoid having large files pushed to remote server.
Handling .gitignore to avoid having large files pushed to remote server.
## Additional Resources
The [Turing Way](https://book.the-turing-way.org/reproducible-research/vcs) ha excellent resources for version control.
Loading

0 comments on commit 12ed053

Please sign in to comment.