From 4f8bc465cf26d08724b68e4b5f42ca86833f2276 Mon Sep 17 00:00:00 2001 From: Stefan Bachhofner Date: Mon, 6 May 2024 20:45:08 +0200 Subject: [PATCH 1/6] ci(workflow): add pylint --- .github/workflows/pylint.yml | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 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 00000000..5f2989be --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,40 @@ +name: Pylint + +on: + push: + branches: ["main"] + + pull_request: + types: ["opened"] + +jobs: + build: + # ubuntu-latest doesn't have all the needed Python version. Hence we need to specify Ubuntu 20.04. + # See issue https://github.com/razorpay/razorpay-python/pull/265 + runs-on: ubuntu-20.04 + continue-on-error: true + strategy: + matrix: + python-version: ["3.9.0", "3.10.0", "3.11.0" "3.12.0"] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + timeout-minutes: 10 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' # caching pip dependencies + cache-dependency-path: '**/setup.py' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pylint + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + + - name: Analysing the code with pylint + run: | + pylint $(git ls-files '*.py') From c151d985c598e60984ba5d8177cf4c5af1f02b3f Mon Sep 17 00:00:00 2001 From: Stefan Bachhofner Date: Mon, 6 May 2024 20:47:00 +0200 Subject: [PATCH 2/6] fix(pylint): add missing comma --- .github/workflows/pylint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 5f2989be..04c3d9dd 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -15,7 +15,7 @@ jobs: continue-on-error: true strategy: matrix: - python-version: ["3.9.0", "3.10.0", "3.11.0" "3.12.0"] + python-version: ["3.9.0", "3.10.0", "3.11.0", "3.12.0"] steps: - name: Checkout From a2afd9cd179e14871db78361a0028c355f5e469f Mon Sep 17 00:00:00 2001 From: Stefan Bachhofner Date: Mon, 6 May 2024 20:48:28 +0200 Subject: [PATCH 3/6] ci(pylint): add manual trigger --- .github/workflows/pylint.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 04c3d9dd..ddc7b517 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -7,6 +7,10 @@ on: pull_request: types: ["opened"] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + + jobs: build: # ubuntu-latest doesn't have all the needed Python version. Hence we need to specify Ubuntu 20.04. From 5835c377174f0a4e017adda2e1611fb8342628d3 Mon Sep 17 00:00:00 2001 From: Stefan Bachhofner Date: Mon, 6 May 2024 20:51:36 +0200 Subject: [PATCH 4/6] doc(readme): add pylint badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 831fcfc9..73f79df6 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ ![PyPI - Version](https://img.shields.io/pypi/v/llmware?color=blue) [![discord](https://img.shields.io/badge/Chat%20on-Discord-blue?logo=discord&logoColor=white)](https://discord.gg/MhZn5Nc39h) [![Documentation](https://github.com/llmware-ai/llmware/actions/workflows/pages.yml/badge.svg)](https://github.com/llmware-ai/llmware/actions/workflows/pages.yml) +[![.github/workflows/pylint.yml](https://github.com/MacOS/llmware/actions/workflows/pylint.yml/badge.svg?branch=ci-pylint)](https://github.com/MacOS/llmware/actions/workflows/pylint.yml) ## 🧰🛠️🔩The Ultimate Toolkit for Building LLM Apps From c52928bcb70978d60ec548da3b5ffd54e2add4d9 Mon Sep 17 00:00:00 2001 From: Stefan Bachhofner Date: Mon, 6 May 2024 21:14:11 +0200 Subject: [PATCH 5/6] style(configs): delete blank line --- llmware/configs.py | 1 - 1 file changed, 1 deletion(-) diff --git a/llmware/configs.py b/llmware/configs.py index 1a2e9767..caba6563 100644 --- a/llmware/configs.py +++ b/llmware/configs.py @@ -25,7 +25,6 @@ class LLMWareConfig: - """LLMWare global configuration object - use set/get to update """ if platform.system() == "Windows": From 48279fb725e14236a01506c4fdb1862e39e1e19f Mon Sep 17 00:00:00 2001 From: Stefan Bachhofner Date: Mon, 6 May 2024 21:32:07 +0200 Subject: [PATCH 6/6] doc(readme): change badge links to llmware repo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 73f79df6..7c7867bf 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ![PyPI - Version](https://img.shields.io/pypi/v/llmware?color=blue) [![discord](https://img.shields.io/badge/Chat%20on-Discord-blue?logo=discord&logoColor=white)](https://discord.gg/MhZn5Nc39h) [![Documentation](https://github.com/llmware-ai/llmware/actions/workflows/pages.yml/badge.svg)](https://github.com/llmware-ai/llmware/actions/workflows/pages.yml) -[![.github/workflows/pylint.yml](https://github.com/MacOS/llmware/actions/workflows/pylint.yml/badge.svg?branch=ci-pylint)](https://github.com/MacOS/llmware/actions/workflows/pylint.yml) +[![.github/workflows/pylint.yml](https://github.com/llmware-ai/llmware/actions/workflows/pylint.yml/badge.svg?branch=main)](https://github.com/llmware-ai/llmware/actions/workflows/pylint.yml) ## 🧰🛠️🔩The Ultimate Toolkit for Building LLM Apps