diff --git a/.github/workflows/dependency_check.yml b/.github/workflows/latest_dependency_checker.yml similarity index 80% rename from .github/workflows/dependency_check.yml rename to .github/workflows/latest_dependency_checker.yml index 6ec9e05300..96b453281d 100644 --- a/.github/workflows/dependency_check.yml +++ b/.github/workflows/latest_dependency_checker.yml @@ -1,4 +1,4 @@ -name: Update Dependencies +name: Latest Dependency Checker on: schedule: - cron: '0 * * * *' @@ -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 diff --git a/.github/workflows/minimum_dependency_checker.yml b/.github/workflows/minimum_dependency_checker.yml new file mode 100644 index 0000000000..f37b86f5b0 --- /dev/null +++ b/.github/workflows/minimum_dependency_checker.yml @@ -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 + 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 \ No newline at end of file diff --git a/.github/workflows/release_notes_updated.yml b/.github/workflows/release_notes_updated.yml index 0ded4d78bc..3befefd663 100644 --- a/.github/workflows/release_notes_updated.yml +++ b/.github/workflows/release_notes_updated.yml @@ -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 @@ -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 + 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 }}\`" diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst index 1192908a4c..681f4ec6e9 100644 --- a/docs/source/release_notes.rst +++ b/docs/source/release_notes.rst @@ -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::