From ad2155e95e028e0f95e4eb46126d83446e6fa0f4 Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 11 Mar 2024 07:05:19 -0500 Subject: [PATCH 01/11] Create check-spelling.yml Signed-off-by: Mike --- .github/workflows/check-spelling.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/workflows/check-spelling.yml diff --git a/.github/workflows/check-spelling.yml b/.github/workflows/check-spelling.yml new file mode 100644 index 0000000..f3efb66 --- /dev/null +++ b/.github/workflows/check-spelling.yml @@ -0,0 +1,5 @@ + - name: Check Spelling (JS, Vue, HTML, Markdown, Text) + # You may pin to the exact commit or the version. + # uses: UnicornGlobal/spellcheck-github-actions@729ccf160f6e72bd078904cddd5e6244f81ee156 + uses: UnicornGlobal/spellcheck-github-actions@0.4.0 + From 7dbb48748a46c43353b5a42cc4b554590d07352a Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 11 Mar 2024 07:10:24 -0500 Subject: [PATCH 02/11] Update python-package.yml Signed-off-by: Mike --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 48ab044..07ac698 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: [ "3.10"] steps: - uses: actions/checkout@v3 From e5ef5077d2489881a3d91034071f61976de59293 Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 11 Mar 2024 07:27:02 -0500 Subject: [PATCH 03/11] Create create-github-action.yml Signed-off-by: Mike --- .github/workflows/create-github-action.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/create-github-action.yml diff --git a/.github/workflows/create-github-action.yml b/.github/workflows/create-github-action.yml new file mode 100644 index 0000000..15a61d6 --- /dev/null +++ b/.github/workflows/create-github-action.yml @@ -0,0 +1,18 @@ +name: GitHub Actions Demo +run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 +on: [push] +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." From 8af68d0707f14bd1dfc1aba117ab5af4ecb7eeca Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 11 Mar 2024 07:37:54 -0500 Subject: [PATCH 04/11] Create issue-creation.yml Signed-off-by: Mike --- .github/workflows/issue-creation.yml | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/issue-creation.yml diff --git a/.github/workflows/issue-creation.yml b/.github/workflows/issue-creation.yml new file mode 100644 index 0000000..fcd2ef5 --- /dev/null +++ b/.github/workflows/issue-creation.yml @@ -0,0 +1,29 @@ +name: Report remaining open issues +on: + schedule: + # Daily at 8:20 UTC + - cron: '20 8 * * *' +jobs: + track_pr: + runs-on: ubuntu-latest + steps: + - run: | + numOpenIssues="$(gh api graphql -F owner=$OWNER -F name=$REPO -f query=' + query($name: String!, $owner: String!) { + repository(owner: $owner, name: $name) { + issues(states:OPEN){ + totalCount + } + } + } + ' --jq '.data.repository.issues.totalCount')" + + echo 'NUM_OPEN_ISSUES='$numOpenIssues >> $GITHUB_ENV + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OWNER: ${{ github.repository_owner }} + REPO: ${{ github.event.repository.name }} + - run: | + gh issue create --title "Issue report" --body "$NUM_OPEN_ISSUES issues remaining" --repo $GITHUB_REPOSITORY + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 4144159ca6b7b5e8f7508bc2ea9ed9bf16ec8de6 Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 11 Mar 2024 08:08:00 -0500 Subject: [PATCH 05/11] Create excludes.txt Signed-off-by: Mike --- .github/spelling/excludes.txt | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/spelling/excludes.txt diff --git a/.github/spelling/excludes.txt b/.github/spelling/excludes.txt new file mode 100644 index 0000000..23eba03 --- /dev/null +++ b/.github/spelling/excludes.txt @@ -0,0 +1,35 @@ +# apple +\bdeveloper\.apple\.com/[-\w?=/]+ +# Non-English +[a-zA-Z]*[ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŸŽž][a-zA-ZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŸŽž]* + +# French +# This corpus only had capital letters, but you probably want lowercase ones as well. +\b[LN]'+[a-z]+\b + +# the negative lookahead here is to allow catching 'templatesz' as a misspelling +# but to otherwise recognize a Windows path with \templates\foo.template or similar: +\\templates(?![a-z]) +# ignore long runs of a single character: +\b([A-Za-z])\g{-1}{3,}\b +# Note that the next example is no longer necessary if you are using +# to match a string starting with a `#`, use a character-class: +[#]backwards +# version suffix v# +[Vv]\d+(?:\b|(?=[a-zA-Z_])) +# Compiler flags (Scala) +(?:^|[\t ,>"'`=(])(?:-J|)-[DPWXY] +# Compiler flags +(?:^|[\t ,"'`=(])-[DPWXYLlf] +# Compiler flags (linker) +,-B +# curl arguments +\b(?:\\n|)curl(?:\s+-[a-zA-Z]+)+ +# set arguments +\bset(?:\s+-[abefimouxE]{1,2})*\s+-[abefimouxE]{3,}(?:\s+-[abefimouxE]+)* +# tar arguments +\b(?:\\n|)tar(?:\.exe|)(?:(?:\s+--[-a-zA-Z]+|\s+-[a-zA-Z]+|\s[a-z]+)(?:=[^ ]*|))+ +# tput arguments -- https://man7.org/linux/man-pages/man5/terminfo.5.html -- technically they can be more than 5 chars long... +\btput\s+(?:(?:-[SV]|-T\s*\w+)\s+)*\w{3,5}\b +# macOS temp folders +/var/folders/\w\w/[+\w]+/(?:T|-Caches-)/ From 15466ac22a2965aec763d0cd8e9fd8841a89efab Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 11 Mar 2024 08:09:54 -0500 Subject: [PATCH 06/11] Update README.md Signed-off-by: Mike --- README.md | 205 +----------------------------------------------------- 1 file changed, 2 insertions(+), 203 deletions(-) diff --git a/README.md b/README.md index 22da351..ae95463 100644 --- a/README.md +++ b/README.md @@ -1,203 +1,2 @@ -# Pi-Dash - DIY Dashcam using Raspberry Pi
-
- - -Say Goodbye to personal injury scams, and introduce yourself to your own DIY dashcam built and ported to a raspberry pi. d The pi dash was designed to simplify data collection, and teach you how to automatically record when utilizing your vehicle. This way, you manually store your data and recordings on a drive you can take out whenever you need it. The code is layed out so you can manipulate it as you please in case you want to add your own personal code with it. - -Using a computer like a raspberry pi zero, the project takes advantage of small form factor to create a working, standalone device built from scratch that you combine or mix with unlimited capabilities. - -This repository contains instructions, files to run scripts and services required to record ongoing video with the option of running code automatically when the device turns on. Recordings are stored on an SD card (or USB drive) that you can remove any time you want a chance to review the footage. - -Many customizations are available, as I implemented a battery on my personal device to enable offline transfer of videos for extra security. Please feel free to fork, export the project, and utilize the project however you please. - -\ - - ![pidash image here](images/pidash.jpg) -
-
- ![pidash installed image here](images/pidash-installed.jpg) -
-
-## What you’ll find in this document - -This document has five chapters: - -- **[1. Setting up the rpi image](#User-guide)** - -Explaining functionality through prototype build through easy-to-follow tutorial aimed at how the project is working - -- **[2. Assembling and gathering components](#User-guide)** - -Explaining functionality through prototype build through easy-to-follow tutorial aimed at how the project is working - -- **[3. Setting up and testing pi dashcam for automatic recordings of preferred length](#Software-for-rpi)** - -An easy-to-follow software overview of services set on rpi to make automatic recording of camera whenever you turn on the device. -- **[4. printing out the case for all your components(OPTIONAL) ](#Experiment-with-Alto)** - -A set of simple experiments to help understand how Alto works, and how you can use Alto to introduce some of the basic concepts of machine learning to others. - -- **[5. Putting together the device with the car mounting equipment.Setting up your device in your car for aesthetic build](#Remixing-Alto-for-your-projects)** - -A brief introduction to how you can hack your Alto to look and behave differently to fit your own application. - -~~- **[Technical overview](#Technical-Overview)** - -A more detailed overview of Alto’s software and electronics and how they function.
~~ -
- -> ## Instructional guide (prototype build) -> Here are the instructions for starting the basic prototype set to ensure that your pi is effectively recording using the camera you are working with and storing it in the location you write. I recommend you start with a raspberry pi zero to ensure compatibility and minimal form factor for the device intended for a specific purpose. -> -> First, boot up your pi. You will need a way to easily utilize the header pins which can be done with ease using a spread out breadboard connected to the rpi zero using a breakout + cable. Keep in mind that this can be done instead with standard breadboard pins but might not as resilient to tinkereres with vibrating and careless fingers. and your pi. -> -> Some additional (optional) hardware that will simplify and speed your development are: -> - - LED lights: used as hardware debugging measurements to track progress of running code/services the pi will run -> - resisters: in conjuction with LED -> -> ### Machine learning at its simplest -> -> Alto has a camera on its front, and an arm and button on each side. Alto uses the camera to observe the world around it. The buttons are used to start learning, and Alto will point with its arm when it sees something it has learned to recognise. -> -> ![about alto animated gif](images/alto-readme-2.gif)
->
-> -> Alto can learn two classes of things. When Alto recognises one of them, it will point with its corresponding arm. Alto demonstrates machine learning at its most basic level: what you teach it to recognise is up to you! -> -> ![alto points at fruit](images/alto-readme-3.gif)
->
-> -> ### Teaching Alto -> -> To teach Alto to recognise an object, place the object in front of it, and press one of the buttons on the side. As Alto takes images to learn about the object, its arm will slowly raise. When Alto’s arm is stretched out horizontally, the learning process has finished. Now, when the same object is placed in front of it, Alto will point at the object. -> -> The more you teach Alto about the same object, the better it will become at recognising that thing. You can teach Alto as many times as you like! Try teaching Alto more about an object by rotating the object to show different angles and place it at various distances, pressing the same button each time. -> -> It's important to try and balance the amount of learning that Alto does on each side. If it learns about one object 5 times, but only once about another, then it is likely to be much better at recognising the one that it has seen more often. -> -> -> ![alto points at red apples](images/alto-readme-4.gif) ->
->
-> ### Recognising objects -> -> Start by teaching Alto to recognise a different object for each arm, for example, to teach Alto the difference between types of fruit, teach it about a red apple on one side, and a banana on the other. -> -> ![alto points at a red apple](images/alto-readme-5.gif) ->
->
-> ### Recognising classes -> -> Beyond recognising individual objects, you can teach Alto to recognise classes of objects. Building on what it has learned about red apples, could you teach it to recognise red objects in general, rather than just apples? Once Alto has learned to recognise two classes, can it correctly recognise a new red object that it hasn’t seen before? -> -> ![alto points at red objects](images/alto-readme-6.gif) ->
->
-> ### Forgetting -> -> If you want to teach Alto something new, you can clear its memory by holding down both buttons simultaneously for 3 seconds. This will erase everything Alto was taught on both sides, and can’t be undone. -> -> To learn about any of these processes in more detail, take a look at the [Experiment with Alto](#experiment-with-Alto) section below. -> -> ![alto forgets](images/alto-readme-7.gif) ->
->
-## Make your own Pi Dashcam -The following steps will guide you through the process of assembling your own Pi Dash: setting up the Raspberry Pi, soldering the electronics, and assembling a case to house all the components. To read a more detailed explanation of each step, click on the links in each section to go to the individual instruction pages. - -![soldering overhead](images/alto-readme-8.png) -
-
-### 1.0: [Set up the software](1.0-Set-up-the-software.md) - -The first step is to setup the software environment for the dashcam, and then load the Python code that makes the code function. The Software & OS section outlines the process in full, starting with setting up the Raspberry Pi Zero, flashing the SD card and installing the depedencies and updates to your machine. - -![terminal output installing software](images/alto-readme-9.gif) -
-
-### 2.0: [Build the electronics](2.0-Build-the-electronics.md) - -The electronics for dashcam have been designed to be as simple and hackable as possible. You only need a few common components and basic soldering skills (OPTIONAL) to assemble everything. ~~A full step-by-step guide, with schematics and a bill of materials, is included in the Electronics directory in this repository.~~ - -![overhead shot of some electronics](images/alto-readme-10.png) -
-
-### 3.0: [ Setting up and testing pi dashcam for automatic recordings of preferred length ](3.0-Making-the-electronics-casing.md) - - - -~~To begin, you will need to print out the [PDF template](casing/alto-paper-templates.pdf) and stick it to your materials. This will be your guide for cutting the cardboard into the correct shape. All the labels are printed on the template itself.~~ - - -For more detailed instructions on this stage of constructing your Alto, refer to the [electronics casing](3.1-Making-the-electronics-casing.md) instructions. - -![cutting out and assembling paper parts](images/alto-readme-11.gif) -
-
- - - -![assembling alto's casing](images/alto-readme-12.gif) -
-
-### 4.0: [Printing out the electronics casing (OPTIONAL)](4.0-experiments-with-alto.md) - -You should now have a completed pi Dash unit – the next stage is to test it with the scripts included. - -~~Grab some objects, plug Alto into a power source, and start exploring what you can teach Alto to recognise. If you need a bit of inspiration to get going, take a look at the Experimenting with Alto section below.~~ - -![dashcam standing flat](images/alto-readme-13.png) -
-
-## [Experiment with Alto](4.0-experiments-with-alto.md) - -Alto is a great way to understand the basics of machine learning. This section contains a number of experiments to help understand how Alto works, and introduce the basics of machine learning to others. - -Covering aspects from simple object recognition, to introducing k-nearest neighbor (kNN) algorithms, these experiments give practical ways to bring the concepts behind Alto to life. Head to the [Experiments with Alto](4.0-experiments-with-alto.md) page to read on. - -![alto pointed at a red apple](images/alto-readme-14.png) -
-
-## [Remixing Alto for your projects](5.0-remixing-alto.md) - -All the hardware and software for Alto was created with hacking and remixing in mind: the case design can be made from different materials, or refactored entirely; the electronics can be adapted to use whatever components you have available; the servos can be substituted for any type of actuator; and the software is written in a high level language (Python) that is easy to modify. - -Here are just some of the ways you can hack your own Alto: - -![different alto form factors](images/alto-readme-15.gif) -
-
-### Hacking the [software](5.0-remixing-alto.md#hacking-altos-software) -~~Small tweaks to the existing code can be made to change Alto’s confidence level or behaviours.~~ - -![changing alto's code](images/alto-readme-16.gif) -
-
-### Hacking the [hardware](5.0-remixing-alto.md#hacking-altos-hardware) - -~~Go beyond servos, to explore new ways for Alto to show its recognised something.~~ - -![alto with LED confidence meter](images/alto-readme-17.gif) -
-
-### Hacking the [casing](5.0-remixing-alto.md#hacking-altos-casing) - -~~The casing for Alto can easily be changed to fit whatever application you might have in mind. Whether that’s simple aesthetic changes to modify Alto’s look, or changes to the design of the arms or body that might let Alto do new things.~~ - - - - - -### OS & compute - -The Raspberry Pi Zero runs Raspberry Pi OS. It is responsible for interfacing with the user’s connected hardware (connected via GPIO, USB or ribben cable). - -### Software - -~~The Alto software application is written in Python and bash (via scripts). It receives input from the Raspberry Pi camera module, prepares it for for storage organized via date/time. For the more technical part, I have put some code that is good starter for those looking to send files to their personal cloud or storage device once they are in proximity to wireless connection. -When Alto is learning, it calculates the embedding of the incoming data from the image sensor in its model and assigns it a label - in the case of Alto, this label is either its left or right arm. When Alto is in recognition mode, the embeddings of data frames from the image sensor are determined and their proximity to other known embeddings is calculated; if these are within a certain distance of a labelled embedding, then Alto has recognised something, and will point at it with its corresponding arm.~~ -
-
- -### Electronics - -The electronics for the pi dash are designed to be as flexible and hackable as possible. It is based around a single through-hole prototyping board which can be assembled easily by hand. This board connects to the GPIO or via micro usb to a charger that outputs steady voltage/current to ensure your rpi doesn't break or slow down in recording. - -~~You can find more information about the electronics in the [electronics](2.0-Build-the-electronics.md) directory, and the bill of materials is available [here](electronics/alto-bom.xlsx) as a downloadable spreadsheet.
~~ -
- - +Create status badges +[![GitHub Actions Demo](https://github.com/Robjects-Pi/pi-dash/actions/workflows/create-github-action.yml/badge.svg?branch=garzarobm-patch-1)](https://github.com/Robjects-Pi/pi-dash/actions/workflows/create-github-action.yml) From 883c4cdd6a2ed53d94c0ceeeafd2c41f7ac9307e Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 11 Mar 2024 08:12:36 -0500 Subject: [PATCH 07/11] Update git-auto-commit.yml Signed-off-by: Mike --- .github/workflows/git-auto-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/git-auto-commit.yml b/.github/workflows/git-auto-commit.yml index de43dde..75844cf 100644 --- a/.github/workflows/git-auto-commit.yml +++ b/.github/workflows/git-auto-commit.yml @@ -1,4 +1,4 @@ - - name: Git Auto Commit +name: Git Auto Commit # You may pin to the exact commit or the version. # uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d uses: stefanzweifel/git-auto-commit-action@v5.0.0 From dbc76f26ccfd6d519b882ac33d8a6f7f873d484b Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 11 Mar 2024 08:14:22 -0500 Subject: [PATCH 08/11] Update git-auto-commit.yml Signed-off-by: Mike --- .github/workflows/git-auto-commit.yml | 76 +++++++++++++-------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/.github/workflows/git-auto-commit.yml b/.github/workflows/git-auto-commit.yml index 75844cf..d376e07 100644 --- a/.github/workflows/git-auto-commit.yml +++ b/.github/workflows/git-auto-commit.yml @@ -2,41 +2,41 @@ name: Git Auto Commit # You may pin to the exact commit or the version. # uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d uses: stefanzweifel/git-auto-commit-action@v5.0.0 - with: - # Commit message - commit_message: # optional, default is Apply automatic changes - # Git branch name, where changes should be pushed too. Required if Action is used on the `pull_request` event - branch: # optional, default is ${{ github.head_ref }} - # Commit options (eg. --no-verify) - commit_options: # optional, default is - # Add options (eg. -u) - add_options: # optional, default is - # Status options (eg. --untracked-files=no) - status_options: # optional, default is - # File pattern used for `git add`. For example `src/*.js` - file_pattern: # optional, default is . - # Local file path to the git repository. Defaults to the current directory (`.`) - repository: # optional, default is . - # Name used for the commit user - commit_user_name: # optional, default is github-actions[bot] - # Email address used for the commit user - commit_user_email: # optional, default is 41898282+github-actions[bot]@users.noreply.github.com - # Value used for the commit author. Defaults to the username of whoever triggered this workflow run. - commit_author: # optional, default is ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> - # Message used to create a new git tag with the commit. Keep this empty, if no tag should be created. - tagging_message: # optional, default is - # Push options (eg. --force) - push_options: # optional, default is - # Skip the check if the git repository is dirty and always try to create a commit. - skip_dirty_check: # optional - # Skip the call to git-fetch. - skip_fetch: # optional - # Skip the call to git-checkout. - skip_checkout: # optional - # Stop the shell from expanding filenames (https://www.gnu.org/software/bash/manual/html_node/Filename-Expansion.html) - disable_globbing: # optional - # Create new branch with the name of `branch`-input in local and remote repository, if it doesn't exist yet. - create_branch: # optional - # Internal use only! Path to git binary used to check if git is available. (Don't change this!) - internal_git_binary: # optional, default is git - + with: + # Commit message + commit_message: # optional, default is Apply automatic changes + # Git branch name, where changes should be pushed too. Required if Action is used on the `pull_request` event + branch: # optional, default is ${{ github.head_ref }} + # Commit options (eg. --no-verify) + commit_options: # optional, default is + # Add options (eg. -u) + add_options: # optional, default is + # Status options (eg. --untracked-files=no) + status_options: # optional, default is + # File pattern used for `git add`. For example `src/*.js` + file_pattern: # optional, default is . + # Local file path to the git repository. Defaults to the current directory (`.`) + repository: # optional, default is . + # Name used for the commit user + commit_user_name: # optional, default is github-actions[bot] + # Email address used for the commit user + commit_user_email: # optional, default is 41898282+github-actions[bot]@users.noreply.github.com + # Value used for the commit author. Defaults to the username of whoever triggered this workflow run. + commit_author: # optional, default is ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + # Message used to create a new git tag with the commit. Keep this empty, if no tag should be created. + tagging_message: # optional, default is + # Push options (eg. --force) + push_options: # optional, default is + # Skip the check if the git repository is dirty and always try to create a commit. + skip_dirty_check: # optional + # Skip the call to git-fetch. + skip_fetch: # optional + # Skip the call to git-checkout. + skip_checkout: # optional + # Stop the shell from expanding filenames (https://www.gnu.org/software/bash/manual/html_node/Filename-Expansion.html) + disable_globbing: # optional + # Create new branch with the name of `branch`-input in local and remote repository, if it doesn't exist yet. + create_branch: # optional + # Internal use only! Path to git binary used to check if git is available. (Don't change this!) + internal_git_binary: # optional, default is git + From 2ffd23a995baeb1ec8b3ebb2be027de5abe6c121 Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 11 Mar 2024 08:40:41 -0500 Subject: [PATCH 09/11] Update check-spelling.yml Signed-off-by: Mike --- .github/workflows/check-spelling.yml | 30 +++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check-spelling.yml b/.github/workflows/check-spelling.yml index f3efb66..c9c88bf 100644 --- a/.github/workflows/check-spelling.yml +++ b/.github/workflows/check-spelling.yml @@ -1,5 +1,25 @@ - - name: Check Spelling (JS, Vue, HTML, Markdown, Text) - # You may pin to the exact commit or the version. - # uses: UnicornGlobal/spellcheck-github-actions@729ccf160f6e72bd078904cddd5e6244f81ee156 - uses: UnicornGlobal/spellcheck-github-actions@0.4.0 - +on: + issue_comment: + types: + - 'created' + +jobs: + update: + name: Update PR + permissions: + contents: write + pull-requests: write + actions: read + runs-on: ubuntu-latest + if: ${{ + github.event_name == 'issue_comment' && + github.event.issue.pull_request && + contains(github.event.comment.body, '@check-spelling-bot apply') + }} + steps: + - name: apply spelling updates + uses: check-spelling/check-spelling@main + with: + experimental_apply_changes_via_bot: 1 + checkout: true + ssh_key: "${{ secrets.CHECK_SPELLING }}" From 8a0780c31dd00327cfeba58422b803ffa500008c Mon Sep 17 00:00:00 2001 From: garzarobm Date: Mon, 11 Mar 2024 09:08:33 -0500 Subject: [PATCH 10/11] add spell-check changes --- .github/workflows/check-spelling.yml | 42 ++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check-spelling.yml b/.github/workflows/check-spelling.yml index f3efb66..e0b22ac 100644 --- a/.github/workflows/check-spelling.yml +++ b/.github/workflows/check-spelling.yml @@ -1,5 +1,37 @@ - - name: Check Spelling (JS, Vue, HTML, Markdown, Text) - # You may pin to the exact commit or the version. - # uses: UnicornGlobal/spellcheck-github-actions@729ccf160f6e72bd078904cddd5e6244f81ee156 - uses: UnicornGlobal/spellcheck-github-actions@0.4.0 - +jobs: + spellcheck: + runs-on: ubuntu-latest + steps: + - name: Check Spelling + uses: UnicornGlobal/spellcheck-github-actions@0.5.0 + with: + # The languages to check + languages: "en" + # The file extensions to check + extensions: "js,vue,html,md" + # The file paths to check + paths: "." + # The file paths to ignore + ignorePaths: "node_modules,dist" + # The file paths to ignore + ignoreFiles: "README.md" + # The file paths to ignore + ignoreTitles: "true" + # The file paths to ignore + ignoreCode: "true" + # The file paths to ignore + ignoreUppercase: "true" + # The file paths to ignore + ignoreDigits: "true" + # The file paths to ignore + ignoreUrls: "true" + # The file paths to ignore + ignoreEmails: "true" + # The file paths to ignore + ignoreAcronyms: "true" + # The file paths to ignore + ignoreMixed: "true" + # The file paths to ignore + ignoreWords: "true" + # The file paths to ignore + ignoreNumbers: "true" \ No newline at end of file From a293b3275969d93656b72b4947f4ef7ccce55ba7 Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 11 Mar 2024 09:33:26 -0500 Subject: [PATCH 11/11] Update README.md (#8) --- .github/workflows/check-spelling.yml | 25 ---- .github/workflows/create-github-action.yml | 18 --- .github/workflows/git-auto-commit.yml | 42 ------ .github/workflows/issue-creation.yml | 29 ---- .github/workflows/python-package.yml | 42 ------ .github/workflows/shellcheck.yml | 17 +++ .github/workflows/spelling.yml | 166 --------------------- README.md | 1 + 8 files changed, 18 insertions(+), 322 deletions(-) delete mode 100644 .github/workflows/check-spelling.yml delete mode 100644 .github/workflows/create-github-action.yml delete mode 100644 .github/workflows/git-auto-commit.yml delete mode 100644 .github/workflows/issue-creation.yml delete mode 100644 .github/workflows/python-package.yml create mode 100644 .github/workflows/shellcheck.yml delete mode 100644 .github/workflows/spelling.yml diff --git a/.github/workflows/check-spelling.yml b/.github/workflows/check-spelling.yml deleted file mode 100644 index c9c88bf..0000000 --- a/.github/workflows/check-spelling.yml +++ /dev/null @@ -1,25 +0,0 @@ -on: - issue_comment: - types: - - 'created' - -jobs: - update: - name: Update PR - permissions: - contents: write - pull-requests: write - actions: read - runs-on: ubuntu-latest - if: ${{ - github.event_name == 'issue_comment' && - github.event.issue.pull_request && - contains(github.event.comment.body, '@check-spelling-bot apply') - }} - steps: - - name: apply spelling updates - uses: check-spelling/check-spelling@main - with: - experimental_apply_changes_via_bot: 1 - checkout: true - ssh_key: "${{ secrets.CHECK_SPELLING }}" diff --git a/.github/workflows/create-github-action.yml b/.github/workflows/create-github-action.yml deleted file mode 100644 index 15a61d6..0000000 --- a/.github/workflows/create-github-action.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: GitHub Actions Demo -run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 -on: [push] -jobs: - Explore-GitHub-Actions: - runs-on: ubuntu-latest - steps: - - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - name: Check out repository code - uses: actions/checkout@v4 - - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." - - run: echo "🖥️ The workflow is now ready to test your code on the runner." - - name: List files in the repository - run: | - ls ${{ github.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." diff --git a/.github/workflows/git-auto-commit.yml b/.github/workflows/git-auto-commit.yml deleted file mode 100644 index d376e07..0000000 --- a/.github/workflows/git-auto-commit.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Git Auto Commit - # You may pin to the exact commit or the version. - # uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d - uses: stefanzweifel/git-auto-commit-action@v5.0.0 - with: - # Commit message - commit_message: # optional, default is Apply automatic changes - # Git branch name, where changes should be pushed too. Required if Action is used on the `pull_request` event - branch: # optional, default is ${{ github.head_ref }} - # Commit options (eg. --no-verify) - commit_options: # optional, default is - # Add options (eg. -u) - add_options: # optional, default is - # Status options (eg. --untracked-files=no) - status_options: # optional, default is - # File pattern used for `git add`. For example `src/*.js` - file_pattern: # optional, default is . - # Local file path to the git repository. Defaults to the current directory (`.`) - repository: # optional, default is . - # Name used for the commit user - commit_user_name: # optional, default is github-actions[bot] - # Email address used for the commit user - commit_user_email: # optional, default is 41898282+github-actions[bot]@users.noreply.github.com - # Value used for the commit author. Defaults to the username of whoever triggered this workflow run. - commit_author: # optional, default is ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> - # Message used to create a new git tag with the commit. Keep this empty, if no tag should be created. - tagging_message: # optional, default is - # Push options (eg. --force) - push_options: # optional, default is - # Skip the check if the git repository is dirty and always try to create a commit. - skip_dirty_check: # optional - # Skip the call to git-fetch. - skip_fetch: # optional - # Skip the call to git-checkout. - skip_checkout: # optional - # Stop the shell from expanding filenames (https://www.gnu.org/software/bash/manual/html_node/Filename-Expansion.html) - disable_globbing: # optional - # Create new branch with the name of `branch`-input in local and remote repository, if it doesn't exist yet. - create_branch: # optional - # Internal use only! Path to git binary used to check if git is available. (Don't change this!) - internal_git_binary: # optional, default is git - diff --git a/.github/workflows/issue-creation.yml b/.github/workflows/issue-creation.yml deleted file mode 100644 index fcd2ef5..0000000 --- a/.github/workflows/issue-creation.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Report remaining open issues -on: - schedule: - # Daily at 8:20 UTC - - cron: '20 8 * * *' -jobs: - track_pr: - runs-on: ubuntu-latest - steps: - - run: | - numOpenIssues="$(gh api graphql -F owner=$OWNER -F name=$REPO -f query=' - query($name: String!, $owner: String!) { - repository(owner: $owner, name: $name) { - issues(states:OPEN){ - totalCount - } - } - } - ' --jq '.data.repository.issues.totalCount')" - - echo 'NUM_OPEN_ISSUES='$numOpenIssues >> $GITHUB_ENV - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OWNER: ${{ github.repository_owner }} - REPO: ${{ github.event.repository.name }} - - run: | - gh issue create --title "Issue report" --body "$NUM_OPEN_ISSUES issues remaining" --repo $GITHUB_REPOSITORY - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml deleted file mode 100644 index 07ac698..0000000 --- a/.github/workflows/python-package.yml +++ /dev/null @@ -1,42 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: Python package - -on: - push: - branches: - - main - - release/* - pull_request: - branches: [ "main" ] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: [ "3.10"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml new file mode 100644 index 0000000..2d693dc --- /dev/null +++ b/.github/workflows/shellcheck.yml @@ -0,0 +1,17 @@ +on: + push: + branches: + - prerelease + +name: "Trigger: Push action" +permissions: {} + +jobs: + shellcheck: + name: Shellcheck + runs-on: ubuntu-latest + steps: + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@master + with: + scandir: 'software' diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml deleted file mode 100644 index 38dece4..0000000 --- a/.github/workflows/spelling.yml +++ /dev/null @@ -1,166 +0,0 @@ -name: Check Spelling - -# Comment management is handled through a secondary job, for details see: -# https://github.com/check-spelling/check-spelling/wiki/Feature%3A-Restricted-Permissions -# -# `jobs.comment-push` runs when a push is made to a repository and the `jobs.spelling` job needs to make a comment -# (in odd cases, it might actually run just to collapse a comment, but that's fairly rare) -# it needs `contents: write` in order to add a comment. -# -# `jobs.comment-pr` runs when a pull_request is made to a repository and the `jobs.spelling` job needs to make a comment -# or collapse a comment (in the case where it had previously made a comment and now no longer needs to show a comment) -# it needs `pull-requests: write` in order to manipulate those comments. - -# Updating pull request branches is managed via comment handling. -# For details, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-expect-list -# -# These elements work together to make it happen: -# -# `on.issue_comment` -# This event listens to comments by users asking to update the metadata. -# -# `jobs.update` -# This job runs in response to an issue_comment and will push a new commit -# to update the spelling metadata. -# -# `with.experimental_apply_changes_via_bot` -# Tells the action to support and generate messages that enable it -# to make a commit to update the spelling metadata. -# -# `with.ssh_key` -# In order to trigger workflows when the commit is made, you can provide a -# secret (typically, a write-enabled github deploy key). -# -# For background, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-with-deploy-key - -# Sarif reporting -# -# Access to Sarif reports is generally restricted (by GitHub) to members of the repository. -# -# Requires enabling `security-events: write` -# and configuring the action with `use_sarif: 1` -# -# For information on the feature, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Sarif-output - -# Minimal workflow structure: -# -# on: -# push: -# ... -# pull_request_target: -# ... -# jobs: -# # you only want the spelling job, all others should be omitted -# spelling: -# # remove `security-events: write` and `use_sarif: 1` -# # remove `experimental_apply_changes_via_bot: 1` -# ... otherwise adjust the `with:` as you wish - -on: - push: - branches: - - "**" - tags-ignore: - - "**" - pull_request_target: - branches: - - "**" - types: - - 'opened' - - 'reopened' - - 'synchronize' - issue_comment: - types: - - 'created' - -jobs: - spelling: - name: Check Spelling - permissions: - contents: read - pull-requests: read - actions: read - security-events: write - outputs: - followup: ${{ steps.spelling.outputs.followup }} - runs-on: ubuntu-latest - if: ${{ contains(github.event_name, 'pull_request') || github.event_name == 'push' }} - concurrency: - group: spelling-${{ github.event.pull_request.number || github.ref }} - # note: If you use only_check_changed_files, you do not want cancel-in-progress - cancel-in-progress: true - steps: - - name: check-spelling - id: spelling - uses: check-spelling/check-spelling@main - with: - suppress_push_for_open_pull_request: ${{ github.actor != 'dependabot[bot]' && 1 }} - checkout: true - check_file_names: 1 - spell_check_this: check-spelling/spell-check-this@prerelease - post_comment: 0 - use_magic_file: 1 - report-timing: 1 - warnings: bad-regex,binary-file,deprecated-feature,large-file,limited-references,no-newline-at-eof,noisy-file,non-alpha-in-dictionary,token-is-substring,unexpected-line-ending,whitespace-in-dictionary,minified-file,unsupported-configuration,no-files-to-check - experimental_apply_changes_via_bot: 1 - use_sarif: ${{ (!github.event.pull_request || (github.event.pull_request.head.repo.full_name == github.repository)) && 1 }} - extra_dictionary_limit: 20 - extra_dictionaries: - cspell:software-terms/dict/softwareTerms.txt - - comment-push: - name: Report (Push) - # If your workflow isn't running on push, you can remove this job - runs-on: ubuntu-latest - needs: spelling - permissions: - contents: write - if: (success() || failure()) && needs.spelling.outputs.followup && github.event_name == 'push' - steps: - - name: comment - uses: check-spelling/check-spelling@main - with: - checkout: true - spell_check_this: check-spelling/spell-check-this@prerelease - task: ${{ needs.spelling.outputs.followup }} - - comment-pr: - name: Report (PR) - # If you workflow isn't running on pull_request*, you can remove this job - runs-on: ubuntu-latest - needs: spelling - permissions: - contents: read - pull-requests: write - if: (success() || failure()) && needs.spelling.outputs.followup && contains(github.event_name, 'pull_request') - steps: - - name: comment - uses: check-spelling/check-spelling@main - with: - checkout: true - spell_check_this: check-spelling/spell-check-this@prerelease - task: ${{ needs.spelling.outputs.followup }} - experimental_apply_changes_via_bot: 1 - - update: - name: Update PR - permissions: - contents: write - pull-requests: write - actions: read - runs-on: ubuntu-latest - if: ${{ - github.event_name == 'issue_comment' && - github.event.issue.pull_request && - contains(github.event.comment.body, '@check-spelling-bot apply') - }} - concurrency: - group: spelling-update-${{ github.event.issue.number }} - cancel-in-progress: false - steps: - - name: apply spelling updates - uses: check-spelling/check-spelling@main - with: - experimental_apply_changes_via_bot: 1 - checkout: true - ssh_key: "${{ secrets.CHECK_SPELLING }}" diff --git a/README.md b/README.md index ae95463..64be73c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ Create status badges [![GitHub Actions Demo](https://github.com/Robjects-Pi/pi-dash/actions/workflows/create-github-action.yml/badge.svg?branch=garzarobm-patch-1)](https://github.com/Robjects-Pi/pi-dash/actions/workflows/create-github-action.yml) +