Skip to content

Commit

Permalink
ci(backend): Fix Poetry v2.0.0 compatibility (#9197)
Browse files Browse the repository at this point in the history
- Resolves #9196

Make all changes necessary to make everything work with Poetry v2.0.0.

## Changes
- Removed `--no-update` flag from `poetry lock` command in codebase
- Removed extra path arguments from `poetry -C [path] run [command]`
occurrences
- Regenerated all lock files in hierarchical order

### Relevant (breaking) changes in v2.0.0
- `--no-update` flag no longer exists for `poetry lock` as it has become
default behavior
- The `-C` option now actually changes the directory, so any path
arguments in `poetry run` commands can/must be removed
- Poetry v2.0.0 uses the new v2.1 lock file spec, so all lock files have
to be regenerated to avoid false-positive lock file updates and checks
on future PRs

Full release notes and change log:
https://python-poetry.org/blog/announcing-poetry-2.0.0
  • Loading branch information
Pwuts authored Jan 6, 2025
1 parent 0872da1 commit 1106d9a
Show file tree
Hide file tree
Showing 8 changed files with 3,081 additions and 123 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/platform-backend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
- name: Check poetry.lock
run: |
poetry lock --no-update
poetry lock
if ! git diff --quiet poetry.lock; then
echo "Error: poetry.lock not up to date."
Expand Down
5 changes: 0 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ repos:
name: Typecheck - AutoGPT Platform - Backend
alias: pyright-platform-backend
entry: poetry -C autogpt_platform/backend run pyright
args: [-p, autogpt_platform/backend, autogpt_platform/backend]
# include forge source (since it's a path dependency) but exclude *_test.py files:
files: ^autogpt_platform/(backend/((backend|test)/|(\w+\.py|poetry\.lock)$)|autogpt_libs/(autogpt_libs/.*(?<!_test)\.py|poetry\.lock)$)
types: [file]
Expand All @@ -189,7 +188,6 @@ repos:
name: Typecheck - AutoGPT Platform - Libs
alias: pyright-platform-libs
entry: poetry -C autogpt_platform/autogpt_libs run pyright
args: [-p, autogpt_platform/autogpt_libs, autogpt_platform/autogpt_libs]
files: ^autogpt_platform/autogpt_libs/(autogpt_libs/|poetry\.lock$)
types: [file]
language: system
Expand All @@ -199,7 +197,6 @@ repos:
name: Typecheck - Classic - AutoGPT
alias: pyright-classic-autogpt
entry: poetry -C classic/original_autogpt run pyright
args: [-p, classic/original_autogpt, classic/original_autogpt]
# include forge source (since it's a path dependency) but exclude *_test.py files:
files: ^(classic/original_autogpt/((autogpt|scripts|tests)/|poetry\.lock$)|classic/forge/(forge/.*(?<!_test)\.py|poetry\.lock)$)
types: [file]
Expand All @@ -210,7 +207,6 @@ repos:
name: Typecheck - Classic - Forge
alias: pyright-classic-forge
entry: poetry -C classic/forge run pyright
args: [-p, classic/forge, classic/forge]
files: ^classic/forge/(forge/|poetry\.lock$)
types: [file]
language: system
Expand All @@ -220,7 +216,6 @@ repos:
name: Typecheck - Classic - Benchmark
alias: pyright-classic-benchmark
entry: poetry -C classic/benchmark run pyright
args: [-p, classic/benchmark, classic/benchmark]
files: ^classic/benchmark/(agbenchmark/|tests/|poetry\.lock$)
types: [file]
language: system
Expand Down
80 changes: 78 additions & 2 deletions autogpt_platform/autogpt_libs/poetry.lock

Large diffs are not rendered by default.

176 changes: 174 additions & 2 deletions autogpt_platform/backend/poetry.lock

Large diffs are not rendered by default.

1,687 changes: 1,580 additions & 107 deletions autogpt_platform/market/poetry.lock

Large diffs are not rendered by default.

246 changes: 244 additions & 2 deletions classic/benchmark/poetry.lock

Large diffs are not rendered by default.

502 changes: 500 additions & 2 deletions classic/forge/poetry.lock

Large diffs are not rendered by default.

506 changes: 504 additions & 2 deletions classic/original_autogpt/poetry.lock

Large diffs are not rendered by default.

0 comments on commit 1106d9a

Please sign in to comment.