mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-09 23:28:07 -05:00
Prisma's generated `types.py` file is 57,000+ lines with complex recursive TypedDict definitions that exhaust Pyright's type inference budget. This causes random type errors and makes the type checker unreliable. ### Changes 🏗️ - Add `gen_prisma_types_stub.py` script that generates a lightweight `.pyi` stub file - The stub preserves safe types (Literal, TypeVar) while collapsing complex TypedDicts to `dict[str, Any]` - Integrate stub generation into all workflows that run `prisma generate`: - `platform-backend-ci.yml` - `claude.yml` - `claude-dependabot.yml` - `copilot-setup-steps.yml` - `docker-compose.platform.yml` - `Dockerfile` - `Makefile` (migrate & reset-db targets) - `linter.py` (lint & format commands) - Add `gen-prisma-stub` poetry script entry - Fix two pre-existing type errors that were previously masked: - `store/db.py`: Replace private type `_StoreListingVersion_version_OrderByInput` with dict literal - `airtable/_webhook.py`: Add cast for `Serializable` type ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Run `poetry run format` - passes with 0 errors (down from 57+) - [x] Run `poetry run lint` - passes with 0 errors - [x] Run `poetry run gen-prisma-stub` - generates stub successfully - [x] Verify stub file is created at correct location with proper content #### For configuration changes: - [x] `.env.default` is updated or already compatible with my changes - [x] `docker-compose.yml` is updated or already compatible with my changes - [x] I have included a list of my configuration changes in the PR description (under **Changes**) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Added a lightweight Prisma type-stub generator and integrated it into build, lint, CI/CD, and container workflows. * Build, migration, formatting, and lint steps now generate these stubs to improve type-checking performance and reduce overhead during builds and deployments. * Exposed a project command to run stub generation manually. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
67 lines
1.8 KiB
Plaintext
67 lines
1.8 KiB
Plaintext
# Ignore everything by default, selectively add things to context
|
|
*
|
|
|
|
# Platform - Libs
|
|
!autogpt_platform/autogpt_libs/autogpt_libs/
|
|
!autogpt_platform/autogpt_libs/pyproject.toml
|
|
!autogpt_platform/autogpt_libs/poetry.lock
|
|
!autogpt_platform/autogpt_libs/README.md
|
|
|
|
# Platform - Backend
|
|
!autogpt_platform/backend/backend/
|
|
!autogpt_platform/backend/test/e2e_test_data.py
|
|
!autogpt_platform/backend/migrations/
|
|
!autogpt_platform/backend/schema.prisma
|
|
!autogpt_platform/backend/pyproject.toml
|
|
!autogpt_platform/backend/poetry.lock
|
|
!autogpt_platform/backend/README.md
|
|
!autogpt_platform/backend/.env
|
|
!autogpt_platform/backend/gen_prisma_types_stub.py
|
|
|
|
# Platform - Market
|
|
!autogpt_platform/market/market/
|
|
!autogpt_platform/market/scripts.py
|
|
!autogpt_platform/market/schema.prisma
|
|
!autogpt_platform/market/pyproject.toml
|
|
!autogpt_platform/market/poetry.lock
|
|
!autogpt_platform/market/README.md
|
|
|
|
# Platform - Frontend
|
|
!autogpt_platform/frontend/src/
|
|
!autogpt_platform/frontend/public/
|
|
!autogpt_platform/frontend/scripts/
|
|
!autogpt_platform/frontend/package.json
|
|
!autogpt_platform/frontend/pnpm-lock.yaml
|
|
!autogpt_platform/frontend/tsconfig.json
|
|
!autogpt_platform/frontend/README.md
|
|
## config
|
|
!autogpt_platform/frontend/*.config.*
|
|
!autogpt_platform/frontend/.env.*
|
|
!autogpt_platform/frontend/.env
|
|
|
|
# Classic - AutoGPT
|
|
!classic/original_autogpt/autogpt/
|
|
!classic/original_autogpt/pyproject.toml
|
|
!classic/original_autogpt/poetry.lock
|
|
!classic/original_autogpt/README.md
|
|
!classic/original_autogpt/tests/
|
|
|
|
# Classic - Benchmark
|
|
!classic/benchmark/agbenchmark/
|
|
!classic/benchmark/pyproject.toml
|
|
!classic/benchmark/poetry.lock
|
|
!classic/benchmark/README.md
|
|
|
|
# Classic - Forge
|
|
!classic/forge/
|
|
!classic/forge/pyproject.toml
|
|
!classic/forge/poetry.lock
|
|
!classic/forge/README.md
|
|
|
|
# Classic - Frontend
|
|
!classic/frontend/build/web/
|
|
|
|
# Explicitly re-ignore some folders
|
|
.*
|
|
**/__pycache__
|