From 25f424e870342448e90d05ec7b2417837175772c Mon Sep 17 00:00:00 2001 From: Mustafa Abdulrahman Date: Mon, 21 Aug 2023 14:31:01 -0400 Subject: [PATCH 01/11] address flake8 errors for privacy __init__.py files --- openadapt/privacy/__init__.py | 4 ++++ openadapt/privacy/providers/__init__.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/openadapt/privacy/__init__.py b/openadapt/privacy/__init__.py index e69de29bb..d58acf990 100644 --- a/openadapt/privacy/__init__.py +++ b/openadapt/privacy/__init__.py @@ -0,0 +1,4 @@ +"""Package for the Privacy API. + +Module: __init__.py +""" diff --git a/openadapt/privacy/providers/__init__.py b/openadapt/privacy/providers/__init__.py index e69de29bb..81efd5ec9 100644 --- a/openadapt/privacy/providers/__init__.py +++ b/openadapt/privacy/providers/__init__.py @@ -0,0 +1,4 @@ +"""Package for the providers. + +Module: __init__.py +""" From 5b363c479c0a86361cecc4b0efd9b48c37cf76a3 Mon Sep 17 00:00:00 2001 From: Mustafa Abdulrahman Date: Mon, 21 Aug 2023 14:32:16 -0400 Subject: [PATCH 02/11] made some changes --- openadapt/privacy/__init__.py | 5 +---- openadapt/privacy/providers/__init__.py | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/openadapt/privacy/__init__.py b/openadapt/privacy/__init__.py index d58acf990..6756f19bc 100644 --- a/openadapt/privacy/__init__.py +++ b/openadapt/privacy/__init__.py @@ -1,4 +1 @@ -"""Package for the Privacy API. - -Module: __init__.py -""" +"""Package for the Privacy API.""" diff --git a/openadapt/privacy/providers/__init__.py b/openadapt/privacy/providers/__init__.py index 81efd5ec9..c66728615 100644 --- a/openadapt/privacy/providers/__init__.py +++ b/openadapt/privacy/providers/__init__.py @@ -1,4 +1 @@ -"""Package for the providers. - -Module: __init__.py -""" +"""Package for the providers.""" From 05feede78cf61eaa5872b3b4f17d13d3c2e4cb25 Mon Sep 17 00:00:00 2001 From: Mustafa Abdulrahman Date: Wed, 23 Aug 2023 14:30:45 -0400 Subject: [PATCH 03/11] test status checks work --- openadapt/privacy/__init__.py | 1 - openadapt/privacy/providers/__init__.py | 1 - 2 files changed, 2 deletions(-) diff --git a/openadapt/privacy/__init__.py b/openadapt/privacy/__init__.py index 6756f19bc..e69de29bb 100644 --- a/openadapt/privacy/__init__.py +++ b/openadapt/privacy/__init__.py @@ -1 +0,0 @@ -"""Package for the Privacy API.""" diff --git a/openadapt/privacy/providers/__init__.py b/openadapt/privacy/providers/__init__.py index c66728615..e69de29bb 100644 --- a/openadapt/privacy/providers/__init__.py +++ b/openadapt/privacy/providers/__init__.py @@ -1 +0,0 @@ -"""Package for the providers.""" From beae23a1bc4a18527dfa789a1e61ffe39fc60e8c Mon Sep 17 00:00:00 2001 From: Mustafa Abdulrahman Date: Wed, 23 Aug 2023 14:44:42 -0400 Subject: [PATCH 04/11] try this approach --- .github/workflows/main.yml | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index db085d50d..99a723d8f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,57 +1,47 @@ name: Python CI - -on: +'on': pull_request_target: branches: - '**' - jobs: run-ci: - runs-on: ${{ matrix.os }} + runs-on: '${{ matrix.os }}' defaults: run: shell: bash - strategy: matrix: - # TODO: add windows matrix - os: [macos-latest] - + os: + - macos-latest steps: - name: Checkout code uses: actions/checkout@v3 - - name: Set up Python uses: actions/setup-python@v3 with: python-version: '3.10' - - name: Run tests using the shell script (macOS compatible). if: matrix.os == 'macos-latest' run: SKIP_POETRY_SHELL=1 sh install/install_openadapt.sh - - name: Checkout code uses: actions/checkout@v3 - - name: Install poetry uses: snok/install-poetry@v1 with: version: 1.5.1 virtualenvs-create: true virtualenvs-in-project: true - - name: Cache deps id: cache-deps uses: actions/cache@v2 with: path: .venv - key: pydeps-${{ hashFiles('**/poetry.lock') }} - + key: 'pydeps-${{ hashFiles(''**/poetry.lock'') }}' - run: poetry install --no-interaction --no-root if: steps.cache-deps.outputs.cache-hit != 'true' - - name: Check formatting with Black run: poetry run black --preview --check . - - name: Run Flake8 - run: poetry run flake8 + run: | + poetry shell + poetry run flake8 . From 0c5a476d597306429963d767b016f1be7849e320 Mon Sep 17 00:00:00 2001 From: Mustafa Abdulrahman Date: Wed, 23 Aug 2023 15:20:51 -0400 Subject: [PATCH 05/11] try this --- .github/workflows/main.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 99a723d8f..d9f157906 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,11 +20,6 @@ jobs: uses: actions/setup-python@v3 with: python-version: '3.10' - - name: Run tests using the shell script (macOS compatible). - if: matrix.os == 'macos-latest' - run: SKIP_POETRY_SHELL=1 sh install/install_openadapt.sh - - name: Checkout code - uses: actions/checkout@v3 - name: Install poetry uses: snok/install-poetry@v1 with: From 5642555a1588d837e191f782862506127e7cfd66 Mon Sep 17 00:00:00 2001 From: Mustafa Abdulrahman Date: Wed, 23 Aug 2023 17:39:08 -0400 Subject: [PATCH 06/11] test main.yml by remove macos --- .github/workflows/main.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d9f157906..0393991e0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,15 +4,8 @@ name: Python CI branches: - '**' jobs: - run-ci: - runs-on: '${{ matrix.os }}' - defaults: - run: - shell: bash - strategy: - matrix: - os: - - macos-latest + run-ci-test: + runs-on: macos-latest steps: - name: Checkout code uses: actions/checkout@v3 @@ -37,6 +30,4 @@ jobs: - name: Check formatting with Black run: poetry run black --preview --check . - name: Run Flake8 - run: | - poetry shell - poetry run flake8 . + run: poetry run flake8 . From 7e9af3139a715147938e251aeb64bdd00c8a2eec Mon Sep 17 00:00:00 2001 From: Mustafa Abdulrahman Date: Wed, 23 Aug 2023 17:44:34 -0400 Subject: [PATCH 07/11] rename to test ci --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0393991e0..dc31bca33 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: Python CI +name: Test CI 'on': pull_request_target: branches: From 2e9657feeda929e7ed82fea1371fe1b7806d405f Mon Sep 17 00:00:00 2001 From: Mustafa Abdulrahman Date: Thu, 24 Aug 2023 16:46:38 -0400 Subject: [PATCH 08/11] remove annotation --- openadapt/privacy/__init__.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/openadapt/privacy/__init__.py b/openadapt/privacy/__init__.py index d58acf990..e69de29bb 100644 --- a/openadapt/privacy/__init__.py +++ b/openadapt/privacy/__init__.py @@ -1,4 +0,0 @@ -"""Package for the Privacy API. - -Module: __init__.py -""" From e31cc386c02d4af7383cb6b64a5c051d1296962c Mon Sep 17 00:00:00 2001 From: Mustafa Abdulrahman Date: Thu, 24 Aug 2023 16:57:56 -0400 Subject: [PATCH 09/11] modify main.yml --- .github/workflows/main.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index db085d50d..a05ad524d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,13 +26,6 @@ jobs: with: python-version: '3.10' - - name: Run tests using the shell script (macOS compatible). - if: matrix.os == 'macos-latest' - run: SKIP_POETRY_SHELL=1 sh install/install_openadapt.sh - - - name: Checkout code - uses: actions/checkout@v3 - - name: Install poetry uses: snok/install-poetry@v1 with: From d931f805c18d595f3dc896502401d9a60334fbcb Mon Sep 17 00:00:00 2001 From: Mustafa Abdulrahman Date: Fri, 25 Aug 2023 11:57:45 -0400 Subject: [PATCH 10/11] add ref to PR --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a05ad524d..7ed6e2567 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,6 +20,9 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Set up Python uses: actions/setup-python@v3 From 27d07cca57fbb88bd5dadc137e1e432a8763d5f5 Mon Sep 17 00:00:00 2001 From: Mustafa Abdulrahman Date: Fri, 25 Aug 2023 12:04:55 -0400 Subject: [PATCH 11/11] address flake8 errors --- openadapt/privacy/__init__.py | 4 ++++ openadapt/privacy/providers/__init__.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/openadapt/privacy/__init__.py b/openadapt/privacy/__init__.py index e69de29bb..d58acf990 100644 --- a/openadapt/privacy/__init__.py +++ b/openadapt/privacy/__init__.py @@ -0,0 +1,4 @@ +"""Package for the Privacy API. + +Module: __init__.py +""" diff --git a/openadapt/privacy/providers/__init__.py b/openadapt/privacy/providers/__init__.py index e69de29bb..e5e493964 100644 --- a/openadapt/privacy/providers/__init__.py +++ b/openadapt/privacy/providers/__init__.py @@ -0,0 +1,4 @@ +"""Package for the Providers. + +Module: __init__.py +"""