From b11c7859224685cb2dd516bac484b68c211d45ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Sat, 20 May 2023 18:12:51 +0200 Subject: [PATCH 01/30] feat(actions): Pylint Aggiunta action per il controllo del codice con Pylint --- .github/workflows/pylint.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/pylint.yml diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 0000000..c9c962e --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,23 @@ +name: Pylint + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11"] + 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 + pip install pylint + - name: Analysing the code with pylint + run: | + pylint $(git ls-files '*.py') From 55c8d8d8e95e914075e28e765a5f6dc8755b53f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Sat, 20 May 2023 18:13:43 +0200 Subject: [PATCH 02/30] feat(actions): Dependabot Aggiunto file di configurazione del Dependabot --- .github/dependabot.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..f828448 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "daily" + + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "daily" From 01bec12002c378ad4f6b2c1bdd973dad2a69632d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Sat, 20 May 2023 18:34:29 +0200 Subject: [PATCH 03/30] feat(actions): Better Linters Aggiunta action per effettuare lint del codice sia Js che Python. L'estensione dovrebbe aggiungere in automatico commenti ai commit e alle PR. Eliminato file di configurazione dell'action di Pylint --- .github/workflows/lint.yml | 47 ++++++++++++++++++++++++++++++++++++ .github/workflows/pylint.yml | 23 ------------------ 2 files changed, 47 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/lint.yml delete mode 100644 .github/workflows/pylint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..990cfc0 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,47 @@ +name: Lint + +on: + # Trigger the workflow on push or pull request, + # but only for the main branch + push: + branches: + - main + - develop + # Replace pull_request with pull_request_target if you + # plan to use this action with forks, see the Limitations section + pull_request: + branches: + - main + - develop + +# Down scope as necessary via https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token +permissions: + checks: write + contents: write + +jobs: + run-linters: + name: Run linters + runs-on: ubuntu-latest + + steps: + - name: Check out Git repository + uses: actions/checkout@v3 + + - name: Set up Python 3 + uses: actions/setup-python@v4 + with: + python-version: '3.11' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pylint + + - name: Install Node.js dependencies + run: npm ci + + - name: Run linters + uses: wearerequired/lint-action@v2 + with: + eslint: true + pylint: true diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml deleted file mode 100644 index c9c962e..0000000 --- a/.github/workflows/pylint.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Pylint - -on: [push] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] - 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 - pip install pylint - - name: Analysing the code with pylint - run: | - pylint $(git ls-files '*.py') From 66a8265f425ea4b46d839e16ec6cc219500a7420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Sat, 20 May 2023 18:49:52 +0200 Subject: [PATCH 04/30] feat(actions): Auto Release Aggiunta action per generare una release in automatico quando viene effettuato un push o merge di PR nel main. Aggiunto anche file di configurazione (RELEASE) per generare in automatico il body della nuova Release --- .github/workflows/auto-release.yml | 26 ++++++++++++++++++++++++++ RELEASE | 25 +++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 .github/workflows/auto-release.yml create mode 100644 RELEASE diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml new file mode 100644 index 0000000..8b41a67 --- /dev/null +++ b/.github/workflows/auto-release.yml @@ -0,0 +1,26 @@ +name: Create Release + +on: + push: + branches: + - main + paths: + - '**/RELEASE' + pull_request: + types: [opened, synchronize] + branches: + - main + paths: + - '**/RELEASE' + +jobs: + gh-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: pipe-cd/actions-gh-release@v2.3.4 + with: + release_file: '**/RELEASE' + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/RELEASE b/RELEASE new file mode 100644 index 0000000..e188a51 --- /dev/null +++ b/RELEASE @@ -0,0 +1,25 @@ +tag: v0.0.0 + +commitExclude: + prefixes: + - "Merge pull request #" + +commitCategories: + - title: "New Fixes πŸ› " + contains: + - fix + - title: "New BugFixes πŸ›" + contains: + - bug + - title: "New Features πŸš€" + contains: + - feat + - title: "New Documentation πŸ“" + contains: + - doc + - title: "Other Changes" + +releaseNoteGenerator: + showAbbrevHash: true + showCommitter: true + useReleaseNoteBlock: true From db233c97a59ff1f974f79587a490fb835114d60e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Sat, 20 May 2023 18:57:53 +0200 Subject: [PATCH 05/30] fix(actions): Auto PR problema con i Fork Aggiunto un fix che dovrebbe risolvere le limitazioni dell'action per i fork --- .github/workflows/auto-release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 8b41a67..ad37848 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -13,6 +13,9 @@ on: paths: - '**/RELEASE' +permissions: + checks: write + jobs: gh-release: runs-on: ubuntu-latest From 474575ff77b105a1efa20b3220bfd00bffb75184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Fri, 26 May 2023 19:38:29 +0200 Subject: [PATCH 06/30] fix(actions): Linter Cambiato liter per un'individuazione degli errori migliori --- .github/workflows/lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 990cfc0..2c8a694 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -35,7 +35,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pylint + pip install flake8 - name: Install Node.js dependencies run: npm ci @@ -44,4 +44,4 @@ jobs: uses: wearerequired/lint-action@v2 with: eslint: true - pylint: true + flake8: true From 6b85c3f440a5aa5e70d97edbbf45b6b0d3876b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Fri, 26 May 2023 21:27:24 +0200 Subject: [PATCH 07/30] fix(actions): Lint Ora l'action viene attivata solo nelle PR --- .github/workflows/lint.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2c8a694..dbaccd2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,12 +1,6 @@ name: Lint on: - # Trigger the workflow on push or pull request, - # but only for the main branch - push: - branches: - - main - - develop # Replace pull_request with pull_request_target if you # plan to use this action with forks, see the Limitations section pull_request: From ee037172f6474c411701a450ae72a3bf79a6b731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Fri, 26 May 2023 21:32:00 +0200 Subject: [PATCH 08/30] fix(actions): Auto release Cambiata action con cui effettuare l'auto release del codice --- .github/workflows/auto-release.yml | 41 +++++++++++++++++------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index ad37848..b5714c4 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -1,29 +1,36 @@ name: Create Release on: - push: - branches: - - main - paths: - - '**/RELEASE' pull_request: - types: [opened, synchronize] branches: - main - paths: - - '**/RELEASE' + types: + - closed permissions: - checks: write + id-token: write + contents: write + packages: write + pull-requests: read jobs: - gh-release: - runs-on: ubuntu-latest + release: + if: github.event.pull_request.merged == true + name: "Release" + runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: pipe-cd/actions-gh-release@v2.3.4 + - name: Check out Git repository + uses: actions/checkout@v3 + # TODO ! + - name: "Build & test" + run: | + echo "done!" + + - uses: "marvinpinto/action-automatic-releases@latest" with: - release_file: '**/RELEASE' - token: ${{ secrets.GITHUB_TOKEN }} + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "${{ github.event.pull_request.title }}" + prerelease: false + # title: "Development Build" + #files: | + # *.py From f55a82051daf9a791aafe77f8bc947b16a19e190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Sat, 27 May 2023 19:42:41 +0200 Subject: [PATCH 09/30] feat(actions): Build on AARCH64 Aggiunta action in grado di eseguire la build per AARCH64 (l'architettura della CPU del raspberry) --- .github/workflows/aarch64-devbuild.yml | 62 ++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/aarch64-devbuild.yml diff --git a/.github/workflows/aarch64-devbuild.yml b/.github/workflows/aarch64-devbuild.yml new file mode 100644 index 0000000..0339fd8 --- /dev/null +++ b/.github/workflows/aarch64-devbuild.yml @@ -0,0 +1,62 @@ +name: "Build on ARM" + +on: + push: + branches: + - 'testing-build' + +permissions: + id-token: write + contents: write + packages: write + pull-requests: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + - name: Build on ARM + uses: pguyot/arm-runner-action@v2 + id: build_image + with: + copy_artifact_path: dist/react-pywebview-boilerplate + copy_artifact_dest: . + base_image: raspios_lite_arm64:latest + image_additional_mb: 4096 + commands: | + sudo apt update + sudo apt install python3-pip -y + pip3 install virtualenv + curl -sL https://deb.nodesource.com/setup_18.x | sudo bash - + sudo apt install nodejs -y + npm install --global yarn + yarn run init + yarn run build + - name: Upload executable + uses: actions/upload-artifact@v3 + with: + name: devbuild + path: react-pywebview-boilerplate + + prerelease: + needs: build + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + - name: Download Executable + uses: actions/download-artifact@v3 + with: + name: devbuild + - name: Create DevBuild + uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "latest" + prerelease: true + title: "Development Build" + files: | + devbuild + devbuild.* From f5dcfd35ebb7dd56f66615e4f520322c0cecbecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Sat, 27 May 2023 20:16:23 +0200 Subject: [PATCH 10/30] fix(actions): Linter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ora l'action Γ¨ in grado di eseguire il linter ESLint. Va ricontrollata e sistemato il file di configurazione di ESLint --- .github/workflows/lint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index dbaccd2..75fb083 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -31,8 +31,9 @@ jobs: python -m pip install --upgrade pip pip install flake8 + # fix temporaneo. @Fabrizio ricontrollare configurazione di eslint - name: Install Node.js dependencies - run: npm ci + run: yarn install && yarn add eslint && yarn add --dev eslint-config-react-app - name: Run linters uses: wearerequired/lint-action@v2 From 88b2dee8a2ad8e789735d578ffb121d8127c69f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Sat, 27 May 2023 20:26:39 +0200 Subject: [PATCH 11/30] fix(actions): Auto release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ora l'action Autorelese Γ¨ in grado di generare l'eseguibile per ARM e creare la release --- .github/workflows/auto-release.yml | 52 +++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index b5714c4..e03d878 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -14,23 +14,51 @@ permissions: pull-requests: read jobs: - release: + build: if: github.event.pull_request.merged == true - name: "Release" - runs-on: "ubuntu-latest" + runs-on: ubuntu-latest steps: - - name: Check out Git repository + - name: Checkout repo uses: actions/checkout@v3 - # TODO ! - - name: "Build & test" - run: | - echo "done!" + - name: Build on ARM + uses: pguyot/arm-runner-action@v2 + id: build_image + with: + copy_artifact_path: dist/react-pywebview-boilerplate + copy_artifact_dest: . + base_image: raspios_lite_arm64:latest + image_additional_mb: 4096 + commands: | + sudo apt update + sudo apt install python3-pip -y + pip3 install virtualenv + curl -sL https://deb.nodesource.com/setup_18.x | sudo bash - + sudo apt install nodejs -y + npm install --global yarn + yarn run init + yarn run build + - name: Upload executable + uses: actions/upload-artifact@v3 + with: + name: releasebuild + path: react-pywebview-boilerplate - - uses: "marvinpinto/action-automatic-releases@latest" + release: + needs: build + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + - name: Download Executable + uses: actions/download-artifact@v3 + with: + name: releasebuild + - name: Create Release + uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" automatic_release_tag: "${{ github.event.pull_request.title }}" prerelease: false - # title: "Development Build" - #files: | - # *.py + files: | + releasebuild + releasebuild.* From e00e4b44d2ed65226216fd928a00c4fc8d117c9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Sat, 27 May 2023 20:40:53 +0200 Subject: [PATCH 12/30] fix(actions): Rimosso file Rimosso un file inutile rimasto da una vecchia action --- RELEASE | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 RELEASE diff --git a/RELEASE b/RELEASE deleted file mode 100644 index e188a51..0000000 --- a/RELEASE +++ /dev/null @@ -1,25 +0,0 @@ -tag: v0.0.0 - -commitExclude: - prefixes: - - "Merge pull request #" - -commitCategories: - - title: "New Fixes πŸ› " - contains: - - fix - - title: "New BugFixes πŸ›" - contains: - - bug - - title: "New Features πŸš€" - contains: - - feat - - title: "New Documentation πŸ“" - contains: - - doc - - title: "Other Changes" - -releaseNoteGenerator: - showAbbrevHash: true - showCommitter: true - useReleaseNoteBlock: true From a32818cda84256e1aee787c7ce4e7fd7f7f4a5e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Sun, 28 May 2023 11:46:32 +0200 Subject: [PATCH 13/30] fix(actions): DevBuild Ora l'action carica correttamente il risultato della build nella Prerelease --- .github/workflows/aarch64-devbuild.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/aarch64-devbuild.yml b/.github/workflows/aarch64-devbuild.yml index 0339fd8..99fca7a 100644 --- a/.github/workflows/aarch64-devbuild.yml +++ b/.github/workflows/aarch64-devbuild.yml @@ -58,5 +58,4 @@ jobs: prerelease: true title: "Development Build" files: | - devbuild - devbuild.* + react-pywebview-boilerplate From 909cab2d0693307f6978d54ac9da652587e46477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Sun, 28 May 2023 11:47:22 +0200 Subject: [PATCH 14/30] fix(actions): Auto release Ora l'action carica correttamente il risultato della build nella release --- .github/workflows/auto-release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index e03d878..ad37672 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -60,5 +60,4 @@ jobs: automatic_release_tag: "${{ github.event.pull_request.title }}" prerelease: false files: | - releasebuild - releasebuild.* + react-pywebview-boilerplate From 9d99e0a34250effb0c7097f3d22c7d056a348c5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Sun, 28 May 2023 13:31:56 +0200 Subject: [PATCH 15/30] fix(actions): DevBuild MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Non serve piΓΉ settare la variabile CI da package.json, lo fa l'action --- .github/workflows/aarch64-devbuild.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/aarch64-devbuild.yml b/.github/workflows/aarch64-devbuild.yml index 99fca7a..29083f3 100644 --- a/.github/workflows/aarch64-devbuild.yml +++ b/.github/workflows/aarch64-devbuild.yml @@ -33,6 +33,7 @@ jobs: sudo apt install nodejs -y npm install --global yarn yarn run init + export CI=false yarn run build - name: Upload executable uses: actions/upload-artifact@v3 From 303d2732c53d788dac659310609f3e18ae08eb3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Sun, 28 May 2023 13:35:01 +0200 Subject: [PATCH 16/30] fix(actions): Builder & Linter Modificato file package.json per permettere alle actions di effettuare la build e il lining --- package.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 2bd7403..47fbf2a 100644 --- a/package.json +++ b/package.json @@ -11,9 +11,13 @@ "@types/node": "^12.0.0", "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", - "react": "^17.0.2", - "react-dom": "^17.0.2", + "react": "^18.2.0", + "react-d3-speedometer": "^1.1.0", + "react-dom": "^18.2.0", + "react-gauge-chart": "^0.4.1", + "react-google-charts": "^4.0.0", "react-scripts": "4.0.3", + "react-thermometer-component": "^1.0.1", "sass": "^1.43.4", "typescript": "^4.1.2", "web-vitals": "^1.0.1" @@ -36,19 +40,15 @@ "cleanall:windows": "if exist node_modules rd /S /Q node_modules & if exist venv-pywebview rd /S /Q venv-pywebview", "init": "yarn install && run-script-os", "init:windows": "virtualenv -p python venv-pywebview && .\\venv-pywebview\\Scripts\\pip install -r requirements.txt", - "init:linux": "virtualenv -p python3 venv-pywebview && if [[ -z \"${KDE_FULL_SESSION}\" ]]; then yarn run init:qt5; else yarn run init:gtk; fi", - "init:default": "virtualenv -p python3 venv-pywebview && ./venv-pywebview/bin/pip install -r requirements.txt", - "init:qt5": "./venv-pywebview/bin/pip install pyqt5 pyqtwebengine -r requirements.txt", - "init:gtk": "./venv-pywebview/bin/pip install pycairo PyGObject -r requirements.txt", - "//init:gtk": "sudo apt install libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0 && ./venv-pywebview/bin/pip install pycairo pygobject -r requirements.txt", + "init:linux": "virtualenv -p python3 venv-pywebview && yarn run init:gtk", + "init:default": "virtualenv -p python4 venv-pywebview && ./venv-pywebview/bin/pip install -r requirements.txt", + "init:gtk": "sudo apt install -y libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0 && ./venv-pywebview/bin/pip install pycairo pygobject -r requirements.txt", "init:docs": "./venv-pywebview/bin/pip install pylama yapf", "start": "export NODE_OPTIONS='--openssl-legacy-provider' && yarn run frontend:dev && run-script-os", "start:windows": ".\\venv-pywebview\\Scripts\\python src\\index.py", "start:default": "./venv-pywebview/bin/python src/index.py", - "pylintcheck": "pylama -f pylint ./src/", - "pylint":"yapf --recursive -i ./src/" - + "pylint": "yapf --recursive -i ./src/" }, "eslintConfig": { "extends": [ From d41e00eb630d0f183eca9dbc70da29eafd014009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Thu, 1 Jun 2023 21:21:35 +0200 Subject: [PATCH 17/30] fix(actions): DevBuild Ora la build viene fatta per il dispositivo adatto: Raspberry pi 3B (32bit) --- .github/workflows/aarch64-devbuild.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/aarch64-devbuild.yml b/.github/workflows/aarch64-devbuild.yml index 29083f3..046620d 100644 --- a/.github/workflows/aarch64-devbuild.yml +++ b/.github/workflows/aarch64-devbuild.yml @@ -23,7 +23,9 @@ jobs: with: copy_artifact_path: dist/react-pywebview-boilerplate copy_artifact_dest: . - base_image: raspios_lite_arm64:latest + base_image: raspios_lite:latest + cpu: cortex-a7 + cpu_info: cpuinfo/raspberrypi_3b image_additional_mb: 4096 commands: | sudo apt update From 07ea356b4521272d715ffb803333f289b744cb3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Thu, 1 Jun 2023 21:22:15 +0200 Subject: [PATCH 18/30] fix(actions): Auto release Ora la build viene fatta per il dispositivo giusto: Raspberry Pi (32bit) --- .github/workflows/auto-release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index ad37672..47ec963 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -26,7 +26,9 @@ jobs: with: copy_artifact_path: dist/react-pywebview-boilerplate copy_artifact_dest: . - base_image: raspios_lite_arm64:latest + base_image: raspios_lite:latest + cpu: cortex-a7 + cpu_info: cpuinfo/raspberrypi_3b image_additional_mb: 4096 commands: | sudo apt update From 358d511e6526f997e2d967aeb9667864b7554204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Thu, 1 Jun 2023 21:28:55 +0200 Subject: [PATCH 19/30] fix(actions): ESLint Aggiunta configurazione per ESLint. Ora l'action dovrebbe funzionare --- .eslintignore | 6 ++++++ .eslintrc.json | 27 +++++++++++++++++++++++++++ .github/workflows/lint.yml | 2 +- package.json | 8 +++++++- 4 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 .eslintignore create mode 100644 .eslintrc.json diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..7ee0bc3 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,6 @@ +src/assets +*.py +*.pyc +*.sass +*.png +*.ts diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..b5b3b27 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,27 @@ +{ + "settings": { + "react": { + "version": "detect" + } + }, + "env": { + "browser": true, + "es2021": true, + "node": true + }, + "extends": [ + "eslint:recommended", + "plugin:react/recommended" + ], + "overrides": [ + ], + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module" + }, + "plugins": [ + "react" + ], + "rules": { + } +} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 75fb083..b421b66 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -33,7 +33,7 @@ jobs: # fix temporaneo. @Fabrizio ricontrollare configurazione di eslint - name: Install Node.js dependencies - run: yarn install && yarn add eslint && yarn add --dev eslint-config-react-app + run: yarn install - name: Run linters uses: wearerequired/lint-action@v2 diff --git a/package.json b/package.json index 47fbf2a..7df714a 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,8 @@ "start:windows": ".\\venv-pywebview\\Scripts\\python src\\index.py", "start:default": "./venv-pywebview/bin/python src/index.py", "pylintcheck": "pylama -f pylint ./src/", - "pylint": "yapf --recursive -i ./src/" + "pylint": "yapf --recursive -i ./src/", + "lint": "eslint \"src/**\"" }, "eslintConfig": { "extends": [ @@ -69,6 +70,11 @@ ] }, "devDependencies": { + "eslint-config-standard": "^17.1.0", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-n": "^15.0.0 || ^16.0.0 ", + "eslint-plugin-promise": "^6.0.0", + "eslint-plugin-react": "^7.32.2", "run-script-os": "^1.1.6" } } From fe401bdcbe87d5914c7676f2c0ef5283be540919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Thu, 1 Jun 2023 21:32:42 +0200 Subject: [PATCH 20/30] fix(actions): Linter --- .github/workflows/lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b421b66..9d32a11 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -39,4 +39,5 @@ jobs: uses: wearerequired/lint-action@v2 with: eslint: true + eslint_dir: src/ flake8: true From 4ea50a395cad360805a54e0da40e14c8b023afcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Thu, 1 Jun 2023 21:38:21 +0200 Subject: [PATCH 21/30] fix(actions): Linter Aggiunta dipendenza di eslint --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 7df714a..cef971d 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "@types/node": "^12.0.0", "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", + "eslint": "^8.41.0", "react": "^18.2.0", "react-d3-speedometer": "^1.1.0", "react-dom": "^18.2.0", From b21ea7c976d639a68cab127a9fb0e86ab2f5ae2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Thu, 1 Jun 2023 21:42:27 +0200 Subject: [PATCH 22/30] fix(actions): Lint Ignora gli errori di "No files match pattern" --- .github/workflows/lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9d32a11..2610b3f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -40,4 +40,5 @@ jobs: with: eslint: true eslint_dir: src/ + eslint_args: "--no-error-on-unmatched-pattern" flake8: true From b3ef6ca811d80c7f7a1cd55e4e4d487fb5ac82de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Thu, 1 Jun 2023 21:58:52 +0200 Subject: [PATCH 23/30] fix(actions): ESLint Cambiata configurazione di ESLint. --- .eslintignore | 6 ------ .eslintrc.json | 27 ------------------------- package.json | 55 +++++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 50 insertions(+), 38 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc.json diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 7ee0bc3..0000000 --- a/.eslintignore +++ /dev/null @@ -1,6 +0,0 @@ -src/assets -*.py -*.pyc -*.sass -*.png -*.ts diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index b5b3b27..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "settings": { - "react": { - "version": "detect" - } - }, - "env": { - "browser": true, - "es2021": true, - "node": true - }, - "extends": [ - "eslint:recommended", - "plugin:react/recommended" - ], - "overrides": [ - ], - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "plugins": [ - "react" - ], - "rules": { - } -} diff --git a/package.json b/package.json index cef971d..702e86c 100644 --- a/package.json +++ b/package.json @@ -53,11 +53,56 @@ "lint": "eslint \"src/**\"" }, "eslintConfig": { - "extends": [ - "react-app", - "react-app/jest" - ] - }, + "root": true, + "extends": [ + "eslint:recommended", + "plugin:react/recommended" + ], + "env": { + "browser": true, + "es2021": true, + "node": true + }, + "settings": { + "jsdoc": { + "mode": "typescript" + } + }, + "rules": { + "no-await-in-loop": "off", + "no-unused-vars": [ + "error", + { + "args": "none", + "varsIgnorePattern": "^_" + } + ], + "jsdoc/check-indentation": "error", + "jsdoc/check-syntax": "error", + "jsdoc/newline-after-description": [ + "error", + "never" + ], + "jsdoc/require-description": "error", + "jsdoc/require-hyphen-before-param-description": "error", + "jsdoc/require-jsdoc": "off" + } + }, + "eslintIgnore": [ + "node_modules/", + "oldtmp/", + "gui/", + "build/", + "public/", + "dist/", + "src/assets/", + "src/lib/", + "src/styles/", + "venv-pywebview/", + "*.png", + "*.py", + "*.sass" + ], "browserslist": { "production": [ ">0.2%", From 36950ceecccbb29e7462bde59a4a30df7173dd8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Thu, 1 Jun 2023 22:02:09 +0200 Subject: [PATCH 24/30] fix(actions): Linter Aggiunto parametro extentions --- .github/workflows/lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2610b3f..bbd7a04 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -40,5 +40,6 @@ jobs: with: eslint: true eslint_dir: src/ + eslint_extentions: js,jsx eslint_args: "--no-error-on-unmatched-pattern" flake8: true From 701361d1eaadba5c11c323f6a6a4fc1b6256a8ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Thu, 1 Jun 2023 22:04:31 +0200 Subject: [PATCH 25/30] fix(actions): Lint typo --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index bbd7a04..446cece 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -40,6 +40,6 @@ jobs: with: eslint: true eslint_dir: src/ - eslint_extentions: js,jsx + eslint_extensions: js,jsx eslint_args: "--no-error-on-unmatched-pattern" flake8: true From ec57f9e9e723a5b5745bc3c2f680b9a1cce39aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Thu, 1 Jun 2023 22:14:00 +0200 Subject: [PATCH 26/30] fix(actions0): ESLint Aggiunti altri parametri di configurazione per eslint --- package.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/package.json b/package.json index 702e86c..794906c 100644 --- a/package.json +++ b/package.json @@ -58,12 +58,25 @@ "eslint:recommended", "plugin:react/recommended" ], + "plugins": [ + "react" + ], "env": { "browser": true, "es2021": true, "node": true + }, + "plugins": [ + "react" + ], + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module" }, "settings": { + "react": { + "version": "detect" + }, "jsdoc": { "mode": "typescript" } From 99cc9e0683cc34aad0f12daf37414d029d48b325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Thu, 1 Jun 2023 22:24:34 +0200 Subject: [PATCH 27/30] fix(actions): Linter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addio ESLint βœ‹ --- .github/workflows/lint.yml | 5 +-- package.json | 72 ++++---------------------------------- 2 files changed, 8 insertions(+), 69 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 446cece..a69dedc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -38,8 +38,5 @@ jobs: - name: Run linters uses: wearerequired/lint-action@v2 with: - eslint: true - eslint_dir: src/ - eslint_extensions: js,jsx - eslint_args: "--no-error-on-unmatched-pattern" + x0: true flake8: true diff --git a/package.json b/package.json index 794906c..7f41833 100644 --- a/package.json +++ b/package.json @@ -52,70 +52,9 @@ "pylint": "yapf --recursive -i ./src/", "lint": "eslint \"src/**\"" }, - "eslintConfig": { - "root": true, - "extends": [ - "eslint:recommended", - "plugin:react/recommended" - ], - "plugins": [ - "react" - ], - "env": { - "browser": true, - "es2021": true, - "node": true - }, - "plugins": [ - "react" - ], - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "settings": { - "react": { - "version": "detect" - }, - "jsdoc": { - "mode": "typescript" - } - }, - "rules": { - "no-await-in-loop": "off", - "no-unused-vars": [ - "error", - { - "args": "none", - "varsIgnorePattern": "^_" - } - ], - "jsdoc/check-indentation": "error", - "jsdoc/check-syntax": "error", - "jsdoc/newline-after-description": [ - "error", - "never" - ], - "jsdoc/require-description": "error", - "jsdoc/require-hyphen-before-param-description": "error", - "jsdoc/require-jsdoc": "off" - } - }, - "eslintIgnore": [ - "node_modules/", - "oldtmp/", - "gui/", - "build/", - "public/", - "dist/", - "src/assets/", - "src/lib/", - "src/styles/", - "venv-pywebview/", - "*.png", - "*.py", - "*.sass" - ], + "xo": { + "extends": "xo-react" + }, "browserslist": { "production": [ ">0.2%", @@ -130,10 +69,13 @@ }, "devDependencies": { "eslint-config-standard": "^17.1.0", + "eslint-config-xo-react": "^0.27.0", "eslint-plugin-import": "^2.25.2", "eslint-plugin-n": "^15.0.0 || ^16.0.0 ", "eslint-plugin-promise": "^6.0.0", "eslint-plugin-react": "^7.32.2", - "run-script-os": "^1.1.6" + "eslint-plugin-react-hooks": "^4.6.0", + "run-script-os": "^1.1.6", + "xo": "^0.54.2" } } From f459a4b9e4f76088aada0140503ee62ac05801a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Thu, 1 Jun 2023 22:26:41 +0200 Subject: [PATCH 28/30] fix(actions): Lint typo --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a69dedc..7f6cb5f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -38,5 +38,5 @@ jobs: - name: Run linters uses: wearerequired/lint-action@v2 with: - x0: true + xo: true flake8: true From 4aa1d5513c7e73b464e136cdff677bc9774e17dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Thu, 1 Jun 2023 22:32:02 +0200 Subject: [PATCH 29/30] fix: Aggiornato comando per linter --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7f41833..333d808 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "start:default": "./venv-pywebview/bin/python src/index.py", "pylintcheck": "pylama -f pylint ./src/", "pylint": "yapf --recursive -i ./src/", - "lint": "eslint \"src/**\"" + "lint": "xo src/" }, "xo": { "extends": "xo-react" From 76f0cc3a008cb0b3e38c2ea87fb00749269c7243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Vescera?= Date: Thu, 1 Jun 2023 22:34:49 +0200 Subject: [PATCH 30/30] fix: DevDependencies Aggiunto eslint come DevDependencies --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 333d808..8cfd285 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,6 @@ "@types/node": "^12.0.0", "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", - "eslint": "^8.41.0", "react": "^18.2.0", "react-d3-speedometer": "^1.1.0", "react-dom": "^18.2.0", @@ -68,6 +67,7 @@ ] }, "devDependencies": { + "eslint": "^8.41.0", "eslint-config-standard": "^17.1.0", "eslint-config-xo-react": "^0.27.0", "eslint-plugin-import": "^2.25.2",