Skip to content

Commit

Permalink
update from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
Groovylein committed Nov 18, 2023
2 parents d0e851f + dfb9e93 commit fd04413
Show file tree
Hide file tree
Showing 168 changed files with 11,060 additions and 22,270 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ indent_size = 4

[*.md]
trim_trailing_whitespace = false

[*.{js,yaml}]
indent_size = 2
2 changes: 0 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ filename = *.py,*.py.*
extend-exclude =
# Ignore all scratch development directories
scratch*,
# The conf file is mostly autogenerated, ignore it
docs/sphinx/conf.py,
# Ignore dirs and files that have not been ported yet
*/jukebox/NvManager.py
# ignore GitHub Codespaces
Expand Down
2 changes: 1 addition & 1 deletion .githooks/post-merge
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ warn_python_requirements() {
echo "ATTENTION: Python requirements have changed since last pull!"
echo ""
echo "To update python requirements on the RPi run"
echo "$ sudo python3 -m pip install --upgrade -r requirements.txt"
echo "$ python -m pip install --upgrade -r requirements.txt"
echo "************************************************************"
echo -e "\n"
}
Expand Down
13 changes: 1 addition & 12 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,7 @@ if [[ -n $PY_FILES ]]; then
echo "Flake8 return code: $flake8_code"
fi

DOC_FILES="$(git diff --diff-filter=d --staged --name-only -- docs/sphinx/*)"
sphinx_code=0
if [[ -n $DOC_FILES || -n $PY_FILES ]]; then
echo -e "\n**************************************************************"
echo -e "Files for documentation modified. Testing re-build of docs ... \n"
echo -e "**************************************************************\n"
./run_sphinx.sh -c
sphinx_code=$?
echo "Sphinx return code: $sphinx_code"
fi

code=$(( flake8_code + sphinx_code ))
code=$(( flake8_code ))

if [[ code -gt 0 ]]; then
echo -e "\n**************************************************************"
Expand Down
26 changes: 26 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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: "npm"
directory: "/"
schedule:
interval: "monthly"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"

- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "monthly"
21 changes: 0 additions & 21 deletions .github/workflows/dockerimage.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/pythonpackage.yml

This file was deleted.

19 changes: 3 additions & 16 deletions .github/workflows/pythonpackage_future3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ on:
paths:
- '**.py'
- '**.py.*'
- 'docs/sphinx/**'
pull_request:
branches:
- 'future3/**'
paths:
- '**.py'
- '**.py.*'
- 'docs/sphinx/**'

jobs:
build:
Expand All @@ -23,26 +21,21 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [3.7, 3.9]
python-version: ['3.7', '3.8', '3.9', '3.10', '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
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev pulseaudio
python3 -m pip install --upgrade pip
pip3 install wheel
pip3 install spidev
pip3 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
pip3 install -r docs/sphinx/requirements_pyzmq.txt
pip3 install -r docs/sphinx/requirements.txt
# Also install all optional dependencies
pip3 install -r src/jukebox/components/rfid/hardware/fake_reader_gui/requirements.txt
pip3 install -r src/jukebox/components/rfid/hardware/pn532_i2c_py532/requirements.txt
Expand All @@ -53,9 +46,3 @@ jobs:
pip3 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
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
/shared/*.*
/shared/*

# Docker
/docker/config/docker.spotify.config.toml

# Documentation builder
/docs/sphinx/_build/

# Application
/src/cli_client/pbc

Expand Down
28 changes: 0 additions & 28 deletions .readthedocs.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at <[email protected]>. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

Expand Down
19 changes: 2 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ The Jukebox core app is written entirely in Python. Therefore, we follow the [Py

* **Documentation**
* You are expected to write some Documentation. It's easy. **Very** easy actually with [Python Docstrings](https://www.geeksforgeeks.org/python-docstrings/)
* If you dare, you may add the python documentation reference to the Sphinx documentation build. But we are also ok with doing that for you


# Structure of files and folders

Inside the root folder or the repo, these folders are important:
Expand All @@ -38,8 +37,6 @@ Inside the root folder or the repo, these folders are important:
* contains the Python packages that are loaded using the plugin interface
* `src/webapp`
* contains the Web Interface
* `src/docs/sphinx`
* contains the documentation sources and build flow using Sphinx

All folders on all hierarchy levels starting with `scratch*` are ignored by git and flake8. These are intended
as local, temporary scratch areas.
Expand Down Expand Up @@ -116,7 +113,7 @@ Run the checks below on the code. Fix those issues! Or you are running in delays
We provide git hooks for those checks for convenience. To activate

~~~bash
cp .githooks/pre-commit .git/hooks/.
cp .githooks/pre-commit` .git/hooks/.
~~~
### Python Code
Expand All @@ -132,18 +129,6 @@ cd /home/pi/RPi-Jukebox-RFID
If you are convinced some issue should not apply to your case or would require extensive re-coding, that could be OK.
Let us know in the pull request - we will look at it.
### Documentation

When adding or improving documentation, build the documentation and look at it locally.
If you are contributing to existing Python modules, be aware that these are already included in the documentation flow.
Also run through this step in this case! Fix all warnings!

~~~bash
$ cd /home/pi/RPi-Jukebox-RFID/
$ ./run_sphinx.sh
# open and check the result: 'file:///path/to/RPi-Jukebox-RFID/docs/sphinx/_build/html/index.html'
~~~

### Tests
Tests are very few at the moment, but it cannot hurt to run them. If you have tests for your new modules, please add
Expand Down
21 changes: 1 addition & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# RFID Jukebox Version 3 (aka future3)

[![Documentation Status](https://readthedocs.org/projects/rpi-jukebox-rfid/badge/?version=latest)](https://rpi-jukebox-rfid.readthedocs.io/en/latest/?badge=latest)

## What is this?

The exiting, new **Version 3** of the RPi Jukebox RFID. A complete re-write of the Jukebox.
Expand All @@ -11,24 +9,7 @@ project check out the [documentation of Version 2](<https://github.com/MiczFlor/

## Where are the Help pages?

### Online

Read the documentation at [Readthedocs.io](https://rpi-jukebox-rfid.readthedocs.io/en/latest/)

### Local

Alternatively, build the help locally:

~~~bash
cd docs/sphinx
make
~~~

Then navigate your browser to

~~~bash
file:///path/to/RPi-Jukebox-RFID/docs/sphinx/_build/html/docs/index.html
~~~
The documentation can be found [here](./documentation)

## Installation?

Expand Down
Loading

0 comments on commit fd04413

Please sign in to comment.