From a78027570b3e42100a62cded09a870a17edbc2bb Mon Sep 17 00:00:00 2001 From: Ikechukwu Uchendu Date: Wed, 22 Nov 2023 10:34:19 -0500 Subject: [PATCH] Making sure to update and upgrade dist packages before trying to install github CLI --- .all-contributorsrc | 203 ++++++++------------ .github/workflows/auto-add-contributors.yml | 110 +++++------ .github/workflows/markdown_linter.yml | 45 ++--- README.md | 85 +++----- contributors.qmd | 47 ++--- 5 files changed, 202 insertions(+), 288 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 1c211d560..33fe81150 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -7,17 +7,17 @@ ], "contributors": [ { - "login": "michael-schnebly", - "name": "Michael Schnebly", - "avatar_url": "https://avatars.githubusercontent.com/michael-schnebly", - "profile": "https://github.com/michael-schnebly", + "login": "jaysonzlin", + "name": "Jayson Lin", + "avatar_url": "https://avatars.githubusercontent.com/jaysonzlin", + "profile": "https://github.com/jaysonzlin", "contributions": [] }, { - "login": "sophiacho1", - "name": "sophiacho1", - "avatar_url": "https://avatars.githubusercontent.com/sophiacho1", - "profile": "https://github.com/sophiacho1", + "login": "ShvetankPrakash", + "name": "Shvetank Prakash", + "avatar_url": "https://avatars.githubusercontent.com/ShvetankPrakash", + "profile": "https://github.com/ShvetankPrakash", "contributions": [] }, { @@ -28,52 +28,17 @@ "contributions": [] }, { - "login": "oishib", - "name": "oishib", - "avatar_url": "https://avatars.githubusercontent.com/oishib", - "profile": "https://github.com/oishib", - "contributions": [] - }, - { - "login": "andreamurillomtz", - "name": "Andrea Murillo", - "avatar_url": "https://avatars.githubusercontent.com/andreamurillomtz", - "profile": "https://github.com/andreamurillomtz", - "contributions": [] - }, - { - "login": "arnaumarin", - "name": "arnaumarin", - "avatar_url": "https://avatars.githubusercontent.com/arnaumarin", - "profile": "https://github.com/arnaumarin", - "contributions": [] - }, - { - "login": "jasonlyik", - "name": "Jason Yik", - "avatar_url": "https://avatars.githubusercontent.com/jasonlyik", - "profile": "https://github.com/jasonlyik", - "contributions": [] - }, - { - "login": "Naeemkh", - "name": "naeemkh", - "avatar_url": "https://avatars.githubusercontent.com/Naeemkh", - "profile": "https://github.com/Naeemkh", - "contributions": [] - }, - { - "login": "sjohri20", - "name": "sjohri20", - "avatar_url": "https://avatars.githubusercontent.com/sjohri20", - "profile": "https://github.com/sjohri20", + "login": "ishapira1", + "name": "ishapira", + "avatar_url": "https://avatars.githubusercontent.com/ishapira1", + "profile": "https://github.com/ishapira1", "contributions": [] }, { - "login": "Ekhao", - "name": "Emil Njor", - "avatar_url": "https://avatars.githubusercontent.com/Ekhao", - "profile": "https://github.com/Ekhao", + "login": "alxrod", + "name": "alxrod", + "avatar_url": "https://avatars.githubusercontent.com/alxrod", + "profile": "https://github.com/alxrod", "contributions": [] }, { @@ -83,20 +48,6 @@ "profile": "https://github.com/happyappledog", "contributions": [] }, - { - "login": "ishapira1", - "name": "ishapira", - "avatar_url": "https://avatars.githubusercontent.com/ishapira1", - "profile": "https://github.com/ishapira1", - "contributions": [] - }, - { - "login": "ShvetankPrakash", - "name": "Shvetank Prakash", - "avatar_url": "https://avatars.githubusercontent.com/ShvetankPrakash", - "profile": "https://github.com/ShvetankPrakash", - "contributions": [] - }, { "login": "Mjrovai", "name": "Marcelo Rovai", @@ -105,17 +56,10 @@ "contributions": [] }, { - "login": "jared-ni", - "name": "Jared Ni", - "avatar_url": "https://avatars.githubusercontent.com/jared-ni", - "profile": "https://github.com/jared-ni", - "contributions": [] - }, - { - "login": "jzhou1318", - "name": "Jennifer Zhou", - "avatar_url": "https://avatars.githubusercontent.com/jzhou1318", - "profile": "https://github.com/jzhou1318", + "login": "uchendui", + "name": "Ikechukwu Uchendu", + "avatar_url": "https://avatars.githubusercontent.com/uchendui", + "profile": "https://github.com/uchendui", "contributions": [] }, { @@ -126,24 +70,24 @@ "contributions": [] }, { - "login": "BaeHenryS", - "name": "Henry Bae", - "avatar_url": "https://avatars.githubusercontent.com/BaeHenryS", - "profile": "https://github.com/BaeHenryS", + "login": "sophiacho1", + "name": "sophiacho1", + "avatar_url": "https://avatars.githubusercontent.com/sophiacho1", + "profile": "https://github.com/sophiacho1", "contributions": [] }, { - "login": "gnodipac886", - "name": "Eric D", - "avatar_url": "https://avatars.githubusercontent.com/gnodipac886", - "profile": "https://github.com/gnodipac886", + "login": "jessicaquaye", + "name": "Jessica Quaye", + "avatar_url": "https://avatars.githubusercontent.com/jessicaquaye", + "profile": "https://github.com/jessicaquaye", "contributions": [] }, { - "login": "profvjreddi", - "name": "Vijay Janapa Reddi", - "avatar_url": "https://avatars.githubusercontent.com/profvjreddi", - "profile": "https://github.com/profvjreddi", + "login": "Ekhao", + "name": "Emil Njor", + "avatar_url": "https://avatars.githubusercontent.com/Ekhao", + "profile": "https://github.com/Ekhao", "contributions": [] }, { @@ -153,6 +97,13 @@ "profile": "https://github.com/mmaz", "contributions": [] }, + { + "login": "profvjreddi", + "name": "Vijay Janapa Reddi", + "avatar_url": "https://avatars.githubusercontent.com/profvjreddi", + "profile": "https://github.com/profvjreddi", + "contributions": [] + }, { "login": "AditiR-42", "name": "AditiR_42", @@ -160,13 +111,6 @@ "profile": "https://github.com/AditiR-42", "contributions": [] }, - { - "login": "arbass22", - "name": "Andrew Bass", - "avatar_url": "https://avatars.githubusercontent.com/arbass22", - "profile": "https://github.com/arbass22", - "contributions": [] - }, { "login": "aptl26", "name": "aptl26", @@ -175,38 +119,31 @@ "contributions": [] }, { - "login": "jaysonzlin", - "name": "Jayson Lin", - "avatar_url": "https://avatars.githubusercontent.com/jaysonzlin", - "profile": "https://github.com/jaysonzlin", - "contributions": [] - }, - { - "login": "jessicaquaye", - "name": "Jessica Quaye", - "avatar_url": "https://avatars.githubusercontent.com/jessicaquaye", - "profile": "https://github.com/jessicaquaye", + "login": "mpstewart1", + "name": "Matthew Stewart", + "avatar_url": "https://avatars.githubusercontent.com/mpstewart1", + "profile": "https://github.com/mpstewart1", "contributions": [] }, { - "login": "colbybanbury", - "name": "Colby Banbury", - "avatar_url": "https://avatars.githubusercontent.com/colbybanbury", - "profile": "https://github.com/colbybanbury", + "login": "Naeemkh", + "name": "naeemkh", + "avatar_url": "https://avatars.githubusercontent.com/Naeemkh", + "profile": "https://github.com/Naeemkh", "contributions": [] }, { - "login": "mpstewart1", - "name": "Matthew Stewart", - "avatar_url": "https://avatars.githubusercontent.com/mpstewart1", - "profile": "https://github.com/mpstewart1", + "login": "sjohri20", + "name": "sjohri20", + "avatar_url": "https://avatars.githubusercontent.com/sjohri20", + "profile": "https://github.com/sjohri20", "contributions": [] }, { - "login": "alxrod", - "name": "alxrod", - "avatar_url": "https://avatars.githubusercontent.com/alxrod", - "profile": "https://github.com/alxrod", + "login": "michael-schnebly", + "name": "Michael Schnebly", + "avatar_url": "https://avatars.githubusercontent.com/michael-schnebly", + "profile": "https://github.com/michael-schnebly", "contributions": [] }, { @@ -217,17 +154,31 @@ "contributions": [] }, { - "login": "pongtr", - "name": "Pong Trairatvorakul", - "avatar_url": "https://avatars.githubusercontent.com/pongtr", - "profile": "https://github.com/pongtr", + "login": "colbybanbury", + "name": "Colby Banbury", + "avatar_url": "https://avatars.githubusercontent.com/colbybanbury", + "profile": "https://github.com/colbybanbury", "contributions": [] }, { - "login": "uchendui", - "name": "Ikechukwu Uchendu", - "avatar_url": "https://avatars.githubusercontent.com/uchendui", - "profile": "https://github.com/uchendui", + "login": "jared-ni", + "name": "Jared Ni", + "avatar_url": "https://avatars.githubusercontent.com/jared-ni", + "profile": "https://github.com/jared-ni", + "contributions": [] + }, + { + "login": "BaeHenryS", + "name": "Henry Bae", + "avatar_url": "https://avatars.githubusercontent.com/BaeHenryS", + "profile": "https://github.com/BaeHenryS", + "contributions": [] + }, + { + "login": "oishib", + "name": "oishib", + "avatar_url": "https://avatars.githubusercontent.com/oishib", + "profile": "https://github.com/oishib", "contributions": [] } ], diff --git a/.github/workflows/auto-add-contributors.yml b/.github/workflows/auto-add-contributors.yml index 765e2afb9..8e8418f3a 100644 --- a/.github/workflows/auto-add-contributors.yml +++ b/.github/workflows/auto-add-contributors.yml @@ -1,59 +1,61 @@ name: Automatically Add Contributors on: - push: - branches: - - main + push: + branches: + - main jobs: - update-contributors: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Setup Python3.11 - uses: actions/setup-python@v4 - with: - python-version: 3.11 + update-contributors: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Python3.11 + uses: actions/setup-python@v4 + with: + python-version: 3.11 - - name: Installing GitHub CLI - run: | - sudo apt install -y gh jq nodejs npm - - name: Install python packages - run: | - python -m pip install --upgrade pip - pip install -r .github/workflows/contributors/requirements.txt + - name: Installing GitHub CLI + run: | + sudo apt -y update && sudo apt -y upgrade + sudo apt -y install software-properties-common + sudo apt install -y gh jq nodejs npm + - name: Install python packages + run: | + python -m pip install --upgrade pip + pip install -r .github/workflows/contributors/requirements.txt - - name: Auto add contributor job has been triggered - run: | - echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - - name: Running Python Script to Update .all-contributorsrc - run: | - echo "Running Python Script to Update .all-contributorsrc" - python .github/workflows/contributors/update_contributors.py - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Using all-contributors CLI to update files - run: | - echo "Using all-contributors CLI to update files" - npm i -D all-contributors-cli - npx all-contributors generate - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git config --global user.name "github-actions[bot]" - - # Stash any changes made to the README.md and contributors.qmd files - git stash - - # Fetch the latest state of the master branch and try to merge - git fetch origin main - git merge origin/main - - # Pop the stashed changes - git stash pop - - git add -u - git diff-index --quiet HEAD || git commit -m "Update readme and contributors.qmd with contributors" - git push - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Auto add contributor job has been triggered + run: | + echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - name: Running Python Script to Update .all-contributorsrc + run: | + echo "Running Python Script to Update .all-contributorsrc" + python .github/workflows/contributors/update_contributors.py + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Using all-contributors CLI to update files + run: | + echo "Using all-contributors CLI to update files" + npm i -D all-contributors-cli + npx all-contributors generate + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "github-actions[bot]" + + # Stash any changes made to the README.md and contributors.qmd files + git stash + + # Fetch the latest state of the master branch and try to merge + git fetch origin main + git merge origin/main + + # Pop the stashed changes + git stash pop + + git add -u + git diff-index --quiet HEAD || git commit -m "Update readme and contributors.qmd with contributors" + git push + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/markdown_linter.yml b/.github/workflows/markdown_linter.yml index fb9641c71..41fbffa39 100644 --- a/.github/workflows/markdown_linter.yml +++ b/.github/workflows/markdown_linter.yml @@ -7,29 +7,30 @@ jobs: lint-qmd-files: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 - - name: Installing GitHub CLI - run: | - sudo apt install -y gh jq nodejs npm + - name: Installing GitHub CLI + run: | + sudo apt -y update && sudo apt -y upgrade + sudo apt -y install software-properties-common + sudo apt install -y gh jq nodejs npm - - - name: Installing Markdown Linter - run: | - sudo npm install -g markdownlint-cli + - name: Installing Markdown Linter + run: | + sudo npm install -g markdownlint-cli - - name: Markdown linting job has been triggered - run: | - echo "The job was automatically triggered by a ${{ github.event_name }} event." + - name: Markdown linting job has been triggered + run: | + echo "The job was automatically triggered by a ${{ github.event_name }} event." - - name: Running markdown linter - run: | - markdownlint --config .github/workflows/markdown_linter/.mdlintconfig.yml --ignore-path .github/workflows/markdown_linter/.mdlintignore ./ - ret=$? - if [ $ret -eq 1 ]; then - echo "Linting failed. Please correct any errors and run the job again." - exit 1 - fi \ No newline at end of file + - name: Running markdown linter + run: | + markdownlint --config .github/workflows/markdown_linter/.mdlintconfig.yml --ignore-path .github/workflows/markdown_linter/.mdlintignore ./ + ret=$? + if [ $ret -eq 1 ]; then + echo "Linting failed. Please correct any errors and run the job again." + exit 1 + fi diff --git a/README.md b/README.md index dcb40f8ac..c86ad0309 100644 --- a/README.md +++ b/README.md @@ -2,69 +2,55 @@ [![All Contributors](https://img.shields.io/github/all-contributors/harvard-edge/cs249r_book?color=ee8449&style=flat-square)](#contributors) -Welcome to the collaborative book repository for students of CS249r: Tiny -Machine Learning at Harvard! This repository contains the source files -of chapters and sections written by your peers. We're excited to see your -contributions! +Welcome to the collaborative book repository for students of CS249r: Tiny Machine Learning at Harvard! This repository +contains the source files of chapters and sections written by your peers. We're excited to see your contributions! ## Contributing To contribute to the repository using pull requests, follow these steps: 1. **Fork the Repository**: - - - Navigate to the repository's GitHub page and click the 'Fork' button at - the top-right corner. + - Navigate to the repository's GitHub page and click the 'Fork' button at the top-right corner. 2. **Clone Your Forked Repository**: - ```bash git clone https://github.com/YOUR_USERNAME/cs249r_book.git ``` 3. **Navigate to the Repository**: - ```bash cd cs249r_book ``` 4. **Set Upstream Remote**: - ```bash git remote add upstream https://github.com/harvard-edge/cs249r_book.git ``` 5. **Create a New Branch** for your chapter/section: - ```bash git checkout -b name-of-your-new-branch ``` -6. **Make your edits** for your chapter or section - in [Markdown](https://quarto.org/docs/authoring/markdown-basics.html). +6. **Make your edits** for your chapter or section in [Markdown](https://quarto.org/docs/authoring/markdown-basics.html). 7. **Commit Changes to Your Branch**: - ```bash git add . git commit -m "Briefly describe your changes" ``` 8. **Push Your Branch to Your Forked Repository**: - ```bash git push origin name-of-your-new-branch ``` -9. Navigate to your fork on GitHub and click the 'New pull request' button. - Ensure you're comparing your branch from - your fork to the `main` branch of the original `harvard-edge/cs249r_book` - repository. +9. Navigate to your fork on GitHub and click the 'New pull request' button. Ensure you're comparing your branch from + your fork to the `main` branch of the original `harvard-edge/cs249r_book` repository. 10. Submit the pull request with a descriptive message. -The instructors will assess your pull request and provide feedback. Once it's -approved, your contribution will be +The instructors will assess your pull request and provide feedback. Once it's approved, your contribution will be integrated into the `main` branch, and the book's website will be updated. For a more detailed guide on the CS249r documentation process and peer review, @@ -74,8 +60,7 @@ check [here](https://docs.google.com/document/d/1izDoWwFLnV8XK2FYCl23_9KYL_7EQ5O ## Website -The book's website is automatically constructed from the `gh-pages` branch. Once -reviewed, changes to `main` are merged +The book's website is automatically constructed from the `gh-pages` branch. Once reviewed, changes to `main` are merged into `gh-pages`. You can view the book's website @@ -85,9 +70,7 @@ at: [https://harvard-edge.github.io/cs249r_book/](https://harvard-edge.github.io ## Local Rendering -You need to have `quarto` installed for local rendering of the book. Please -follow -the [Quarto installation instructions here](https://quarto.org/docs/download/). +You need to have `quarto` installed for local rendering of the book. Please follow the [Quarto installation instructions here](https://quarto.org/docs/download/). Once that's done, the following command can be used to produce the HTML pages: @@ -105,50 +88,39 @@ quarto render - - + + - - - - - - - - - + + - - - - - - + - - - + + + + - - - - - + - - + + + - - + + + + +
Michael Schnebly
Michael Schnebly

sophiacho1
sophiacho1

Jayson Lin
Jayson Lin

Shvetank Prakash
Shvetank Prakash

Divya
Divya

oishib
oishib

Andrea Murillo
Andrea Murillo

arnaumarin
arnaumarin

Jason Yik
Jason Yik

naeemkh
naeemkh

sjohri20
sjohri20

Emil Njor
Emil Njor

ishapira
ishapira

alxrod
alxrod

happyappledog
happyappledog

ishapira
ishapira

Shvetank Prakash
Shvetank Prakash

Marcelo Rovai
Marcelo Rovai

Jared Ni
Jared Ni

Jennifer Zhou
Jennifer Zhou

Ikechukwu Uchendu
Ikechukwu Uchendu

Marco Zennaro
Marco Zennaro

Henry Bae
Henry Bae

Eric D
Eric D

Vijay Janapa Reddi
Vijay Janapa Reddi

sophiacho1
sophiacho1

Jessica Quaye
Jessica Quaye

Emil Njor
Emil Njor

Mark Mazumder
Mark Mazumder

Vijay Janapa Reddi
Vijay Janapa Reddi

AditiR_42
AditiR_42

Andrew Bass
Andrew Bass

aptl26
aptl26

Jayson Lin
Jayson Lin

Jessica Quaye
Jessica Quaye

Colby Banbury
Colby Banbury

aptl26
aptl26

Matthew Stewart
Matthew Stewart

alxrod
alxrod

Jeffrey Ma
Jeffrey Ma

naeemkh
naeemkh

sjohri20
sjohri20

Michael Schnebly
Michael Schnebly

Pong Trairatvorakul
Pong Trairatvorakul

Ikechukwu Uchendu
Ikechukwu Uchendu

Jeffrey Ma
Jeffrey Ma

Colby Banbury
Colby Banbury

Jared Ni
Jared Ni

Henry Bae
Henry Bae

oishib
oishib

@@ -158,6 +130,5 @@ quarto render -This project follows the [all-contributors](https://allcontributors.org) -specification. Contributions of any kind are +This project follows the [all-contributors](https://allcontributors.org) specification. Contributions of any kind are welcome! diff --git a/contributors.qmd b/contributors.qmd index 80b705a40..401bd1506 100644 --- a/contributors.qmd +++ b/contributors.qmd @@ -69,50 +69,39 @@ We extend our sincere thanks to the diverse group of individuals who have genero - - + + - - - - - - - - - + + - - - - - - + - - - + + + + - - - - - + - - + + + - - + + + + +
Michael Schnebly
Michael Schnebly

sophiacho1
sophiacho1

Jayson Lin
Jayson Lin

Shvetank Prakash
Shvetank Prakash

Divya
Divya

oishib
oishib

Andrea Murillo
Andrea Murillo

arnaumarin
arnaumarin

Jason Yik
Jason Yik

naeemkh
naeemkh

sjohri20
sjohri20

Emil Njor
Emil Njor

ishapira
ishapira

alxrod
alxrod

happyappledog
happyappledog

ishapira
ishapira

Shvetank Prakash
Shvetank Prakash

Marcelo Rovai
Marcelo Rovai

Jared Ni
Jared Ni

Jennifer Zhou
Jennifer Zhou

Ikechukwu Uchendu
Ikechukwu Uchendu

Marco Zennaro
Marco Zennaro

Henry Bae
Henry Bae

Eric D
Eric D

Vijay Janapa Reddi
Vijay Janapa Reddi

sophiacho1
sophiacho1

Jessica Quaye
Jessica Quaye

Emil Njor
Emil Njor

Mark Mazumder
Mark Mazumder

Vijay Janapa Reddi
Vijay Janapa Reddi

AditiR_42
AditiR_42

Andrew Bass
Andrew Bass

aptl26
aptl26

Jayson Lin
Jayson Lin

Jessica Quaye
Jessica Quaye

Colby Banbury
Colby Banbury

aptl26
aptl26

Matthew Stewart
Matthew Stewart

alxrod
alxrod

Jeffrey Ma
Jeffrey Ma

naeemkh
naeemkh

sjohri20
sjohri20

Michael Schnebly
Michael Schnebly

Pong Trairatvorakul
Pong Trairatvorakul

Ikechukwu Uchendu
Ikechukwu Uchendu

Jeffrey Ma
Jeffrey Ma

Colby Banbury
Colby Banbury

Jared Ni
Jared Ni

Henry Bae
Henry Bae

oishib
oishib