This is an automated email from the ASF dual-hosted git repository.

bossenti pushed a commit to branch exp/poetry
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit 6b3522c657d4a1f67047821f533d608339c520d4
Author: bossenti <[email protected]>
AuthorDate: Tue Aug 1 20:22:17 2023 +0200

    ci: adapt GitHub workflow to use poetry as well
---
 .github/workflows/pr-validation.yml      | 35 ++++++++++++--------------
 streampipes-client-python/pyproject.toml | 42 --------------------------------
 2 files changed, 16 insertions(+), 61 deletions(-)

diff --git a/.github/workflows/pr-validation.yml 
b/.github/workflows/pr-validation.yml
index c9c03cbb8..b49875163 100644
--- a/.github/workflows/pr-validation.yml
+++ b/.github/workflows/pr-validation.yml
@@ -118,14 +118,17 @@ jobs:
         uses: actions/setup-python@v4
         with:
           python-version: 3.8
-          cache: 'pip'
+          cache: 'poetry'
+
+      - name: Install and configure Poetry
+        uses: snok/install-poetry@v1
+        with:
+          version: 1.5.1
 
       - name: Install Python dependencies
         working-directory: ./streampipes-client-python
         run: |
-          python -m pip install --upgrade pip
-          pip install wheel
-          pip install -e ".[dev]"
+          poetry install --with dev,stubs --all-extras
 
       - name: Run style & code checks
         working-directory: ./streampipes-client-python
@@ -147,14 +150,17 @@ jobs:
         uses: actions/setup-python@v4
         with:
           python-version: ${{ matrix.python }}
-          cache: 'pip'
+          cache: 'poetry'
+
+      - name: Install and configure Poetry
+        uses: snok/install-poetry@v1
+        with:
+          version: 1.5.1
 
       - name: Install Python dependencies
         working-directory: ./streampipes-client-python
         run: |
-          python -m pip install --upgrade pip
-          pip install wheel
-          pip install -e ".[dev]"
+          poetry install --with dev,stubs --all-extras
 
       - name: Run unit-tests
         working-directory: ./streampipes-client-python
@@ -170,21 +176,12 @@ jobs:
         uses: actions/setup-python@v4
         with:
           python-version: 3.8
-
-      - name: Cache Python doc dependencies
-        uses: actions/cache@v3
-        with:
-          path: ~/.cache/pip
-          key: ${{ runner.os }}-pip-doc-${{ hashFiles('**/setup.py') }}
-          restore-keys: |
-            ${{ runner.os }}-pip-doc-
+          cache: 'poetry'
 
       - name: Install Python dependencies
         working-directory: ./streampipes-client-python
         run: |
-          python -m pip install --upgrade pip
-          pip install wheel
-          pip install -e ".[docs]"
+          poetry install --with docs
 
       - name: Build MkDocs
         working-directory: ./streampipes-client-python
diff --git a/streampipes-client-python/pyproject.toml 
b/streampipes-client-python/pyproject.toml
index 4220361ff..d5eb6673a 100644
--- a/streampipes-client-python/pyproject.toml
+++ b/streampipes-client-python/pyproject.toml
@@ -87,48 +87,6 @@ types-requests = "2.31.0.0"
 name = "PyPI"
 priority = "primary"
 
-[tool.ruff]
-select = ["E", "F", "RUF100"]
-ignore = []
-
-# Allow autofix for all enabled rules (when `--fix`) is provided.
-fixable = ["ALL"]
-unfixable = []
-
-# Exclude a variety of commonly ignored directories.
-exclude = [
-    ".bzr",
-    ".direnv",
-    ".eggs",
-    ".git",
-    ".git-rewrite",
-    ".hg",
-    ".mypy_cache",
-    ".nox",
-    ".pants.d",
-    ".pytype",
-    ".ruff_cache",
-    ".svn",
-    ".tox",
-    ".venv",
-    "__pypackages__",
-    "_build",
-    "buck-out",
-    "build",
-    "dist",
-    "node_modules",
-    "venv",
-]
-per-file-ignores = {}
-
-line-length = 120
-
-# Allow unused variables when underscore-prefixed.
-dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
-
-# Assume Python 3.8.
-target-version = "py38"
-
 [build-system]
 requires = ["poetry-core"]
 build-backend = "poetry.core.masonry.api"

Reply via email to