Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update Dependencies
name: Latest Dependency Checker
on:
schedule:
- cron: '0 * * * *'
Expand All @@ -24,9 +24,9 @@ jobs:
commit-message: Update latest dependencies
title: Automated Latest Dependency Updates
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
body: "This is an auto-generated PR with dependency updates.
Please do not delete the dep-update branch because it's needed by the auto-dependency bot."
branch: dep-update
body: "This is an auto-generated PR with **latest** dependency updates.
Please do not delete the `latest-dep-update` branch because it's needed by the auto-dependency bot."
branch: latest-dep-update
branch-suffix: short-commit-hash
base: main
reviewers: angela97lin, dsherry, jeremyliweishih, freddyaboulton, bchen1116, chukarsten, ParthivNaresh
77 changes: 77 additions & 0 deletions .github/workflows/minimum_dependency_checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Minimum Dependency Checker
on:
push:
branches:
- main
paths:
- 'requirements.txt'
- 'test-requirements.txt'
- 'core-requirements.txt'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Run min dep generator - test requirements
id: min_dep_gen_test
uses: alteryx/minimum-dependency-generator@v2
with:
requirements_paths: 'test-requirements.txt'
- name: Save min test requirements and run diff
id: check_min_test
continue-on-error: true
run: |
mkdir /tmp/dependencies_updated_artifacts
printf "${{ steps.min_dep_gen_test.outputs.min_reqs }}" > /tmp/minimum_test_requirements.txt
diff /tmp/minimum_test_requirements.txt evalml/tests/dependency_update_check/minimum_test_requirements.txt
- name: if min test requirements have changed, write output file
if: steps.check_min_test.outcome != 'success'
run: |
printf "${{ steps.min_dep_gen_test.outputs.min_reqs }}" > evalml/tests/dependency_update_check/minimum_test_requirements.txt
- name: Run min dep generator - requirements
id: min_dep_gen_reqs
uses: alteryx/minimum-dependency-generator@v2
with:
requirements_paths: 'requirements.txt'
- name: Save min requirements and run diff
id: check_min_reqs
continue-on-error: true
run: |
printf "${{ steps.min_dep_gen_reqs.outputs.min_reqs }}" > /tmp/minimum_requirements.txt
diff /tmp/minimum_requirements.txt evalml/tests/dependency_update_check/minimum_requirements.txt
- name: if min requirements have changed, write output file
if: steps.check_min_reqs.outcome != 'success'
run: |
printf "${{ steps.min_dep_gen_reqs.outputs.min_reqs }}" > evalml/tests/dependency_update_check/minimum_requirements.txt
- name: Run min dep generator - core requirements
id: min_dep_gen_core
uses: alteryx/minimum-dependency-generator@v2
with:
requirements_paths: 'core-requirements.txt'
- name: Save min core requirements and run diff
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a way in GH actions to define a "function" which could accept an arg like the requirements file name, and then execute the diff and file write, and then we could call that "function" 3x instead of copy-pasting the code, right? Not required for this PR lol just curious

id: check_core_reqs
continue-on-error: true
run: |
printf "${{ steps.min_dep_gen_core.outputs.min_reqs }}" > /tmp/minimum_core_requirements.txt
diff /tmp/minimum_core_requirements.txt evalml/tests/dependency_update_check/minimum_core_requirements.txt
- name: if min core requirements have changed, write output file
if: steps.check_core_reqs.outcome != 'success'
run: |
printf "${{ steps.min_dep_gen_core.outputs.min_reqs }}" > evalml/tests/dependency_update_check/minimum_core_requirements.txt
- name: Create Pull Request
uses: FeatureLabs/create-pull-request@v3
with:
token: ${{ secrets.MACHINEFL_DEPENDENCY_CHECKER_TOKEN }}
commit-message: Update minimum dependencies
title: Automated Minimum Dependency Updates
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
body: "This is an auto-generated PR with **minimum** dependency updates.
Please do not delete the `min-dep-update` branch because it's needed by the auto-dependency bot."
branch: min-dep-update
branch-suffix: short-commit-hash
base: main
reviewers: angela97lin, dsherry, jeremyliweishih, freddyaboulton, bchen1116, chukarsten, ParthivNaresh
10 changes: 7 additions & 3 deletions .github/workflows/release_notes_updated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ jobs:
run: |
if [[ $(expr match "${{ github.event.pull_request.head.ref }}" "release_v[0-9.]\+") -gt 0 ]]; then
echo This is a release PR;
elif [[ $(expr match "${{ github.event.pull_request.head.ref }}" "dep-update-[a-zA-Z0-9]*") -gt 0 ]]; then
echo This is a dependency update PR;
elif [[ $(expr match "${{ github.event.pull_request.head.ref }}" "latest-dep-update-[a-zA-Z0-9]*") -gt 0 ]]; then
echo This is a latest dependency update PR;
elif [[ $(expr match "${{ github.event.pull_request.head.ref }}" "min-dep-update-[a-zA-Z0-9]*") -gt 0 ]]; then
echo This is a minimum dependency update PR;
else
echo This is a regular PR;
fi
Expand All @@ -28,7 +30,9 @@ jobs:
run: |
if [[ $(expr match "${{ github.event.pull_request.head.ref }}" "release_v[0-9.]\+") -gt 0 ]]; then
exit 0;
elif [[ $(expr match "${{ github.event.pull_request.head.ref }}" "dep-update-[a-zA-Z0-9]*") -gt 0 ]]; then
elif [[ $(expr match "${{ github.event.pull_request.head.ref }}" "latest-dep-update-[a-zA-Z0-9]*") -gt 0 ]]; then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the release notes check to skip latest and minimum dependency branches

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call
There's probably a fancy unix way to do this in one if check hahaha but I don't know what it is right away at least

exit 0;
elif [[ $(expr match "${{ github.event.pull_request.head.ref }}" "min-dep-update-[a-zA-Z0-9]*") -gt 0 ]]; then
exit 0;
fi
cat docs/source/release_notes.rst | grep ":pr:\`${{ github.event.number }}\`"
2 changes: 1 addition & 1 deletion docs/source/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Release Notes
* Documentation Changes
* Capped Sphinx version under 4.0.0 :pr:`2244`
* Testing Changes

* Add minimum dependency checker to generate minimum requirement files :pr:`2267`

.. warning::

Expand Down