generated from kevinlin1/just-the-class
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from phrdang/main
Seamless Learning Workshop changes
- Loading branch information
Showing
39 changed files
with
542 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Contributing | ||
|
||
TODO write docs for staff here | ||
|
||
## Continuous Integration (GitHub Actions) | ||
|
||
TODO Info here about workflows and links | ||
|
||
## Testing | ||
|
||
To run tests, run `bundle exec rspec` | ||
|
||
## Resources | ||
|
||
- [Jekyll](https://jekyllrb.com/) | ||
- [GitHub](https://docs.github.com/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Run axe linter | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dequelabs/axe-linter-action@v1 | ||
with: | ||
api_key: ${{ secrets.AXE_LINTER_API_KEY }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: reviewdog | ||
on: [pull_request] | ||
jobs: | ||
pylint: | ||
name: runner / pylint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dciborow/[email protected] | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review]. | ||
reporter: github-pr-check | ||
# Change reporter level if you need. | ||
# GitHub Status Check won't become failure with warning. | ||
level: warning | ||
glob_pattern: "**/*.py" | ||
|
||
black: | ||
name: runner / black | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check files using the black formatter | ||
uses: rickstaa/[email protected] | ||
id: action_black | ||
with: | ||
black_args: "." | ||
- name: Annotate diff changes using reviewdog | ||
if: steps.action_black.outputs.is_formatted == 'true' | ||
uses: reviewdog/action-suggester@v1 | ||
with: | ||
tool_name: blackfmt | ||
|
||
markdownlint: | ||
name: runner / markdownlint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: markdownlint | ||
uses: reviewdog/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
reporter: github-pr-check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Run rspec tests | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
# The Ruby version is determined by either a `.ruby-version` or a `.tool-versions` file in root of the repo. | ||
bundler-cache: true | ||
- name: Run rspec tests | ||
run: | | ||
bundle exec rspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--require spec_helper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,13 @@ | ||
source 'https://rubygems.org' | ||
gem 'github-pages', group: :jekyll_plugins | ||
gem 'jekyll-sitemap' | ||
gem 'webrick' | ||
|
||
group :development, :test do | ||
gem "rspec" | ||
gem "selenium-webdriver" | ||
gem "capybara" | ||
gem "rack-jekyll" | ||
gem "axe-core-rspec" | ||
gem "axe-core-capybara" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,41 @@ | ||
--- | ||
layout: home | ||
title: Just the Class | ||
nav_exclude: true | ||
permalink: /:path/ | ||
seo: | ||
type: Course | ||
name: Just the Class | ||
--- | ||
# Berkeley Class Site | ||
|
||
# Just the Class | ||
A template for UC Berkeley class websites (with a focus on EECS/CS/DS courses). | ||
|
||
Just the Class is a GitHub Pages template developed for the purpose of quickly deploying course websites. In addition to serving plain web pages and files, it provides a boilerplate for: | ||
## Installation | ||
|
||
- [announcements](announcements.md), | ||
- a [course calendar](calendar.md), | ||
- a [staff](staff.md) page, | ||
- and a weekly [schedule](schedule.md). | ||
Prerequisites: | ||
|
||
Just the Class is a template that extends the popular [Just the Docs](https://github.com/just-the-docs/just-the-docs) theme, which provides a robust and thoroughly-tested foundation for your website. Just the Docs include features such as: | ||
- You have everything that [Jekyll requires](https://jekyllrb.com/docs/installation/) | ||
- You have installed [Bundler](https://bundler.io/): Run `gem install jekyll bundler` | ||
|
||
- automatic [navigation structure](https://just-the-docs.github.io/just-the-docs/docs/navigation-structure/), | ||
- instant, full-text [search](https://just-the-docs.github.io/just-the-docs/docs/search/) and page indexing, | ||
- and a set of [UI components](https://just-the-docs.github.io/just-the-docs/docs/ui-components) and authoring [utilities](https://just-the-docs.github.io/just-the-docs/docs/utilities). | ||
1. [Fork](https://github.com/berkeley-eecs/berkeley-class-site/fork) the repository. | ||
2. Clone your fork (replace `YOUR_GITHUB_USERNAME` and `YOUR_REPO` accordingly). | ||
``` | ||
git clone [email protected]:YOUR_GITHUB_USERNAME/YOUR_REPO.git | ||
``` | ||
3. Install dependencies: | ||
``` | ||
cd YOUR_REPO | ||
bundle install | ||
``` | ||
|
||
## Getting Started | ||
## Usage | ||
|
||
Getting started with Just the Class is simple. | ||
To run the site locally, run: | ||
|
||
1. Create a [new repository based on Just the Class](https://github.com/kevinlin1/just-the-class/generate). | ||
1. Update `_config.yml` and `README.md` with your course information. [Be sure to update the url and baseurl](https://mademistakes.com/mastering-jekyll/site-url-baseurl/). | ||
1. Configure a [publishing source for GitHub Pages](https://help.github.com/en/articles/configuring-a-publishing-source-for-github-pages). Your course website is now live! | ||
1. Edit and create `.md` [Markdown files](https://guides.github.com/features/mastering-markdown/) to add more content pages. | ||
``` | ||
bundle exec jekyll serve | ||
``` | ||
|
||
Just the Class has been used by instructors at Stanford University ([CS 161](https://stanford-cs161.github.io/winter2021/)), UC Berkeley ([Data 100](https://ds100.org/fa21/)), UC Santa Barbara ([CSW8](https://ucsb-csw8.github.io/s22/)), Northeastern University ([CS4530/5500](https://neu-se.github.io/CS4530-CS5500-Spring-2021/)), and Carnegie Mellon University ([17-450/17-950](https://cmu-crafting-software.github.io/)). Share your course website and find more examples in the [show and tell discussion](https://github.com/kevinlin1/just-the-class/discussions/categories/show-and-tell)! | ||
## Deployment | ||
|
||
### Local development environment | ||
The easiest way to deploy your site is with [GitHub Pages](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll). | ||
|
||
Just the Class requires no special Jekyll plugins and can run on GitHub Pages' standard Jekyll compiler. To setup a local development environment, clone your template repository and follow the GitHub Docs on [Testing your GitHub Pages site locally with Jekyll](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll). | ||
## Contributing | ||
|
||
See [CONTRIBUTING.md](.github/CONTRIBUTING.md) for instructions on how to develop this site as part of course staff or if you're interested in contributing to this template repository. | ||
|
||
## License | ||
|
||
[MIT](LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,11 @@ title: Just the Class | |
tagline: A Jekyll template for course websites | ||
description: A modern, highly customizable, responsive Jekyll template for course websites | ||
author: Kevin Lin | ||
baseurl: '/just-the-class' # the subpath of your site, e.g. /blog | ||
url: 'https://kevinl.info' # the base hostname & protocol for your site, e.g. http://example.com | ||
exclude: ["Gemfile", "Gemfile.lock", "LICENSE"] | ||
baseurl: '/berkeley-class-site' # the subpath of your site, e.g. /blog | ||
url: 'https://phrdang.github.io' # the base hostname & protocol for your site, e.g. http://example.com | ||
plugins: | ||
- "jekyll-sitemap" | ||
exclude: ["Gemfile", "Gemfile.lock", "vendor", "node_modules", "LICENSE"] | ||
|
||
# Theme settings | ||
remote_theme: just-the-docs/[email protected] | ||
|
@@ -37,13 +39,42 @@ footer_content: | |
# Collections for website data | ||
collections: | ||
staffers: | ||
sort_by: name | ||
modules: | ||
schedules: | ||
announcements: | ||
labs: | ||
output: true | ||
permalink: /:collection/:path | ||
hw: | ||
output: true | ||
permalink: /:collection/:path | ||
projects: | ||
output: true | ||
permalink: /:collection/:path | ||
|
||
# Default layouts for each collection type | ||
defaults: | ||
- scope: | ||
path: '' | ||
type: labs | ||
values: | ||
layout: lab | ||
nav_exclude: true | ||
- scope: | ||
path: '' | ||
type: hw | ||
values: | ||
layout: hw | ||
nav_exclude: true | ||
- scope: | ||
path: '' | ||
type: projects | ||
values: | ||
layout: project | ||
nav_exclude: true | ||
- scope: | ||
path: '_staffers' | ||
type: staffers | ||
values: | ||
layout: staffer | ||
|
@@ -73,3 +104,7 @@ compress_html: | |
startings: [] | ||
blanklines: false | ||
profile: false | ||
|
||
# Course variables | ||
course_email: [email protected] | ||
gradescope_course_id: 693229 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: HW 1 | ||
description: Recursion | ||
due: "2024-06-13 11:59:59 PM PST" | ||
gradescope_assignment_id: 3858564 | ||
submission_files: | ||
- hw01.py | ||
--- | ||
|
||
1. TOC | ||
{:toc} | ||
|
||
## Q1: Sample Question | ||
|
||
{% include questions/sample_question.md %} | ||
|
||
## Q2: Another Question | ||
|
||
{% include questions/another_question.md %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Use Ok to test your code: | ||
|
||
``` | ||
python3 ok -q {{ include.question }} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
This is another sample question description. | ||
|
||
{% highlight python %} | ||
{% include questions/another_question.py %} | ||
{% endhighlight %} | ||
|
||
{% include okpy.md question="another_question" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
def another_question(a, b, c): | ||
""" | ||
>>> another_question(1, 2, 3) | ||
6 | ||
>>> another_question(0, 0, 0) | ||
0 | ||
>>> another_question(3, 0, 0) | ||
3 | ||
""" | ||
# BEGIN SOLUTION | ||
return a + b + c | ||
# END SOLUTION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
This is a sample question description. | ||
|
||
{% highlight python %} | ||
{% include questions/sample_question.py %} | ||
{% endhighlight %} | ||
|
||
{% include okpy.md question="sample_question" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
def sample_question(a, b, c): | ||
""" | ||
>>> another_question(1, 2, 3) | ||
6 | ||
>>> another_question(0, 0, 0) | ||
0 | ||
>>> another_question(3, 0, 0) | ||
3 | ||
""" | ||
# BEGIN SOLUTION | ||
return a + b + c | ||
# END SOLUTION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
When you are done, submit your file to <a href="https://www.gradescope.com/courses/{{ site.gradescope_course_id }}/assignments/{{ include.gradescope_assignment_id }}">Gradescope</a>. You only need to upload the following files: | ||
|
||
<ul> | ||
{% for file in include.submission_files %} | ||
<li>{{ file }}</li> | ||
{% endfor %} | ||
</ul> | ||
|
||
You may submit more than once before the deadline; only the final submission will be graded. It is your responsibility to check that the autograder on Gradescope runs as expected after you upload your submission. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: Lab 1 | ||
description: Control and Functions | ||
due: "2024-06-13 11:59:59 PM PST" | ||
gradescope_assignment_id: 3858564 | ||
submission_files: | ||
- lab01.py | ||
- another_file.py | ||
--- | ||
|
||
1. TOC | ||
{:toc} | ||
|
||
## Q1: Sample Question | ||
|
||
{% include questions/sample_question.md %} | ||
|
||
## Q2: Another Question | ||
|
||
{% include questions/another_question.md %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
<div class="hw"> | ||
<h1>{{ page.title }}: {{ page.description }}</h1> | ||
<div class="due">Due at: {{ page.due }}</div> | ||
<!-- TODO zip file button starter code (zero fill) --> | ||
|
||
{{ content }} | ||
|
||
<h2>Submission</h2> | ||
{% include submission.html gradescope_assignment_id=page.gradescope_assignment_id submission_files=page.submission_files %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
<div class="lab"> | ||
<h1>{{ page.title }}: {{ page.description }}</h1> | ||
<div class="due">Due at: {{ page.due }}</div> | ||
<!-- TODO zip file button starter code (zero fill) --> | ||
|
||
{{ content }} | ||
|
||
<h2>Submission</h2> | ||
{% include submission.html gradescope_assignment_id=page.gradescope_assignment_id submission_files=page.submission_files %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
<div class="project"> | ||
<h1>{{ page.title }}: {{ page.description }}</h1> | ||
<div class="due">Due at: {{ page.due }}</div> | ||
<!-- TODO zip file button starter code (zero fill) --> | ||
|
||
{{ content }} | ||
|
||
<h2>Submission</h2> | ||
{% include submission.html gradescope_assignment_id=page.gradescope_assignment_id submission_files=page.submission_files %} | ||
</div> |
Oops, something went wrong.