DSPy: The framework for programming—not prompting—language models
Python
Recombine into one file, but separate by action type
Isaac Miller83cddf260e53
diff --git a/.github/workflows/run_fix.yml b/.github/workflows/run_fix.ymldeleted file mode 100644index 163461c6d..000000000--- a/.github/workflows/run_fix.yml+++ /dev/null@@ -1,39 +0,0 @@-name: Fix and comment on Ruff failure--on: pull_request_target--jobs:- fix:- name: Apply Ruff Fix- runs-on: ubuntu-latest- permissions:- contents: write- pull-requests: write- steps:- - uses: actions/checkout@v4- - uses: chartboost/ruff-action@v1- with:- args: --fix-only --exit-non-zero-on-fix-- comment_if_ruff_fail:- name: Comment on Ruff Failure- runs-on: ubuntu-latest- permissions:- contents: read- pull-requests: write- needs: fix- if: ${{ failure() && needs.fix.result == 'failure' }}- steps:- - name: Comment on Ruff Failure- uses: actions/github-script@v6- with:- script: |- const issue_number = context.issue.number;- const message = 'It seems like there are issues with the formatting. Please run `ruff check . --fix-only` and commit to address these issues.';- await github.rest.issues.createComment({- owner: context.repo.owner,- repo: context.repo.repo,- issue_number: issue_number,- body: message- });- core.setFailed("Automated Ruff fixes failed. A comment has been posted on the PR.");diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.ymlindex 75d45b324..24e617189 100644--- a/.github/workflows/run_tests.yml+++ b/.github/workflows/run_tests.yml@@ -1,21 +1,59 @@-name: Test and Build+name: Fix, Test, and Buildon:- push:- branches:- - mainpull_request:+ types: [opened, synchronize, reopened]+ pull_request_target:+ types: [opened, synchronize, reopened]env:POETRY_VERSION: "1.6.1"jobs:+ fix:+ name: Apply Ruff Fix+ runs-on: ubuntu-latest+ permissions:+ contents: write+ pull-requests: write+ if: github.event_name == 'pull_request_target'+ steps:+ - uses: actions/checkout@v4+ - uses: actions/setup-python@v5+ - uses: chartboost/ruff-action@v1+ with:+ args: --fix-only --exit-non-zero-on-fix++ comment_if_ruff_fail:+ name: Comment on Ruff Failure+ runs-on: ubuntu-latest+ permissions:+ contents: read+ pull-requests: write+ needs: fix+ if: ${{ failure() && needs.fix.result == 'failure' && github.event_name == 'pull_request_target' }}+ steps:+ # - run: echo 'It seems like there are issues with the formatting. Please run `ruff check . --fix-only` and commit to address these issues.'+ - name: Comment on Ruff Failure+ uses: actions/github-script@v6+ with:+ script: |+ const issue_number = context.issue.number;+ const message = 'It seems like there are issues with the formatting. Please run `ruff check . --fix-only` and commit to address these issues.';+ await github.rest.issues.createComment({+ owner: context.repo.owner,+ repo: context.repo.repo,+ issue_number: issue_number,+ body: message+ });+ core.setFailed("Automated Ruff fixes failed. A comment has been posted on the PR.");test:name: Run Testsruns-on: ubuntu-lateststrategy:matrix:python-version: ["3.9"]+ if: github.event_name == 'pull_request'steps:- uses: actions/checkout@v4- name: Load cached Poetry installation@@ -47,6 +85,7 @@ jobs:strategy:matrix:python-version: ["3.9"]+ if: github.event_name == 'pull_request'steps:- uses: actions/checkout@v4- name: Load cached Poetry installation@@ -78,6 +117,7 @@ jobs:strategy:matrix:python-version: ["3.9"]+ if: github.event_name == 'pull_request'steps:- uses: actions/checkout@v4- name: Load cached Poetry installation