From 3819650e7d9a93e3f43b2c8061f9ee75f596d099 Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 27 Nov 2024 09:01:46 -0500 Subject: [PATCH 01/11] Add dependency workflow Adds dependency workflow with pre-commit updates. --- .github/dependabot.yml | 7 ---- .github/workflows/dependencies.yml | 52 ++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 7 deletions(-) delete mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/dependencies.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index f052884..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,7 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "pip" - directory: "/" - schedule: - interval: "monthly" - target-branch: "development" diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml new file mode 100644 index 0000000..b76d580 --- /dev/null +++ b/.github/workflows/dependencies.yml @@ -0,0 +1,52 @@ +name: update dependencies +on: + + schedule: + - cron: '0 0 1 * *' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ vars.APP_ID }} + private-key: ${{ secrets.PRIVATE_KEY }} + + - uses: actions/checkout@v4 + with: + token: ${{ steps.app-token.outputs.token }} + ref: development + persist-credentials: false + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + cache: pip + + - name: Install pre-commit and pip-tools + run: pip install pre-commit pip-tools + + - name: Run pre-commit autoupdate + run: pre-commit autoupdate + + - name: Run pip-compile + run: pip-compile --upgrade + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6.0.2 + with: + token: ${{ steps.app-token.outputs.token }} + base: development + branch: dependency-updates + delete-branch: true + title: Dependency Updates + commit-message: Dependency updates From d17a251b561ab583207c9433ec161d79b3a48c9b Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 27 Nov 2024 09:32:32 -0500 Subject: [PATCH 02/11] tweak dependency workflow target test requirements for pip upgrade. --- .github/workflows/dependencies.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index b76d580..db33cd0 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -1,5 +1,8 @@ name: update dependencies on: + pull_request: + branches: + - development schedule: - cron: '0 0 1 * *' @@ -38,8 +41,8 @@ jobs: - name: Run pre-commit autoupdate run: pre-commit autoupdate - - name: Run pip-compile - run: pip-compile --upgrade + - name: Update test requirements + run: pip install --upgrade -r test_requirements.tx - name: Create Pull Request uses: peter-evans/create-pull-request@v6.0.2 From 52b214bdd7db23ccdf339a786c00765222816f4d Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 27 Nov 2024 09:33:37 -0500 Subject: [PATCH 03/11] fix typo fix typo in dependency file --- .github/workflows/dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index db33cd0..cfb1062 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -42,7 +42,7 @@ jobs: run: pre-commit autoupdate - name: Update test requirements - run: pip install --upgrade -r test_requirements.tx + run: pip install --upgrade -r test_requirements.txt - name: Create Pull Request uses: peter-evans/create-pull-request@v6.0.2 From 0dab26c6e1028c37cac424c6abd41203ae0f177b Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 27 Nov 2024 09:44:48 -0500 Subject: [PATCH 04/11] testing pip-compile tweaks dependencies --- .github/workflows/dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index cfb1062..5932ced 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -42,7 +42,7 @@ jobs: run: pre-commit autoupdate - name: Update test requirements - run: pip install --upgrade -r test_requirements.txt + run: pip-compile --upgrade -r test_requirements.txt - name: Create Pull Request uses: peter-evans/create-pull-request@v6.0.2 From 8a93a86c4a7c144d4910390c76ba4ee3a36b9c11 Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 27 Nov 2024 09:47:37 -0500 Subject: [PATCH 05/11] testing pip-compile test --- .github/workflows/dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 5932ced..6f234d2 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -42,7 +42,7 @@ jobs: run: pre-commit autoupdate - name: Update test requirements - run: pip-compile --upgrade -r test_requirements.txt + run: pip-compile --upgrade test_requirements.txt - name: Create Pull Request uses: peter-evans/create-pull-request@v6.0.2 From 31643f359450ecdb41065f8e99c89cc741a26e3b Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 27 Nov 2024 09:51:13 -0500 Subject: [PATCH 06/11] testing with output file tweak dependencies --- .github/workflows/dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 6f234d2..f4a320a 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -42,7 +42,7 @@ jobs: run: pre-commit autoupdate - name: Update test requirements - run: pip-compile --upgrade test_requirements.txt + run: pip-compile --upgrade -o test_requirements.txt - name: Create Pull Request uses: peter-evans/create-pull-request@v6.0.2 From eaba778349af400acf569821de921c2be588cebe Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 27 Nov 2024 09:53:54 -0500 Subject: [PATCH 07/11] Add test_requirements.in Add test_requirements.in file. --- .github/workflows/dependencies.yml | 2 +- test_requirements.in | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 test_requirements.in diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index f4a320a..074d637 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -42,7 +42,7 @@ jobs: run: pre-commit autoupdate - name: Update test requirements - run: pip-compile --upgrade -o test_requirements.txt + run: pip-compile --upgrade test_requirements.in test_requirements.txt - name: Create Pull Request uses: peter-evans/create-pull-request@v6.0.2 diff --git a/test_requirements.in b/test_requirements.in new file mode 100644 index 0000000..19d4760 --- /dev/null +++ b/test_requirements.in @@ -0,0 +1,2 @@ +coverage~=7.2 +pytest~=7.2 From 7c73c5540c62f78f864a928d99ca718115dbf144 Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 27 Nov 2024 10:00:52 -0500 Subject: [PATCH 08/11] testing testing workflow with different branch --- .github/workflows/dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 074d637..c802387 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v4 with: token: ${{ steps.app-token.outputs.token }} - ref: development + ref: dependency-tweaks persist-credentials: false - name: Set up Python From b8ebc3ba6ced5e3b32b63ea8448f823fd7745461 Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 27 Nov 2024 10:02:01 -0500 Subject: [PATCH 09/11] fix syntax fix pip-compile syntax --- .github/workflows/dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index c802387..392096f 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -42,7 +42,7 @@ jobs: run: pre-commit autoupdate - name: Update test requirements - run: pip-compile --upgrade test_requirements.in test_requirements.txt + run: pip-compile --upgrade test_requirements.in -o test_requirements.txt - name: Create Pull Request uses: peter-evans/create-pull-request@v6.0.2 From 8c246310c0545eb59788b2529b8e3a81411616e2 Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 27 Nov 2024 10:04:20 -0500 Subject: [PATCH 10/11] Change branch Changes branch for dependency workflows now that testing is done. Also removes trigger on PR --- .github/workflows/dependencies.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 392096f..6402835 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -1,8 +1,5 @@ name: update dependencies on: - pull_request: - branches: - - development schedule: - cron: '0 0 1 * *' @@ -26,7 +23,7 @@ jobs: - uses: actions/checkout@v4 with: token: ${{ steps.app-token.outputs.token }} - ref: dependency-tweaks + ref: development persist-credentials: false - name: Set up Python From 580628bbd1f8bd583ce42d79e4f868dadff0f03f Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 27 Nov 2024 10:16:07 -0500 Subject: [PATCH 11/11] updates requirements Updates pytest version --- test_requirements.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_requirements.in b/test_requirements.in index 19d4760..8187fde 100644 --- a/test_requirements.in +++ b/test_requirements.in @@ -1,2 +1,2 @@ coverage~=7.2 -pytest~=7.2 +pytest~=8