Skip to content

Commit

Permalink
Remove stale files and update readme to be more accurate
Browse files Browse the repository at this point in the history
  • Loading branch information
msschwartz21 committed Jul 23, 2024
1 parent 0a632e0 commit b3293ca
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 59 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@ jupyter lab
```

## TA Info
- For development purposes please install `black`, `jupytext` and `nbconvert`. To generate the solution and exercise notebooks from `solution.py`, run `sh prepare-exercise.sh`.
- The `setup.sh` has to install jupyter lab with `mamba install -y -c conda-forge jupyterlab`.
Each exercise should contain at least three files:
- `README.md` contains very short setup instructions. Instruct students to run the setup script and then to run `jupyter lab` from the base environment.
- `solution.py` is a python script formatted for display/conversion to a jupyter notebook. You can use `jupytext` when you are writing your exercise so that this happens almost automatically. Please tag task and solution cells so that they can be removed from solution and exercise notebooks respectively.
- The github action `build-notebooks` included in this repo will automatically generate two notebooks from `solution.py` : `exercise.ipynb` and `solution.ipynb`
- `setup.sh` is a bash script to run all setup tasks needed to use the notebook, e.g. create environment, pip installs, data download, data extraction, etc. Please comment the script so that students can understand what you did. Additionally the first cell of your notebook should recap what happened in the setup script.
- Reactivate base environment at the end of the script so that students are prepared to run `jupyter lab` to start the exercise
41 changes: 0 additions & 41 deletions convert-solution.py

This file was deleted.

10 changes: 0 additions & 10 deletions prepare-exercise.sh

This file was deleted.

16 changes: 10 additions & 6 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
envname = 000-example-exercise

# Create environment name based on the exercise name
mamba create -n 000-example-exercise python=3.10
mamba activate 000-example-exercise
# Install additional requirements
mamba install numpy pandas matplotlib
mamba create -n $envname python=3.10
if [[ "$CONDA_DEFAULT_ENV" == "$envname" ]]; then
echo "Environment activated successfully for package installs"
mamba install numpy pandas matplotlib
else
echo "Failed to activate environment for package installs. Dependencies not installed!"

# Return to base environment
mamba activate base
mamba deactivate; mamba activate base

# Download and extract data, etc.
# Download and extract data, etc.

0 comments on commit b3293ca

Please sign in to comment.