Skip to content

Commit

Permalink
Merge pull request #1 from PeerHerholz/main
Browse files Browse the repository at this point in the history
first draft of template
  • Loading branch information
PeerHerholz authored Jun 2, 2024
2 parents 1d2104c + d081eb5 commit 5e83e86
Show file tree
Hide file tree
Showing 39 changed files with 2,135 additions and 11 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build_course_website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: deploy-course_website

# Only run this when the master branch changes
on:
push:
branches:
- main
# If your git repository has the Jupyter Book within some-subfolder next to
# unrelated files, you can make this run only if a file within that specific
# folder has been modified.
#
# paths:
# - content/**

# This job installs dependencies, build the book, and pushes it to `gh-pages`
jobs:
deploy-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

# Install dependencies
- name: Set up Python 3.10.14
uses: actions/setup-python@v1
with:
python-version: 3.10.14

- name: Install dependencies
run: |
pip install -r requirements.txt
# Build the page
- name: Build the book
run: |
jupyter-book build course/
# Push the book's HTML to github-pages
- name: GitHub Pages action
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./course/_build/html
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
course/_build/*
.DS_store
*/.DS_store
19 changes: 10 additions & 9 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
BSD 3-Clause License

Copyright (c) 2024, SPARK - CSD @ Northwestern
Copyright (c) 2024, SPARK
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Expand Down
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
# course_template
The SPARK course template.
![logo](lecture/static/course_name_logo.png)

# The SPARK course template

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/spark-csd/mybinder_course_name/HEAD)
[![GitHub size](https://github-size-badge.herokuapp.com/spark-csd/course_name.svg)](https://github.com/spark-csd/course_name/archive/master.zip)
[![Docker Hub](https://img.shields.io/docker/pulls/spark-csd/course_name)](https://hub.docker.com/r/spark-csd/course_name)
[![License](https://img.shields.io/github/license/spark-csd/course_name)](https://github.com/spark-csd/course_name)


## "What's in this repository?"

This repository contains the template for `SPARK` courses at Northwestern University.

Through this template, we hope to streamline the creation, management, sustainability and distribution of courses conducted as part of `SPARK`. All courses created through this template are intended to either work as quarter-long courses or 3-5 day workshops.

Members of `SPARK` or anyone interested can use this template to create new courses. We created another repository to outline how this template can be used.


## "I have some questions..."

[Open an issue](https://github.com/spark-csd/course_template/issues) on this repository and someone will try and get back to you as soon as possible!
118 changes: 118 additions & 0 deletions check_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
#!/usr/bin/env bash

# Script to run after following all install instructions to make sure that
# everything was installed correctly!
#
# Usage:
#
# $ bash check_install.sh
#
# The script will try and print out any missing programs to the screen with
# brief instructions on how to install them. If everything is installed
# correctly you will see a message printed to screen notifying you of this.
#

missing=

function check_installed() {
func=${1}
hash ${func} 2> /dev/null || {
printf "Missing software program: ${func}. "
printf "Check installation instructions\n"
missing=true
}
}

function get_os() {
UNAME=$( $( command -v uname) -a | tr '[:upper:]' '[:lower:]' )

if echo "${UNAME}" | grep -q "microsoft"; then
printf "windows\n"
elif echo "${UNAME}" | grep -q "darwin"; then
printf "darwin\n"
elif echo "${UNAME}" | grep -q "linux"; then
printf "linux\n"
else
printf "unknown\n"
fi
}


curr_os=$( get_os )

# expected VSCode extensions
extensions=(
ms-azuretools.vscode-docker
ms-python.python
ms-vsliveshare.vsliveshare
ms-vsliveshare.vsliveshare-audio
ms-vsliveshare.vsliveshare-pack
)
if [ "${curr_os}" == "windows" ]; then
extensions+=(ms-vscode-remote.remote-wsl)
fi

# expected importable python package
packages=(
flake8
IPython
jupyter
jupyterlab
matplotlib
nibabel
nilearn
numpy
pandas
scipy
seaborn
)

# check basic installations
check_installed git
check_installed conda
check_installed python
check_installed code
check_installed docker

# check vscode extensions

if [ "${curr_os}" == "windows" ]; then
cmd.exe /c "code --list-extensions" > /tmp/vscode_ext 2> /dev/null
vscode_ext=$( cat /tmp/vscode_ext )
else
vscode_ext=$( code --list-extensions )
fi
for ext in ${extensions[@]}; do
if [[ $vscode_ext != *${ext}* ]]; then
ext=$( echo "${ext}" | tr '[:upper:]' '[:lower:]' )
printf "Missing VSCode extension: "
printf "install with $ code --install-extension ${ext}\n"
missing=true
fi
done

# check python packages
for package in ${packages[@]}; do
python -c "import ${package}" 2> /dev/null || {
package=$( echo "${package}" | tr '[:upper:]' '[:lower:]' )
printf "Missing Python package: "
printf "install with $ conda install ${package}\n"
missing=true
}
done

# congratulations, you did it!
if [ -z ${missing} ]; then
if [ "${curr_os}" != "windows" ]; then
python -c 'print("\U0001f389" * 3, end=" ")'
fi
printf "Everything seems to be installed correctly! "
if [ "${curr_os}" != "windows" ]; then
python -c 'print("\U0001f389" * 3)'
else
printf "\n"
fi
printf "Congratulations, you're all ready for the course!\n"
fi

exit 0
58 changes: 58 additions & 0 deletions course/CoC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Code of Conduct

Hello 👋,

this course is dedicated to providing an environment where people are kind and respectful to each other, a harassment-free learning experience for everyone, regardless of gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, age or religion. We do not tolerate harassment of event participants in any form. Sexual language and imagery is not appropriate for any event venue, including talks. Participants violating these rules may be sanctioned or expelled from the lecture at the discretion of the organizers.

This could really be the end of that code of conduct, but some forms of harassment and negative behavior are fairly hard to identify at first. Please read carefully through the rest of the document to make sure you avoid them. There is also a section to know what to do and expect if you experience behavior that deviates from this code of conduct.

Harassment includes, but _is not limited to_:
⛔ Verbal comments that reinforce social structures of domination related to gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, age or religion.
⛔ Sexual images in public spaces
⛔ Deliberate intimidation, stalking, or following
⛔ Harassing photography or recording
⛔ Sustained disruption of talks or other events
⛔ Inappropriate physical contact
⛔ Advocating for, or encouraging, any of the above behaviour
⛔ Unwelcome sexual attention

## *Microaggressions*
Incidents can take the form of “microaggressions,” which is a damaging form of harassment. Microaggressions are the everyday slights or insults which communicate negative messages to target individuals, often based upon their marginalized group membership. Over time, microaggressions can take a great toll on mental and emotional health, and the target’s feeling of belonging in science and academia. The following examples can all be labeled micro-aggressions:
⛔ Commenting on a woman’s appearance rather than her work;
⛔ Only directing questions at male colleagues when there are female experts in the room;
⛔ Telling someone of colour that they “speak such good English”;
⛔ Forcefully praising meat to an individual with a vegetarian diet;
⛔ Praising alcoholic drinks to an individual who do not consume them.
⛔ Exclusion from a group can be a common nonverbal form of microaggression.
⛔ Microaggressions can be couched in the form of a “compliment,” (e.g. “you’re too attractive to be a scientist”).

## *Respecting differences*
Participants come from many cultures and backgrounds. We therefore expect everyone to be very respectful of different cultural practices, attitudes, and beliefs. This includes being aware of preferred titles and pronouns, as well as using a respectful tone of voice.
While we do not assume participants know the cultural practices of every ethnic and cultural group, we expect members to recognize and respect differences within our community. This means being open to learning from and educating others, as well as educating yourself.

## *How to treat each other*
👍 Be respectful and value each other’s ideas, styles and viewpoints.
👍 Be direct but professional; we cannot withhold hard truths.
👍 Be inclusive and help new perspectives be heard.
👍 Appreciate and accommodate our many cultural practices, attitudes and beliefs.
👍 Be open to learning from others.
👍 Lead by example and match your actions with your words.


## **Enforcement**
Participants asked to stop any harassing behavior are expected to comply immediately. Organizers and presenters are also subject to the anti-harassment policy. In particular, they should not use sexualized images, activities, or other material. Event organisers may take action to redress anything designed to, or with the clear impact of, disrupting the event or making the environment hostile for any participants.

## **Reporting**
If someone makes you or anyone else feel unsafe or unwelcome, please report it as soon as possible to the organizers either in person or by email.

### *Reporting Issues*

Any incident of unacceptable behavior hurts the learning environment for everyone. We are therefore committed to supporting students to access corresponding reporting resources and ensure a supportive environment.

When necessary, an organizer will assist students to file a report at the appropriate university office. Complaints can be filed, without limitation periods, for any incident of harassment that has occurred in the course of university activities, whether on or off-campus.

Also, if you need moral support, feel welcome to ping the organizers in person or by email.


## Attribution
Thanks and credits go the [Montreal Brainhack School]() for providing the CoC, this CoC is based on.
Loading

0 comments on commit 5e83e86

Please sign in to comment.