Skip to content

Commit ab1b527

Browse files
Merge pull request #2258 from MiczFlor/future3/develop
Release v3.6.0
2 parents 0ab75c1 + 6626391 commit ab1b527

112 files changed

Lines changed: 7531 additions & 4400 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.flake8

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
[flake8]
22
max-line-length = 127
33
ignore =
4+
# continuation line over-indented for hanging indent
5+
E126,
46
# continuation line over-indented for visual indent
57
E127,
68
# continuation line under-indented for visual indent
79
E128,
810
# line break before binary operator
9-
W503
11+
W503,
12+
# global name / nonlocal name is unused: name is never assigned in scope
13+
F824
1014
per-file-ignores =
1115
# Only in __init__files ignore imported but unused
1216
# Not necessary, if __all__ is declared in __init__ file

.githooks/post-merge

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
# TO ACTIVATE: cp .githooks/post-merge .git/hooks/.
66
#
77
# Checks:
8+
# - Changes to system requirements
9+
# - Changes to python requirements
810
# - Changes to Web App
911
# - Changes to web dependency
10-
# - Changes to python requirements
1112
#
1213
# Actions are not triggered automatically as they can take some
1314
# time. The user is warned if an action is required.
@@ -21,7 +22,7 @@ warn_npm_dependency() {
2122
echo "ATTENTION: npm dependencies have changed since last pull!"
2223
echo ""
2324
echo "To update dependencies and rebuilt Web App run:"
24-
echo "$ cd src/webapp && ./run_rebuild.sh -u"
25+
echo " cd src/webapp && ./run_rebuild.sh -u"
2526
echo "************************************************************"
2627
echo -e "\n"
2728
}
@@ -32,7 +33,19 @@ warn_webapp() {
3233
echo "ATTENTION: Web App sources have changed since last pull!"
3334
echo ""
3435
echo "To rebuilt the Web App run:"
35-
echo "$ cd src/webapp && ./run_rebuild.sh"
36+
echo " cd src/webapp && ./run_rebuild.sh"
37+
echo "************************************************************"
38+
echo -e "\n"
39+
}
40+
41+
warn_system_requirements() {
42+
echo -e "\n"
43+
echo "************************************************************"
44+
echo "ATTENTION: System requirements have changed since last pull!"
45+
echo ""
46+
echo "To update system requirements on the RPi run"
47+
echo " sudo apt-get -y update"
48+
echo " sed 's/#.*//g' packages-core.txt | xargs sudo apt-get -y install --no-install-recommends"
3649
echo "************************************************************"
3750
echo -e "\n"
3851
}
@@ -43,8 +56,9 @@ warn_python_requirements() {
4356
echo "ATTENTION: Python requirements have changed since last pull!"
4457
echo ""
4558
echo "To update python requirements on the RPi run"
46-
echo "$ source .venv/bin/activate"
47-
echo "$ python -m pip install --upgrade -r requirements.txt"
59+
echo " source .venv/bin/activate"
60+
echo " python -m pip install --upgrade -r requirements.txt"
61+
echo " python -m pip uninstall -y -r requirements-excluded.txt"
4862
echo "************************************************************"
4963
echo -e "\n"
5064
}
@@ -55,7 +69,7 @@ warn_githooks() {
5569
echo "ATTENTION: Recommended git hooks changed!"
5670
echo ""
5771
echo "To update, REVIEW and copy .githooks/* to .git/hooks"
58-
echo "$ cp .githooks/* .git/hooks/."
72+
echo " cp .githooks/* .git/hooks/."
5973
echo "************************************************************"
6074
echo -e "\n"
6175
}
@@ -65,20 +79,22 @@ warn_installer() {
6579
echo "************************************************************"
6680
echo "ATTENTION: Installer sources have changed since last pull!"
6781
echo ""
68-
echo "Rerun the installer to apply changes"
69-
echo "$ ./installation/install-jukebox.sh"
82+
echo "It is NOT recommended to continue the update process."
83+
echo "The installation routines have changed and"
84+
echo "compatibility with the old version is not guaranteed."
7085
echo "************************************************************"
7186
echo -e "\n"
7287
}
7388

7489
# files_changed="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
90+
python_req_changed="$(git diff --name-only --no-commit-id ORIG_HEAD HEAD requirements.txt)"
91+
python_excl_req_changed="$(git diff --name-only --no-commit-id ORIG_HEAD HEAD requirements-excluded.txt)"
7592
webapp_changed="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD src/webapp)"
7693
webapp_dep_changed="$(git diff --name-only --no-commit-id ORIG_HEAD HEAD src/webapp/package.json)"
77-
python_req_changed="$(git diff --name-only --no-commit-id ORIG_HEAD HEAD requirements.txt)"
7894
githooks_changed="$(git diff --name-only --no-commit-id ORIG_HEAD HEAD .githooks)"
7995
installer_changed="$(git diff --name-only --no-commit-id ORIG_HEAD HEAD installation)"
8096

81-
if [[ -n $python_req_changed ]]; then
97+
if [[ -n $python_req_changed || -n $python_excl_req_changed ]]; then
8298
warn_python_requirements
8399
fi
84100

.githooks/pre-commit

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
# Note: This only checks the modified files
1010
# - docs build of if any python file is staged
1111
# Note: This builds the entire documentation if a changed file goes into the documentation
12+
# - Markdownlint if any markdown file is staged
13+
# Note: This checks all markdown files as configured in .markdownlint-cli2.yaml
14+
1215
#
1316
# If there are problem with this script, commit may still be done with
1417
# git commit --no-verify
@@ -40,6 +43,20 @@ fi
4043

4144
code=$(( flake8_code + doc_code ))
4245

46+
# Pass all staged markdown files through markdownlint-cli2
47+
MD_FILES="$(git diff --diff-filter=d --staged --name-only -- **/*.md)"
48+
markdownlint_code=0
49+
if [[ -n $MD_FILES ]]; then
50+
echo -e "\n**************************************************************"
51+
echo "Modified Markdown files. Running markdownlint-cli2 ... "
52+
echo -e "**************************************************************\n"
53+
./run_markdownlint.sh
54+
markdownlint_code=$?
55+
echo "Markdownlint-cli2 return code: $markdownlint_code"
56+
fi
57+
58+
code=$(( flake8_code + doc_code + markdownlint_code))
59+
4360
if [[ code -gt 0 ]]; then
4461
echo -e "\n**************************************************************"
4562
echo -e "ERROR(s) during pre-commit checks. Aborting commit!"

.github/ISSUE_TEMPLATE/bug_template.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ Please post here the output of 'tail -n 500 /var/log/syslog' or 'journalctl -u m
3333
i.e. `find logfiles at https://paste.ubuntu.com/p/cRS7qM8ZmP/`
3434
-->
3535

36-
3736
## Software
3837

3938
### Base image and version
@@ -59,7 +58,6 @@ the following command will help with that
5958
i.e. `scripts/installscripts/buster-install-default.sh`
6059
-->
6160

62-
6361
## Hardware
6462

6563
### RaspberryPi version

.github/workflows/bundle_webapp_and_release_v3.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
tar -czvf ${{ steps.vars.outputs.webapp_bundle_name }} build
102102
103103
- name: Artifact Upload
104-
uses: actions/upload-artifact@v3
104+
uses: actions/upload-artifact@v4
105105
with:
106106
name: ${{ steps.vars.outputs.webapp_bundle_name }}
107107
path: ${{ steps.build-webapp.outputs.webapp-root-path }}/${{ steps.vars.outputs.webapp_bundle_name }}
@@ -119,7 +119,7 @@ jobs:
119119

120120
steps:
121121
- name: Artifact Download
122-
uses: actions/download-artifact@v3
122+
uses: actions/download-artifact@v4
123123
with:
124124
name: ${{ needs.build.outputs.webapp_bundle_name }}
125125

.github/workflows/codeql-analysis_v3.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -37,38 +37,20 @@ jobs:
3737
- name: Checkout repository
3838
uses: actions/checkout@v4
3939

40-
- name: Set up Python
41-
uses: actions/setup-python@v4
42-
with:
43-
python-version: '3.x'
44-
- name: Install dependencies
45-
run: |
46-
# Install necessary packages
47-
sudo apt-get install libasound2-dev pulseaudio
48-
python3 -m venv .venv
49-
source ".venv/bin/activate"
50-
51-
python -m pip install --upgrade pip
52-
pip install -r requirements.txt
53-
# Set the `CODEQL-PYTHON` environment variable to the Python executable
54-
# that includes the dependencies
55-
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
56-
5740
# Initializes the CodeQL tools for scanning.
5841
- name: Initialize CodeQL
59-
uses: github/codeql-action/init@v2
42+
uses: github/codeql-action/init@v3
6043
with:
6144
languages: ${{ matrix.language }}
6245
# If you wish to specify custom queries, you can do so here or in a config file.
6346
# By default, queries listed here will override any specified in a config file.
6447
# Prefix the list here with "+" to use these queries and those in the config file.
6548
# queries: ./path/to/local/query, your-org/your-repo/queries@main
66-
setup-python-dependencies: false
6749

6850
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6951
# If this step fails, then you should remove it and run the build manually (see below)
7052
- name: Autobuild
71-
uses: github/codeql-action/autobuild@v2
53+
uses: github/codeql-action/autobuild@v3
7254

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

8466
- name: Perform CodeQL Analysis
85-
uses: github/codeql-action/analyze@v2
67+
uses: github/codeql-action/analyze@v3

.github/workflows/markdown_v3.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Markdown Linting
2+
3+
on:
4+
push:
5+
branches:
6+
- 'future3/**'
7+
paths:
8+
- '**.md'
9+
pull_request:
10+
branches:
11+
- 'future3/**'
12+
paths:
13+
- '**.md'
14+
15+
jobs:
16+
build:
17+
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Linting markdown
25+
uses: DavidAnson/markdownlint-cli2-action@v15
26+
with:
27+
config: .markdownlint-cli2.yaml
28+
#continue-on-error: true

.github/workflows/pythonpackage_future3.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,23 @@ on:
55
branches:
66
- 'future3/**'
77
paths:
8+
- '.github/workflows/pythonpackage_future3.yml'
9+
- '.flake8'
10+
- 'run_flake8.sh'
11+
- '.coveragerc'
12+
- 'run_pytest.sh'
13+
- '**requirements*.txt'
814
- '**.py'
915
pull_request:
1016
branches:
1117
- 'future3/**'
1218
paths:
19+
- '.github/workflows/pythonpackage_future3.yml'
20+
- '.flake8'
21+
- 'run_flake8.sh'
22+
- '.coveragerc'
23+
- 'run_pytest.sh'
24+
- '**requirements*.txt'
1325
- '**.py'
1426

1527
jobs:
@@ -19,18 +31,23 @@ jobs:
1931
strategy:
2032
max-parallel: 4
2133
matrix:
22-
python-version: ['3.9', '3.10', '3.11']
34+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
2335

2436
steps:
25-
- uses: actions/checkout@v3
37+
- uses: actions/checkout@v4
2638
- name: Set up Python ${{ matrix.python-version }}
27-
uses: actions/setup-python@v4
39+
uses: actions/setup-python@v5
2840
with:
2941
python-version: ${{ matrix.python-version }}
3042
- name: Install dependencies
3143
run: |
3244
sudo apt-get update
3345
sudo apt-get install -y libasound2-dev pulseaudio
46+
47+
CUR_DIR="$(pwd)"
48+
mkdir -p tmp && cd tmp && wget -q http://abyz.me.uk/lg/lg.zip && unzip lg.zip > /dev/null && cd lg && make && sudo make install
49+
cd "${CUR_DIR}" && sudo rm -rf tmp > /dev/null
50+
3451
python3 -m venv .venv
3552
source ".venv/bin/activate"
3653

.github/workflows/test_docker_debian_codename_sub_v3.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ jobs:
134134
BASE_TEST_IMAGE=${{ steps.vars.outputs.image_tag_name_local_base }}
135135
136136
- name: Artifact Upload Docker Image
137-
uses: actions/upload-artifact@v3
137+
uses: actions/upload-artifact@v4
138138
with:
139139
name: ${{ steps.vars.outputs.image_file_name }}
140140
path: ${{ steps.vars.outputs.image_file_path }}
141-
retention-days: 1
141+
retention-days: 2
142142

143143

144144
# Run tests with build image
@@ -159,7 +159,7 @@ jobs:
159159
uses: docker/setup-buildx-action@v3.0.0
160160

161161
- name: Artifact Download Docker Image
162-
uses: actions/download-artifact@v3
162+
uses: actions/download-artifact@v4
163163
with:
164164
name: ${{ needs.build.outputs.image_file_name }}
165165

@@ -179,13 +179,14 @@ jobs:
179179
180180
# cleanup after test execution
181181
cleanup:
182-
# run only if tests didn't fail: keep the artifact to make job reruns possible
183-
if: ${{ !failure() }}
184-
needs: [build, test]
185-
runs-on: ${{ inputs.runs_on }}
186-
187-
steps:
188-
- name: Artifact Delete Docker Image
189-
uses: geekyeggo/delete-artifact@v2
190-
with:
191-
name: ${{ needs.build.outputs.image_file_name }}
182+
# run only if tests didn't fail: keep the artifact to make job reruns possible
183+
if: ${{ !failure() }}
184+
needs: [build, test]
185+
runs-on: ${{ inputs.runs_on }}
186+
187+
steps:
188+
- name: Artifact Delete Docker Image
189+
uses: geekyeggo/delete-artifact@v5
190+
with:
191+
name: ${{ needs.build.outputs.image_file_name }}
192+
failOnError: false

0 commit comments

Comments
 (0)