From 3fffe65a3b82f65036213d77b53ecc81fd8e2cc1 Mon Sep 17 00:00:00 2001 From: Reinier van der Leer Date: Thu, 1 Jun 2023 17:01:30 +0200 Subject: [PATCH 01/15] Update bulletin for v0.4.0 --- BULLETIN.md | 42 +++++++----------------------------------- 1 file changed, 7 insertions(+), 35 deletions(-) diff --git a/BULLETIN.md b/BULLETIN.md index 70be3c3e..3e4e2783 100644 --- a/BULLETIN.md +++ b/BULLETIN.md @@ -14,46 +14,18 @@ We have to be somewhat selective in order to keep making progress, but this does mean you can't contribute. Check out the contribution guide on our wiki: https://github.com/Significant-Gravitas/Auto-GPT/wiki/Contributing -# ๐Ÿš€ v0.3.1 Release ๐Ÿš€ -Over a week and 47 pull requests have passed since v0.3.0, and we are happy to announce -the release of v0.3.1! +# ๐Ÿš€ v0.4.0 Release ๐Ÿš€ +Two weeks and 76 pull requests have passed since v0.3.1, and we are happy to announce +the release of v0.4.0! -Highlights and notable changes since v0.2.2: +Highlights and notable changes since v0.3.1: -## Changes to Docker configuration ๐Ÿ‹ - * The workdir has been changed from */home/appuser* to */app*. - Be sure to update any volume mounts accordingly! - * Docker-compose 1.29.0 is now required. - -## Logging ๐Ÿงพ - * Log functionality has been improved for better understanding - and easier summarization. - * All LLM interactions are now logged to logs/DEBUG, to help with - debugging and development. - -## Other - * Edge browser is now supported by the `browse_website` command. - * Sets of commands can now be disabled using DISABLED_COMMAND_CATEGORIES in .env. - -# โš ๏ธ Command `send_tweet` is REMOVED -Twitter functionality (and more) is now covered by plugins, see [Plugin support ๐Ÿ”Œ] - -## Plugin support ๐Ÿ”Œ -Auto-GPT now has support for plugins! With plugins, you can extend Auto-GPT's abilities, -adding support for third-party services and more. -See https://github.com/Significant-Gravitas/Auto-GPT-Plugins for instructions and -available plugins. Specific plugins can be allowlisted/denylisted in .env. +## โš ๏ธ Command `send_tweet` is REMOVED +Twitter functionality (and more) is now covered by plugins. ## Memory backend deprecation โš ๏ธ The Milvus, Pinecone and Weaviate memory backends were rendered incompatible by work on the memory system, and have been removed in `master`. The Redis -memory store was also temporarily removed but we aim to merge a new implementation -before the next release. +memory store was also temporarily removed; we will merge a new implementation ASAP. Whether built-in support for the others will be added back in the future is subject to discussion, feel free to pitch in: https://github.com/Significant-Gravitas/Auto-GPT/discussions/4280 - -# Challenge Workflow ๐Ÿ† -If you have been working on challenges... Thank You! -But to run the debugger challenge or other challenges using cassettes and VCR in docker, You will now need to `pip uninstall vcrpy` and `pip install -r requirements.txt` again. -This will install a new version of vcrpy that is compatible with running vcr in docker. -This workflow will be fixed as soon as the maintainer from VCRpy merges our changes. From 15c157343d7fe9c3ced7e39334b9e0bf72390995 Mon Sep 17 00:00:00 2001 From: Reinier van der Leer Date: Thu, 1 Jun 2023 23:23:57 +0200 Subject: [PATCH 02/15] Remove Redis memory configuration from docker-compose configs --- .devcontainer/docker-compose.yml | 7 ------- docker-compose.yml | 8 -------- docs/setup.md | 7 ------- 3 files changed, 22 deletions(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 90d8c116..c05a326e 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -4,16 +4,9 @@ version: '3.9' services: auto-gpt: - depends_on: - - redis build: dockerfile: .devcontainer/Dockerfile context: ../ tty: true - environment: - MEMORY_BACKEND: ${MEMORY_BACKEND:-redis} - REDIS_HOST: ${REDIS_HOST:-redis} volumes: - ../:/workspace/Auto-GPT - redis: - image: 'redis/redis-stack-server:latest' diff --git a/docker-compose.yml b/docker-compose.yml index a23aa431..d6878e45 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,17 +5,9 @@ version: "3.9" services: auto-gpt: - depends_on: - - redis build: ./ env_file: - .env - environment: - MEMORY_BACKEND: ${MEMORY_BACKEND:-redis} - REDIS_HOST: ${REDIS_HOST:-redis} volumes: - ./:/app profiles: ["exclude-from-up"] - - redis: - image: "redis/redis-stack-server:latest" diff --git a/docs/setup.md b/docs/setup.md index c4755a8d..257e07c1 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -47,13 +47,8 @@ Get your OpenAI API key from: [https://platform.openai.com/account/api-keys](htt services: auto-gpt: image: significantgravitas/auto-gpt - depends_on: - - redis env_file: - .env - environment: - MEMORY_BACKEND: ${MEMORY_BACKEND:-redis} - REDIS_HOST: ${REDIS_HOST:-redis} profiles: ["exclude-from-up"] volumes: - ./auto_gpt_workspace:/app/autogpt/auto_gpt_workspace @@ -68,8 +63,6 @@ Get your OpenAI API key from: [https://platform.openai.com/account/api-keys](htt #- type: bind # source: ./ai_settings.yaml # target: /app/ai_settings.yaml - redis: - image: "redis/redis-stack-server:latest" 4. Create the necessary [configuration](#configuration) files. If needed, you can find templates in the [repository]. From fc0688673e97ef8ddbbcfbca195b622742a64a41 Mon Sep 17 00:00:00 2001 From: Richard Beales Date: Fri, 2 Jun 2023 12:08:33 +0100 Subject: [PATCH 03/15] Update BULLETIN.md --- BULLETIN.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BULLETIN.md b/BULLETIN.md index 3e4e2783..6d9303b6 100644 --- a/BULLETIN.md +++ b/BULLETIN.md @@ -29,3 +29,9 @@ by work on the memory system, and have been removed in `master`. The Redis memory store was also temporarily removed; we will merge a new implementation ASAP. Whether built-in support for the others will be added back in the future is subject to discussion, feel free to pitch in: https://github.com/Significant-Gravitas/Auto-GPT/discussions/4280 + +## Refactoring of global state +The config object 'singleton' has been refactored to ease the path to our re-arch. + +## Further fixes and changes +Take a look at the Release Notes on Github! https://github.com/Significant-Gravitas/Auto-GPT/releases/tag/v0.4.0 From 9247f9480c5185b86f9429a41f40344c9c572e27 Mon Sep 17 00:00:00 2001 From: Reinier van der Leer Date: Fri, 2 Jun 2023 22:49:05 +0200 Subject: [PATCH 04/15] Fix CI for internal PRs with CI changes (#4552) * Port fixed CI workflow from master * Trigger CI * Improve CI concurrency check --- .github/workflows/ci.yml | 159 +++++++++++++++++++++++++++++++++++---- 1 file changed, 145 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 684bd117..3388edb0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,16 +2,24 @@ name: Python CI on: push: - branches: [ master ] + branches: [ master, ci-test* ] + paths-ignore: + - 'tests/Auto-GPT-test-cassettes' + - 'tests/integration/challenges/current_score.json' + pull_request: + branches: [ stable, master ] pull_request_target: - branches: [ master, stable ] + branches: [ master, ci-test* ] concurrency: group: ${{ format('ci-{0}', github.head_ref && format('pr-{0}', github.event.pull_request.number) || github.sha) }} - cancel-in-progress: ${{ github.event_name == 'pull_request_target' }} + cancel-in-progress: ${{ startsWith(github.event_name, 'pull_request') && github.event.pull_request.head.repo.fork == (github.event_name == 'pull_request_target') }} jobs: lint: + # eliminate duplicate runs on master + if: github.event_name == 'push' || github.ref_name != 'master' || (github.event.pull_request.head.repo.fork == (github.event_name == 'pull_request_target')) + runs-on: ubuntu-latest env: min-python-version: "3.10" @@ -45,7 +53,19 @@ jobs: run: isort . --check if: success() || failure() + - name: Check mypy formatting + run: mypy + if: success() || failure() + + - name: Check for unused imports and pass statements + run: | + cmd="autoflake --remove-all-unused-imports --recursive --ignore-init-module-imports autogpt tests" + $cmd --check || (echo "You have unused imports or pass statements, please run '${cmd} --in-place'" && exit 1) + test: + # eliminate duplicate runs on master + if: github.event_name == 'push' || github.ref_name != 'master' || (github.event.pull_request.head.repo.fork == (github.event_name == 'pull_request_target')) + permissions: # Gives the action the necessary permissions for publishing new # comments in pull requests. @@ -55,6 +75,7 @@ jobs: # comments (to avoid publishing multiple comments in the same PR) contents: write runs-on: ubuntu-latest + timeout-minutes: 30 strategy: matrix: python-version: ["3.10"] @@ -66,6 +87,33 @@ jobs: fetch-depth: 0 ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} + submodules: true + + - name: Check out cassettes + if: ${{ startsWith(github.event_name, 'pull_request') }} + run: | + cassette_branch="${{ github.event.pull_request.user.login }}-${{ github.event.pull_request.head.ref }}" + git config --global user.name "Auto-GPT-Bot" + git config --global user.email "github-bot@agpt.co" + cd tests/Auto-GPT-test-cassettes + + if git ls-remote --exit-code --heads origin $cassette_branch ; then + git fetch origin $cassette_branch + git fetch origin ${{ github.event.pull_request.base.ref }} + + git checkout $cassette_branch + + if git merge --no-commit --no-ff ${{ github.event.pull_request.base.ref }}; then + echo "Using cassettes from mirror branch, synced to upstream branch '${{ github.event.pull_request.base.ref }}'" + else + echo "Could not merge upstream changes to cassettes. Using cassettes from ${{ github.event.pull_request.base.ref }}." + git merge --abort + git checkout ${{ github.event.pull_request.base.ref }} + fi + else + echo "Branch '$cassette_branch' does not exist in cassette submodule."\ + "Using cassettes from ${{ github.event.pull_request.base.ref }}." + fi - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 @@ -77,25 +125,108 @@ jobs: python -m pip install --upgrade pip pip install -r requirements.txt - - name: Run unittest tests with coverage + - name: Run pytest tests with coverage run: | pytest -n auto --cov=autogpt --cov-report term-missing --cov-branch --cov-report xml --cov-report term + python tests/integration/challenges/utils/build_current_score.py env: CI: true - PROXY: ${{ vars.PROXY }} + PROXY: ${{ secrets.PROXY }} AGENT_MODE: ${{ vars.AGENT_MODE }} AGENT_TYPE: ${{ vars.AGENT_TYPE }} - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 - - name: Stage new files and commit + - id: setup_git_auth + name: Set up git token authentication run: | - git add tests - git diff --cached --quiet && echo "No changes to commit" && exit 0 - git config user.email "github-actions@github.com" - git config user.name "GitHub Actions" - git commit -m "Add new cassettes" - git checkout -b cassette-diff-${{ github.event.pull_request.number }} - git remote add target https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.event.pull_request.base.repo.full_name }} - git push -f target cassette-diff-${{ github.event.pull_request.number }} + config_key="http.${{ github.server_url }}/.extraheader" + git config "$config_key" \ + "Authorization: Basic x-access-token:${{ secrets.PAT_REVIEW }}" + + echo "config_key=$config_key" >> $GITHUB_OUTPUT + + - name: Push updated challenge scores + if: github.event_name == 'push' + run: | + score_file="tests/integration/challenges/current_score.json" + + if ! git diff --quiet $score_file; then + git add $score_file + git commit -m "Update challenge scores" + git push origin HEAD:${{ github.ref }} + else + echo "The challenge scores didn't change." + fi + + - id: push_cassettes + name: Push updated cassettes + run: | + if [[ "${{ startsWith(github.event_name, 'pull_request') }}" = "true" ]]; then + is_pull_request=true + cassette_branch="${{ github.event.pull_request.user.login }}-${{ github.event.pull_request.head.ref }}" + base_branch="${{ github.event.pull_request.base.ref }}" + else + current_branch=$(echo ${{ github.ref }} | sed -e "s/refs\/heads\///g") + cassette_branch=$current_branch + fi + + cd tests/Auto-GPT-test-cassettes + git fetch origin $cassette_branch + + # Commit & push changes to cassettes if any + if ! git diff-index --quiet $cassette_branch; then + git add . + git commit -m "Auto-update cassettes" + git pull --rebase origin $cassette_branch + + git push origin HEAD:$cassette_branch + + cd ../.. + if [ $is_pull_request ]; then + git fetch origin $base_branch + cassette_diff=$(git diff $cassette_branch origin/$base_branch) + else + git add tests/Auto-GPT-test-cassettes + git commit -m "Update cassette submodule" + git push origin HEAD:$current_branch + fi + else + echo "No cassette changes to commit" + fi + + if [ -n "$cassette_diff" ]; then + echo "updated=true" >> $GITHUB_OUTPUT + else + echo "updated=false" >> $GITHUB_OUTPUT + fi + + - name: Post Set up git token auth + run: | + git config --unset "${{ steps.setup_git_auth.outputs.config_key }}" + + - name: Apply or remove behaviour change label and comment on PR + if: ${{ startsWith(github.event_name, 'pull_request') }} + run: | + PR_NUMBER=${{ github.event.pull_request.number }} + TOKEN=${{ secrets.PAT_REVIEW }} + REPO=${{ github.repository }} + + if [[ "${{ steps.push_cassettes.outputs.updated }}" == "true" ]]; then + echo "Adding label and comment..." + curl -X POST \ + -H "Authorization: Bearer $TOKEN" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/$REPO/issues/$PR_NUMBER/labels \ + -d '{"labels":["behaviour change"]}' + + echo $TOKEN | gh auth login --with-token + gh api repos/$REPO/issues/$PR_NUMBER/comments -X POST -F body="You changed AutoGPT's behaviour. The cassettes have been updated and will be merged to the submodule when this Pull Request gets merged." + else + echo "Removing label..." + curl -X DELETE \ + -H "Authorization: Bearer $TOKEN" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/$REPO/issues/$PR_NUMBER/labels/behaviour%20change + fi From 4cc6e27f023eee383408f68e500a6797213ff273 Mon Sep 17 00:00:00 2001 From: merwanehamadi Date: Fri, 2 Jun 2023 14:09:16 -0700 Subject: [PATCH 05/15] Remove news about config (#4553) --- BULLETIN.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/BULLETIN.md b/BULLETIN.md index 6d9303b6..552a6454 100644 --- a/BULLETIN.md +++ b/BULLETIN.md @@ -30,8 +30,5 @@ memory store was also temporarily removed; we will merge a new implementation AS Whether built-in support for the others will be added back in the future is subject to discussion, feel free to pitch in: https://github.com/Significant-Gravitas/Auto-GPT/discussions/4280 -## Refactoring of global state -The config object 'singleton' has been refactored to ease the path to our re-arch. - ## Further fixes and changes Take a look at the Release Notes on Github! https://github.com/Significant-Gravitas/Auto-GPT/releases/tag/v0.4.0 From ce440128667eb9b43b78ad765de9e52eeb411463 Mon Sep 17 00:00:00 2001 From: Reinier van der Leer Date: Fri, 2 Jun 2023 23:27:15 +0200 Subject: [PATCH 06/15] Fix pushing cassettes in CI --- .github/workflows/ci.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3388edb0..b27e477e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,7 +89,8 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} submodules: true - - name: Check out cassettes + - id: checkout_cassettes + name: Check out cassettes if: ${{ startsWith(github.event_name, 'pull_request') }} run: | cassette_branch="${{ github.event.pull_request.user.login }}-${{ github.event.pull_request.head.ref }}" @@ -110,9 +111,11 @@ jobs: git merge --abort git checkout ${{ github.event.pull_request.base.ref }} fi + echo "cassette_branch=$(git branch --show-current)" >> $GITHUB_OUTPUT else echo "Branch '$cassette_branch' does not exist in cassette submodule."\ "Using cassettes from ${{ github.event.pull_request.base.ref }}." + echo "cassette_branch=${{ github.event.pull_request.base.ref }}" >> $GITHUB_OUTPUT fi - name: Set up Python ${{ matrix.python-version }} @@ -166,6 +169,7 @@ jobs: if [[ "${{ startsWith(github.event_name, 'pull_request') }}" = "true" ]]; then is_pull_request=true cassette_branch="${{ github.event.pull_request.user.login }}-${{ github.event.pull_request.head.ref }}" + cassette_source_branch="${{ steps.checkout_cassettes.outputs.cassette_branch }}" base_branch="${{ github.event.pull_request.base.ref }}" else current_branch=$(echo ${{ github.ref }} | sed -e "s/refs\/heads\///g") @@ -173,13 +177,16 @@ jobs: fi cd tests/Auto-GPT-test-cassettes - git fetch origin $cassette_branch + git fetch origin $cassette_source_branch # Commit & push changes to cassettes if any - if ! git diff-index --quiet $cassette_branch; then + if ! git diff-index --quiet $cassette_source_branch; then + if ! [ "$cassette_branch" = "$cassette_source_branch" ]; then + git checkout -b $cassette_branch + fi git add . git commit -m "Auto-update cassettes" - git pull --rebase origin $cassette_branch + git pull --rebase origin $cassette_source_branch git push origin HEAD:$cassette_branch From 4c11b21dff6a0c556c1a0cc6b714f0d67113c1ac Mon Sep 17 00:00:00 2001 From: Reinier van der Leer Date: Sun, 4 Jun 2023 02:01:35 +0200 Subject: [PATCH 07/15] Fix CI git authorization --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b27e477e..9ed1ed76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -146,7 +146,7 @@ jobs: run: | config_key="http.${{ github.server_url }}/.extraheader" git config "$config_key" \ - "Authorization: Basic x-access-token:${{ secrets.PAT_REVIEW }}" + "Authorization: Basic $(echo -n "x-access-token:${{ secrets.PAT_REVIEW }}" | base64 -w0)" echo "config_key=$config_key" >> $GITHUB_OUTPUT From 3e5868f2237cd8cd977c89d53f7f2f959905b715 Mon Sep 17 00:00:00 2001 From: Reinier van der Leer Date: Sun, 4 Jun 2023 02:11:32 +0200 Subject: [PATCH 08/15] Fix CI git diff --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ed1ed76..90a8c54c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -177,10 +177,10 @@ jobs: fi cd tests/Auto-GPT-test-cassettes - git fetch origin $cassette_source_branch + git fetch origin $cassette_source_branch:$cassette_source_branch # Commit & push changes to cassettes if any - if ! git diff-index --quiet $cassette_source_branch; then + if ! git diff-index --quiet $cassette_source_branch --; then if ! [ "$cassette_branch" = "$cassette_source_branch" ]; then git checkout -b $cassette_branch fi From c4e2d8fbdd4ca31c25744408b1a821dc7a2782f4 Mon Sep 17 00:00:00 2001 From: Reinier van der Leer Date: Sun, 4 Jun 2023 03:14:05 +0200 Subject: [PATCH 09/15] debug --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90a8c54c..908e87b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -145,8 +145,10 @@ jobs: name: Set up git token authentication run: | config_key="http.${{ github.server_url }}/.extraheader" - git config "$config_key" \ + git config --list + git config --global "$config_key" \ "Authorization: Basic $(echo -n "x-access-token:${{ secrets.PAT_REVIEW }}" | base64 -w0)" + git config --list echo "config_key=$config_key" >> $GITHUB_OUTPUT @@ -188,7 +190,8 @@ jobs: git commit -m "Auto-update cassettes" git pull --rebase origin $cassette_source_branch - git push origin HEAD:$cassette_branch + git config --list + GIT_TRACE=2 GIT_CURL_VERBOSE=2 git push origin HEAD:$cassette_branch cd ../.. if [ $is_pull_request ]; then From 0a20fa4fdf7239285323aa3cee945e827dad9c79 Mon Sep 17 00:00:00 2001 From: Merwane Hamadi Date: Sat, 3 Jun 2023 21:19:58 -0700 Subject: [PATCH 10/15] Fix CI git authentication and cassettes --- .github/workflows/ci.yml | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 908e87b8..8793b203 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -144,13 +144,17 @@ jobs: - id: setup_git_auth name: Set up git token authentication run: | + base64_pat=$(echo -n "pat:${{ secrets.PAT_REVIEW }}" | base64 -w0) config_key="http.${{ github.server_url }}/.extraheader" - git config --list - git config --global "$config_key" \ - "Authorization: Basic $(echo -n "x-access-token:${{ secrets.PAT_REVIEW }}" | base64 -w0)" - git config --list + git config "$config_key" \ + "Authorization: Basic $base64_pat" + cd tests/Auto-GPT-test-cassettes + git config "$config_key" \ + "Authorization: Basic $base64_pat" echo "config_key=$config_key" >> $GITHUB_OUTPUT + git config --global user.name "Auto-GPT-Bot" + git config --global user.email "github-bot@agpt.co" - name: Push updated challenge scores if: github.event_name == 'push' @@ -179,25 +183,27 @@ jobs: fi cd tests/Auto-GPT-test-cassettes - git fetch origin $cassette_source_branch:$cassette_source_branch + git fetch origin # Commit & push changes to cassettes if any - if ! git diff-index --quiet $cassette_source_branch --; then + if ! git diff --quiet; then if ! [ "$cassette_branch" = "$cassette_source_branch" ]; then git checkout -b $cassette_branch fi git add . git commit -m "Auto-update cassettes" - git pull --rebase origin $cassette_source_branch - git config --list - GIT_TRACE=2 GIT_CURL_VERBOSE=2 git push origin HEAD:$cassette_branch - - cd ../.. if [ $is_pull_request ]; then + git checkout -b $cassette_branch || git checkout $cassette_branch + git push -f origin $cassette_branch + cd ../.. + git fetch origin $base_branch - cassette_diff=$(git diff $cassette_branch origin/$base_branch) + cassette_diff=$(git diff origin/$base_branch) else + git push origin HEAD:$cassette_branch + cd ../.. + git add tests/Auto-GPT-test-cassettes git commit -m "Update cassette submodule" git push origin HEAD:$current_branch From 02846fcf912ff0833cc67f7e985743ee33e5b010 Mon Sep 17 00:00:00 2001 From: Merwane Hamadi Date: Sat, 3 Jun 2023 21:24:36 -0700 Subject: [PATCH 11/15] remove information retrieval challenge b from beaten challenges --- tests/integration/challenges/current_score.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/challenges/current_score.json b/tests/integration/challenges/current_score.json index 72661399..deb4a82d 100644 --- a/tests/integration/challenges/current_score.json +++ b/tests/integration/challenges/current_score.json @@ -22,7 +22,7 @@ }, "information_retrieval_challenge_b": { "max_level": 1, - "max_level_beaten": 1 + "max_level_beaten": null } }, "kubernetes": { @@ -45,4 +45,4 @@ "max_level_beaten": 1 } } -} \ No newline at end of file +} From 84e58051faa0a5058f917b48b284d6149f050050 Mon Sep 17 00:00:00 2001 From: Reinier van der Leer Date: Sun, 4 Jun 2023 15:06:30 +0200 Subject: [PATCH 12/15] Clean up CI git logic --- .github/workflows/ci.yml | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8793b203..a9656fc1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,8 +94,6 @@ jobs: if: ${{ startsWith(github.event_name, 'pull_request') }} run: | cassette_branch="${{ github.event.pull_request.user.login }}-${{ github.event.pull_request.head.ref }}" - git config --global user.name "Auto-GPT-Bot" - git config --global user.email "github-bot@agpt.co" cd tests/Auto-GPT-test-cassettes if git ls-remote --exit-code --heads origin $cassette_branch ; then @@ -110,6 +108,9 @@ jobs: echo "Could not merge upstream changes to cassettes. Using cassettes from ${{ github.event.pull_request.base.ref }}." git merge --abort git checkout ${{ github.event.pull_request.base.ref }} + + # Delete branch to prevent conflict when re-creating it + git branch -D $cassette_branch fi echo "cassette_branch=$(git branch --show-current)" >> $GITHUB_OUTPUT else @@ -144,17 +145,20 @@ jobs: - id: setup_git_auth name: Set up git token authentication run: | - base64_pat=$(echo -n "pat:${{ secrets.PAT_REVIEW }}" | base64 -w0) + git config --global user.name "Auto-GPT-Bot" + git config --global user.email "github-bot@agpt.co" + config_key="http.${{ github.server_url }}/.extraheader" + base64_pat=$(echo -n "pat:${{ secrets.PAT_REVIEW }}" | base64 -w0) + git config "$config_key" \ "Authorization: Basic $base64_pat" - cd tests/Auto-GPT-test-cassettes + cd tests/Auto-GPT-test-cassettes git config "$config_key" \ "Authorization: Basic $base64_pat" + echo "config_key=$config_key" >> $GITHUB_OUTPUT - git config --global user.name "Auto-GPT-Bot" - git config --global user.email "github-bot@agpt.co" - name: Push updated challenge scores if: github.event_name == 'push' @@ -172,7 +176,7 @@ jobs: - id: push_cassettes name: Push updated cassettes run: | - if [[ "${{ startsWith(github.event_name, 'pull_request') }}" = "true" ]]; then + if [ "${{ startsWith(github.event_name, 'pull_request') }}" = "true" ]; then is_pull_request=true cassette_branch="${{ github.event.pull_request.user.login }}-${{ github.event.pull_request.head.ref }}" cassette_source_branch="${{ steps.checkout_cassettes.outputs.cassette_branch }}" @@ -183,27 +187,27 @@ jobs: fi cd tests/Auto-GPT-test-cassettes - git fetch origin + git fetch origin $cassette_source_branch:$cassette_source_branch # Commit & push changes to cassettes if any - if ! git diff --quiet; then - if ! [ "$cassette_branch" = "$cassette_source_branch" ]; then + if ! git diff --quiet $cassette_source_branch --; then + if [ "$cassette_branch" != "$cassette_source_branch" ]; then git checkout -b $cassette_branch fi git add . git commit -m "Auto-update cassettes" if [ $is_pull_request ]; then - git checkout -b $cassette_branch || git checkout $cassette_branch - git push -f origin $cassette_branch - cd ../.. + git push --force origin HEAD:$cassette_branch + else + git push origin HEAD:$cassette_branch + fi + cd ../.. + if [ $is_pull_request ]; then git fetch origin $base_branch cassette_diff=$(git diff origin/$base_branch) else - git push origin HEAD:$cassette_branch - cd ../.. - git add tests/Auto-GPT-test-cassettes git commit -m "Update cassette submodule" git push origin HEAD:$current_branch @@ -219,8 +223,10 @@ jobs: fi - name: Post Set up git token auth + if: steps.setup_git_auth.outcome == 'success' run: | - git config --unset "${{ steps.setup_git_auth.outputs.config_key }}" + git config --unset-all '${{ steps.setup_git_auth.outputs.config_key }}' + git submodule foreach git config --unset-all '${{ steps.setup_git_auth.outputs.config_key }}' - name: Apply or remove behaviour change label and comment on PR if: ${{ startsWith(github.event_name, 'pull_request') }} From af28510abae3a3155f361331637f7b02b1906935 Mon Sep 17 00:00:00 2001 From: merwanehamadi Date: Sun, 4 Jun 2023 07:38:32 -0700 Subject: [PATCH 13/15] Fix `test_web_selenium` (#4554) --- tests/{unit => integration}/test_web_selenium.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) rename tests/{unit => integration}/test_web_selenium.py (67%) diff --git a/tests/unit/test_web_selenium.py b/tests/integration/test_web_selenium.py similarity index 67% rename from tests/unit/test_web_selenium.py rename to tests/integration/test_web_selenium.py index 0415007d..2a03a3c0 100644 --- a/tests/unit/test_web_selenium.py +++ b/tests/integration/test_web_selenium.py @@ -1,7 +1,10 @@ +from pytest_mock import MockerFixture + from autogpt.commands.web_selenium import browse_website +from autogpt.config import Config -def test_browse_website(config): +def test_browse_website(config: Config, patched_api_requestor: MockerFixture): url = "https://barrel-roll.com" question = "How to execute a barrel roll" From 120fe762df1706ab2a8a16620343b589a2d4fea4 Mon Sep 17 00:00:00 2001 From: Reinier van der Leer Date: Sun, 4 Jun 2023 19:31:58 +0200 Subject: [PATCH 14/15] Update bulletin with highlights for v0.4.0 release (#4576) --- BULLETIN.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/BULLETIN.md b/BULLETIN.md index 552a6454..b52e3afb 100644 --- a/BULLETIN.md +++ b/BULLETIN.md @@ -23,12 +23,25 @@ Highlights and notable changes since v0.3.1: ## โš ๏ธ Command `send_tweet` is REMOVED Twitter functionality (and more) is now covered by plugins. -## Memory backend deprecation โš ๏ธ +## โš ๏ธ Memory backend deprecation ๐Ÿ’พ The Milvus, Pinecone and Weaviate memory backends were rendered incompatible by work on the memory system, and have been removed in `master`. The Redis memory store was also temporarily removed; we will merge a new implementation ASAP. Whether built-in support for the others will be added back in the future is subject to discussion, feel free to pitch in: https://github.com/Significant-Gravitas/Auto-GPT/discussions/4280 -## Further fixes and changes -Take a look at the Release Notes on Github! https://github.com/Significant-Gravitas/Auto-GPT/releases/tag/v0.4.0 +## Document support in `read_file` ๐Ÿ“„ +Auto-GPT can now read text from document files, with support added for PDF, DOCX, CSV, +HTML, TeX and more! + +## Managing Auto-GPT's access to commands โŒ๐Ÿ”ง +You can now disable set of built-in commands through the *DISABLED_COMMAND_CATEGORIES* +variable in .env. Specific shell commands can also be disabled using *DENY_COMMANDS*, +or selectively enabled using *ALLOW_COMMANDS*. + +## Further fixes and changes ๐Ÿ› ๏ธ +Other highlights include improvements to self-feedback mode and continuous mode, +documentation, docker and devcontainer setups, and much more. Most of the improvements +that were made are not yet visible to users, but will pay off in the long term. +Take a look at the Release Notes on Github for the full changelog! +https://github.com/Significant-Gravitas/Auto-GPT/releases From 3dbc3773086db0032472704367d19d68ee686988 Mon Sep 17 00:00:00 2001 From: Reinier van der Leer Date: Sun, 4 Jun 2023 20:05:57 +0200 Subject: [PATCH 15/15] Update version numbers for v0.4.0 release --- BULLETIN.md | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BULLETIN.md b/BULLETIN.md index b52e3afb..4c858b73 100644 --- a/BULLETIN.md +++ b/BULLETIN.md @@ -18,7 +18,7 @@ https://github.com/Significant-Gravitas/Auto-GPT/wiki/Contributing Two weeks and 76 pull requests have passed since v0.3.1, and we are happy to announce the release of v0.4.0! -Highlights and notable changes since v0.3.1: +Highlights and notable changes since v0.3.0: ## โš ๏ธ Command `send_tweet` is REMOVED Twitter functionality (and more) is now covered by plugins. diff --git a/pyproject.toml b/pyproject.toml index bf71c70c..d695ac08 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "agpt" -version = "0.3.0" +version = "0.4.0" authors = [ { name="Torantulino", email="support@agpt.co" }, ]