Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ mkdocs serve # Alternative command
### Python (Backend)

**Style Guidelines:**
- Use **Ruff** for linting and formatting (replaces Black, isort, flake8)
- Use **uv tool run ruff@0.11.2 check** for linting and formatting (replaces Black, isort, flake8)
- Line length: 120 characters
- Type hints are required (mypy strict mode with Pydantic plugin)
- Use absolute imports (no relative imports allowed)
Expand Down Expand Up @@ -153,6 +153,7 @@ class MyInvocation(BaseInvocation):
- Use functional components with hooks
- Use Redux Toolkit for state management
- Colocate tests with source files using `.test.ts` suffix
- If pydantic schema has changed run `cd invokeai/frontend/web && python ../../../scripts/generate_openapi_schema.py | pnpm typegen`

**Key Conventions:**
- Tests should use Vitest
Expand Down
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ help:
@echo "frontend-build Build the frontend in order to run on localhost:9090"
@echo "frontend-dev Run the frontend in developer mode on localhost:5173"
@echo "frontend-typegen Generate types for the frontend from the OpenAPI schema"
@echo "wheel Build the wheel for the current version"
@echo "frontend-prettier Format the frontend using lint:prettier"
@echo "wheel Build the wheel for the current version"
@echo "tag-release Tag the GitHub repository with the current version (use at release time only!)"
@echo "openapi Generate the OpenAPI schema for the app, outputting to stdout"
@echo "docs Serve the mkdocs site with live reload"

# Runs ruff, fixing any safely-fixable errors and formatting
ruff:
ruff check . --fix
ruff format .
cd invokeai && uv tool run ruff@0.11.2 format .

# Runs ruff, fixing all errors it can fix and formatting
ruff-unsafe:
Expand Down Expand Up @@ -64,6 +64,9 @@ frontend-dev:
frontend-typegen:
cd invokeai/frontend/web && python ../../../scripts/generate_openapi_schema.py | pnpm typegen

frontend-prettier:
cd invokeai/frontend/web/src && pnpm lint:prettier --write

# Tag the release
wheel:
cd scripts && ./build_wheel.sh
Expand All @@ -79,4 +82,4 @@ openapi:
# Serve the mkdocs site w/ live reload
.PHONY: docs
docs:
mkdocs serve
mkdocs serve
Loading