Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/upstream/develop' into Fix-audi…
Browse files Browse the repository at this point in the history
…ohat-gpio
  • Loading branch information
s-martin committed Dec 26, 2022
2 parents 591336a + cf57396 commit 71b5257
Show file tree
Hide file tree
Showing 102 changed files with 5,498 additions and 2,282 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/components/controls/buttons_usb_encoder/ @jeripeierSBB
/scripts/installscripts/buster-install-default.sh @jeripeierSBB
/scripts/installscripts/buster-install-default-with-autohotspot.sh @jeripeierSBB
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/future3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: future3 Bug Report
about: Use this template to report bugs for the upcoming version 3
title: "ISSUE SUMMARY on future3"
labels: future3, bug, needs triage
---

### Describe your problem

Core, Web application ...

#### What's your hardware set up?

RPi version, RFID Reader, Audio devices etc.

#### If possible, try to attach logs from ... (paths from RPi)

* `~/RPi-Jukebox-RFID/shared/logs` -> General Jukebox logs
* `~/INSTALL-XXXXXXXXX.log` -> The logfile being generated when installing the Jukebox code
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "monthly"

- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "monthly"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -50,7 +50,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -64,4 +64,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
16 changes: 14 additions & 2 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Test Install Scripts on Docker

on: [push]
on:
push:
branches-ignore:
- 'future3/**'
pull_request:
# The branches below must be a subset of the branches above
branches: [ develop ]

jobs:

Expand All @@ -9,10 +15,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Build Docker image and run tests
run: |
docker build . --file ./ci/Dockerfile.buster.test_install.amd64 --tag rpi-jukebox-rfid-buster:latest
docker run --rm -i rpi-jukebox-rfid-buster:latest /code/scripts/installscripts/tests/run_installation_tests.sh
docker run --rm -i rpi-jukebox-rfid-buster:latest /code/scripts/installscripts/tests/run_installation_tests2.sh
docker run --rm -i rpi-jukebox-rfid-buster:latest /code/scripts/installscripts/tests/run_installation_tests3.sh
- name: Build Docker image and run tests for alternate user hans
run: |
docker build . --file ./ci/Dockerfile.buster.test_install_altuser.amd64 --tag rpi-jukebox-rfid-buster-altuser:latest
docker run --rm -i rpi-jukebox-rfid-buster-altuser:latest /code/scripts/installscripts/tests/run_installation_tests_altuser.sh
docker run --rm -i rpi-jukebox-rfid-buster-altuser:latest /code/scripts/installscripts/tests/run_installation_tests2_altuser.sh
docker run --rm -i rpi-jukebox-rfid-buster-altuser:latest /code/scripts/installscripts/tests/run_installation_tests3_altuser.sh
14 changes: 10 additions & 4 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Python Checks and Tests

on: [push]
on:
push:
branches-ignore:
- 'future3/**'
pull_request:
# The branches below must be a subset of the branches above
branches: [ develop ]

jobs:
build:
Expand All @@ -9,12 +15,12 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [3.5, 3.6, 3.7]
python-version: [3.7, 3.8, 3.9, 3.11]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/pythonpackage_future3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Python + Docs Checks and Tests

on:
push:
branches:
- 'future3/**'
paths:
- '**.py'
- '**.py.*'
- 'docs/sphinx/**'
pull_request:
branches:
- 'future3/**'
paths:
- '**.py'
- '**.py.*'
- 'docs/sphinx/**'

jobs:
build:

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.7, 3.8]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev
python -m pip install --upgrade pip
pip install wheel
pip install spidev
pip install -r requirements.txt
# For operation of the Jukebox, ZMQ must be compiled from sources due to Websocket support
# When just building the docs, the regular ZMQ package is sufficient
pip install -r docs/sphinx/requirements_pyzmq.txt
pip install -r docs/sphinx/requirements.txt
# Also install all optional dependencies
pip install -r src/jukebox/components/rfid/fake_reader_gui/requirements.txt
- name: Lint with flake8
run: |
pip install flake8
# Stop the build if linting fails
./run_flake8.sh
- name: Build the docs
working-directory: ./docs/sphinx
run: |
# Stop the build if documentation cannot be built
# Treat all warnings as errors
sphinx-build -W --keep-going -T -a -E -b html . _build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ settings/version
htdocs/config.php
scripts/deviceName.txt
scripts/gpio-buttons.py
settings/PhonieboxInstall.conf

shared/*
playlists/*
Expand Down
51 changes: 26 additions & 25 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,32 @@
# Naming conventions

* **Files & folder names**
* all **lower case**
* separate words with **dashes** `-` (less keystrokes, better autocomplete recognition, in HTML links dashes can not be confused) not camel/PascalCaps or underscores
* be **descriptive** in your wording (e.g. `raspberry`, not `juicy-red-thing`)
* move **from general to specific** (e.g. `food-fruit-raspberry`, not `raspberry-food-fruit`)
* unique and clear product IDs (e.g. MAX7219)
* the product ID should be written as is (no lowercase)
* the product ID should come last in a descriptive name (e.g. dot-matrix-module-MAX7219)
* be consistent and look at existing examples before you invent something new
* all **lower case**
* separate words with **dashes** `-` (less keystrokes, better autocomplete recognition, in HTML links dashes can not be confused) not camel/PascalCaps or underscores
* be **descriptive** in your wording (e.g. `raspberry`, not `juicy-red-thing`)
* move **from general to specific** (e.g. `food-fruit-raspberry`, not `raspberry-food-fruit`)
* unique and clear product IDs (e.g. MAX7219)
* the product ID should be written as is (no lowercase)
* the product ID should come last in a descriptive name (e.g. dot-matrix-module-MAX7219)
* be consistent and look at existing examples before you invent something new

* **`README.md`**
* written in capital letters, so it's easier to spot
* every new folder of a component deserves a `README.md` file
* written in capital letters, so it's easier to spot
* every new folder of a component deserves a `README.md` file

# Structure of files and folders

Inside the root folder or the repo, these folders are important:

* `scripts`
* this folder should contain **only actively used scripts** (controlling playout, rfid tiggers, etc.)
* some possible services and features might live in the *components* directory (see below)
* if one or more scripts are needed for the activation of a component (like daemons), they should be copied to the `scripts` directory during installation / activation
* WHY? By copying, changes will NOT affect the github repo and make it easier for users to modify their components
* this folder should contain **only actively used scripts** (controlling playout, rfid tiggers, etc.)
* some possible services and features might live in the *components* directory (see below)
* if one or more scripts are needed for the activation of a component (like daemons), they should be copied to the `scripts` directory during installation / activation
* WHY? By copying, changes will NOT affect the github repo and make it easier for users to modify their components
* `components`
* contains sub- und subsubfolders for additional features, services, hardware
* **subfolders** are for categories (e.g. displays, soundcards) and are plural, even if there is only one
* **subsubfolders** are specific hardware, services, features, protocols, etc.
* contains sub- und subsubfolders for additional features, services, hardware
* **subfolders** are for categories (e.g. displays, soundcards) and are plural, even if there is only one
* **subsubfolders** are specific hardware, services, features, protocols, etc.

# How to contribute

Expand All @@ -52,7 +52,7 @@ Development is done on the git branch `develop`. How to move to that branch, see
* Use the online line install script to get the box installed.
* By default this will get you to the `master` branch. You will move to the `develop` branch, do this:

~~~
~~~bash
cd /home/pi/RPi-Jukebox-RFID
git checkout develop
git fetch origin
Expand All @@ -62,7 +62,6 @@ git pull

The preferred way of code contributions are [pull requests (follow this link for a small howto)](https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github). And ideally pull requests using the "running code" on the `develop` branch of your Phoniebox. Alternatively, feel free to post tweaks, suggestions and snippets in the ["issues" section](https://github.com/MiczFlor/RPi-Jukebox-RFID/issues).


## Making Changes

* Create a topic branch from where you want to base your work.
Expand Down Expand Up @@ -91,9 +90,10 @@ The preferred way of code contributions are [pull requests (follow this link for
Update: This time without the need to create an extra random.txt file.and uptodate with the
master branch.
~~~

## Making Trivial Changes

For changes of a trivial nature, it is not always necessary to create a new issue.
For changes of a trivial nature, it is not always necessary to create a new issue.
In this case, it is appropriate to start the first line of a
commit with one of `(docs)`, `(maint)`, or `(packaging)` instead of a ticket
number.
Expand All @@ -120,17 +120,18 @@ to detect in advance.

If the code change results in a test failure, we will make our best effort to
correct the error. If a fix cannot be determined and committed within 24 hours
of its discovery, the commit(s) responsible _may_ be reverted, at the
discretion of the committer and Phonie maintainers.
The original contributor will be notified of the revert.
of its discovery, the commit(s) responsible *may* be reverted, at the
discretion of the committer and Phonie maintainers.
The original contributor will be notified of the revert.

### Summary

* Changes resulting in test failures will be reverted if they cannot
be resolved within one business day.

## Guidelines ##
* Currently Phoniebox runs on Raspian **Buster** and **Stretch**. Therefore all Python code should work with **Python 3.5**.
## Guidelines

* Currently Phoniebox runs on Raspian **Buster** . Therefore all Python code should work with **Python 3.7**.
* For GPIO all code should work with **RPi.GPIO**. gpiozero is currently not intended to use.

## Additional Resources
Expand Down
Loading

0 comments on commit 71b5257

Please sign in to comment.