From 23020e6cf6736b1f85d6b1eccb93448b6e6d9119 Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sun, 6 Aug 2023 02:03:24 -0500 Subject: [PATCH 01/13] simplify, single version/set image --- .forgejo/workflows/pylint.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.forgejo/workflows/pylint.yml b/.forgejo/workflows/pylint.yml index 72d4b4d..34c6b9a 100644 --- a/.forgejo/workflows/pylint.yml +++ b/.forgejo/workflows/pylint.yml @@ -3,21 +3,22 @@ name: Pylint on: [push] jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.8.17", "3.9.17", "3.10.12", "3.11.4"] + test: + runs-on: docker + container: + image: fedora:38 +# strategy: +# matrix: +# python-version: ["3.8.17", "3.9.17", "3.10.12", "3.11.4"] steps: - - uses: https://github.com/actions/checkout@v3 - - name: "Set up Python ${{ matrix.python-version }}" - uses: https://github.com/actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} + - uses: actions/checkout@v3 +# - name: "Set up Python ${{ matrix.python-version }}" +# uses: https://github.com/actions/setup-python@v3 +# with: +# python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip - pip install wheel pip install -r requirements.txt pip install pylint - name: Analysing the code with pylint From 47c39dfca655f2e13868b228e41ba9c9be0d3e7b Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sun, 6 Aug 2023 02:07:15 -0500 Subject: [PATCH 02/13] add pre stage for install/dnf tweaks --- .forgejo/workflows/pylint.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/pylint.yml b/.forgejo/workflows/pylint.yml index 34c6b9a..6acb033 100644 --- a/.forgejo/workflows/pylint.yml +++ b/.forgejo/workflows/pylint.yml @@ -6,11 +6,16 @@ jobs: test: runs-on: docker container: - image: fedora:38 + image: fedora:latest # strategy: # matrix: # python-version: ["3.8.17", "3.9.17", "3.10.12", "3.11.4"] steps: + - name: Install NodeJS for actions + run: | + echo -e 'max_parallel_downloads=20\ndeltarpm=False\nfastestmirror=False' >> /etc/dnf/dnf.conf + dnf -yq install nodejs + dnf clean all - uses: actions/checkout@v3 # - name: "Set up Python ${{ matrix.python-version }}" # uses: https://github.com/actions/setup-python@v3 From 1d9aa253a8e3b35b38941b9da19a95cd83c22eca Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sun, 6 Aug 2023 02:09:19 -0500 Subject: [PATCH 03/13] add git to pre --- .forgejo/workflows/pylint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/pylint.yml b/.forgejo/workflows/pylint.yml index 6acb033..abdc16b 100644 --- a/.forgejo/workflows/pylint.yml +++ b/.forgejo/workflows/pylint.yml @@ -11,10 +11,10 @@ jobs: # matrix: # python-version: ["3.8.17", "3.9.17", "3.10.12", "3.11.4"] steps: - - name: Install NodeJS for actions + - name: Install deps for actions run: | echo -e 'max_parallel_downloads=20\ndeltarpm=False\nfastestmirror=False' >> /etc/dnf/dnf.conf - dnf -yq install nodejs + dnf -yq install nodejs git dnf clean all - uses: actions/checkout@v3 # - name: "Set up Python ${{ matrix.python-version }}" From a0ccde5a04ac8cd608c7d714d0900afe2042190b Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sun, 6 Aug 2023 02:14:35 -0500 Subject: [PATCH 04/13] workflow: lock to f38, add pylint/python deps --- .forgejo/workflows/pylint.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.forgejo/workflows/pylint.yml b/.forgejo/workflows/pylint.yml index abdc16b..5515969 100644 --- a/.forgejo/workflows/pylint.yml +++ b/.forgejo/workflows/pylint.yml @@ -6,26 +6,25 @@ jobs: test: runs-on: docker container: - image: fedora:latest + image: fedora:38 # lock to latest *stable*; rawhide/next is 'latest' tag # strategy: # matrix: # python-version: ["3.8.17", "3.9.17", "3.10.12", "3.11.4"] steps: - - name: Install deps for actions + - name: Install Package-based Deps run: | - echo -e 'max_parallel_downloads=20\ndeltarpm=False\nfastestmirror=False' >> /etc/dnf/dnf.conf - dnf -yq install nodejs git + echo -e 'max_parallel_downloads=20\ndeltarpm=False\nfastestmirror=False' | tee -a /etc/dnf/dnf.conf + dnf -yq install nodejs git pylint python3-pip dnf clean all - - uses: actions/checkout@v3 # - name: "Set up Python ${{ matrix.python-version }}" # uses: https://github.com/actions/setup-python@v3 # with: # python-version: ${{ matrix.python-version }} - - name: Install dependencies + - uses: actions/checkout@v3 + - name: Install Python Deps run: | python -m pip install --upgrade pip pip install -r requirements.txt - pip install pylint - name: Analysing the code with pylint run: | pylint $(git ls-files '*.py') From 7d26a36ab7f93577849399c317f7ebe1d6096e44 Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sun, 6 Aug 2023 02:16:32 -0500 Subject: [PATCH 05/13] workflow: specify python3 --- .forgejo/workflows/pylint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/pylint.yml b/.forgejo/workflows/pylint.yml index 5515969..36146db 100644 --- a/.forgejo/workflows/pylint.yml +++ b/.forgejo/workflows/pylint.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v3 - name: Install Python Deps run: | - python -m pip install --upgrade pip + python3 install --upgrade pip pip install -r requirements.txt - name: Analysing the code with pylint run: | From 9872fe8811b0052020a9f7586dcdd6b3e5a937fd Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sun, 6 Aug 2023 02:25:45 -0500 Subject: [PATCH 06/13] workflow: *properly* specify python3 --- .forgejo/workflows/pylint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/pylint.yml b/.forgejo/workflows/pylint.yml index 36146db..1cff75c 100644 --- a/.forgejo/workflows/pylint.yml +++ b/.forgejo/workflows/pylint.yml @@ -23,8 +23,8 @@ jobs: - uses: actions/checkout@v3 - name: Install Python Deps run: | - python3 install --upgrade pip - pip install -r requirements.txt + python3 -m pip install --upgrade pip + python3 -m pip install -r requirements.txt - name: Analysing the code with pylint run: | pylint $(git ls-files '*.py') From 990a32bb1989bba8dadaa9226064daba29578c69 Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sun, 6 Aug 2023 02:28:59 -0500 Subject: [PATCH 07/13] workflow: add/use venv --- .forgejo/workflows/pylint.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/pylint.yml b/.forgejo/workflows/pylint.yml index 1cff75c..d5586cf 100644 --- a/.forgejo/workflows/pylint.yml +++ b/.forgejo/workflows/pylint.yml @@ -14,7 +14,7 @@ jobs: - name: Install Package-based Deps run: | echo -e 'max_parallel_downloads=20\ndeltarpm=False\nfastestmirror=False' | tee -a /etc/dnf/dnf.conf - dnf -yq install nodejs git pylint python3-pip + dnf -yq install nodejs git pylint python3-pip python3-venv dnf clean all # - name: "Set up Python ${{ matrix.python-version }}" # uses: https://github.com/actions/setup-python@v3 @@ -23,8 +23,11 @@ jobs: - uses: actions/checkout@v3 - name: Install Python Deps run: | + python3 -m venv venv + source venv/bin/activate python3 -m pip install --upgrade pip python3 -m pip install -r requirements.txt - name: Analysing the code with pylint run: | + source venv/bin/activate pylint $(git ls-files '*.py') From f800d4b577cecac4dffaa7903d0e7779ef69f746 Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sun, 6 Aug 2023 02:31:28 -0500 Subject: [PATCH 08/13] workflow: fix venv pkg, add pylint fixer --- .forgejo/workflows/pylint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/pylint.yml b/.forgejo/workflows/pylint.yml index d5586cf..f556c30 100644 --- a/.forgejo/workflows/pylint.yml +++ b/.forgejo/workflows/pylint.yml @@ -14,7 +14,7 @@ jobs: - name: Install Package-based Deps run: | echo -e 'max_parallel_downloads=20\ndeltarpm=False\nfastestmirror=False' | tee -a /etc/dnf/dnf.conf - dnf -yq install nodejs git pylint python3-pip python3-venv + dnf -yq install nodejs git pylint python3-pip python3-virtualenv python3-pylint-venv dnf clean all # - name: "Set up Python ${{ matrix.python-version }}" # uses: https://github.com/actions/setup-python@v3 From 34881f4c979d72b3afce4748c2a07e6c5ea22a8e Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sun, 6 Aug 2023 02:34:35 -0500 Subject: [PATCH 09/13] requirements.txt: remove pyyaml, explicitly add rich --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index ffd6e5e..58c037d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -textual>=0.16.0 +textual>=0.32.0 humanfriendly==10.0 -pyyaml==6.0 +rich>=13.3.3 From fa44c535105037d276379cc12a7f220a05bb7126 Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sun, 6 Aug 2023 02:37:47 -0500 Subject: [PATCH 10/13] readme: remove old github badge, update screenshot URLs --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a09732e..ae68712 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,10 @@ # amdgpu_stats -![pylint](https://github.com/joshlay/amdgpu_stats/actions/workflows/pylint.yml/badge.svg) A Python module/TUI for AMD GPU statistics -![Screenshot of the main stats table](https://raw.githubusercontent.com/joshlay/amdgpu_stats/master/screens/main.svg "Main screen") -![Screenshot of the 'graphing' scroll bars](https://raw.githubusercontent.com/joshlay/amdgpu_stats/master/screens/graphs.svg "Graphs") -![Screenshot of the 'Logs' tab pane](https://raw.githubusercontent.com/joshlay/amdgpu_stats/master/screens/logs.svg "Logs") +![Screenshot of the main stats table](https://git.jlay.dev/jlay/amdgpu_stats/raw/branch/master/screens/main.svg "Main screen") +![Screenshot of the 'graphing' scroll bars](https://git.jlay.dev/jlay/amdgpu_stats/raw/branch/master/screens/graphs.svg "Graphs") +![Screenshot of the 'Logs' tab pane](https://git.jlay.dev/jlay/amdgpu_stats/raw/branch/master/screens/logs.svg "Logs") Tested _only_ on `RX6000` series cards; APUs and more _may_ be supported. Please file an issue if finding incompatibility! From e3e7712e4769593f8acc546219e56965e2d6279e Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sun, 6 Aug 2023 02:38:46 -0500 Subject: [PATCH 11/13] workflow: add step, show pip list --- .forgejo/workflows/pylint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.forgejo/workflows/pylint.yml b/.forgejo/workflows/pylint.yml index f556c30..0efb88b 100644 --- a/.forgejo/workflows/pylint.yml +++ b/.forgejo/workflows/pylint.yml @@ -30,4 +30,5 @@ jobs: - name: Analysing the code with pylint run: | source venv/bin/activate + python3 -m pip list pylint $(git ls-files '*.py') From f5c72203accfecf7e0952739c751f5594c4e676f Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sun, 6 Aug 2023 02:41:21 -0500 Subject: [PATCH 12/13] workflow: use non-distro pylint --- .forgejo/workflows/pylint.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/pylint.yml b/.forgejo/workflows/pylint.yml index 0efb88b..26a269f 100644 --- a/.forgejo/workflows/pylint.yml +++ b/.forgejo/workflows/pylint.yml @@ -11,21 +11,21 @@ jobs: # matrix: # python-version: ["3.8.17", "3.9.17", "3.10.12", "3.11.4"] steps: - - name: Install Package-based Deps + - name: Install package dependencies run: | echo -e 'max_parallel_downloads=20\ndeltarpm=False\nfastestmirror=False' | tee -a /etc/dnf/dnf.conf - dnf -yq install nodejs git pylint python3-pip python3-virtualenv python3-pylint-venv + dnf -yq install nodejs git python3-pip python3-virtualenv python3-pylint-venv dnf clean all # - name: "Set up Python ${{ matrix.python-version }}" # uses: https://github.com/actions/setup-python@v3 # with: # python-version: ${{ matrix.python-version }} - uses: actions/checkout@v3 - - name: Install Python Deps + - name: Install Python dependencies run: | python3 -m venv venv source venv/bin/activate - python3 -m pip install --upgrade pip + python3 -m pip install --upgrade pip pylint python3 -m pip install -r requirements.txt - name: Analysing the code with pylint run: | From 881bc810872bbb425b553736388610f8ad9e4f34 Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sun, 6 Aug 2023 02:44:49 -0500 Subject: [PATCH 13/13] workflow: minimize, improve output --- .forgejo/workflows/pylint.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/pylint.yml b/.forgejo/workflows/pylint.yml index 26a269f..bc177b5 100644 --- a/.forgejo/workflows/pylint.yml +++ b/.forgejo/workflows/pylint.yml @@ -13,9 +13,9 @@ jobs: steps: - name: Install package dependencies run: | + echo "Making DNF more performant with these directives:" echo -e 'max_parallel_downloads=20\ndeltarpm=False\nfastestmirror=False' | tee -a /etc/dnf/dnf.conf - dnf -yq install nodejs git python3-pip python3-virtualenv python3-pylint-venv - dnf clean all + dnf -yq install nodejs git python3-pip python3-virtualenv # - name: "Set up Python ${{ matrix.python-version }}" # uses: https://github.com/actions/setup-python@v3 # with: @@ -25,8 +25,10 @@ jobs: run: | python3 -m venv venv source venv/bin/activate - python3 -m pip install --upgrade pip pylint - python3 -m pip install -r requirements.txt + python3 -m pip install --upgrade pip + python3 -m pip install --upgrade wheel + python3 -m pip install pylint + python3 -m pip install --no-compile -r requirements.txt - name: Analysing the code with pylint run: | source venv/bin/activate