mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Add a few convenience targets to Makefile
- "test" to run pytests - "frontend-install" to reinstall pnpm's node modeuls
This commit is contained in:
parent
03db2cba6c
commit
6e52d9bbce
39
Makefile
39
Makefile
@ -6,33 +6,44 @@ default: help
|
|||||||
help:
|
help:
|
||||||
@echo Developer commands:
|
@echo Developer commands:
|
||||||
@echo
|
@echo
|
||||||
@echo "ruff Run ruff, fixing any safely-fixable errors and formatting"
|
@echo "ruff Run ruff, fixing any safely-fixable errors and formatting"
|
||||||
@echo "ruff-unsafe Run ruff, fixing all fixable errors and formatting"
|
@echo "ruff-unsafe Run ruff, fixing all fixable errors and formatting"
|
||||||
@echo "mypy Run mypy using the config in pyproject.toml to identify type mismatches and other coding errors"
|
@echo "mypy Run mypy using the config in pyproject.toml to identify type mismatches and other coding errors"
|
||||||
@echo "mypy-all Run mypy ignoring the config in pyproject.tom but still ignoring missing imports"
|
@echo "mypy-all Run mypy ignoring the config in pyproject.tom but still ignoring missing imports"
|
||||||
@echo "frontend-build Build the frontend in order to run on localhost:9090"
|
@echo "test" Run the unit tests.
|
||||||
@echo "frontend-dev Run the frontend in developer mode on localhost:5173"
|
@echo "frontend-install" Install the pnpm modules needed for the front end
|
||||||
@echo "installer-zip Build the installer .zip file for the current version"
|
@echo "frontend-build Build the frontend in order to run on localhost:9090"
|
||||||
@echo "tag-release Tag the GitHub repository with the current version (use at release time only!)"
|
@echo "frontend-dev Run the frontend in developer mode on localhost:5173"
|
||||||
|
@echo "installer-zip Build the installer .zip file for the current version"
|
||||||
|
@echo "tag-release Tag the GitHub repository with the current version (use at release time only!)"
|
||||||
|
|
||||||
# Runs ruff, fixing any safely-fixable errors and formatting
|
# Runs ruff, fixing any safely-fixable errors and formatting
|
||||||
ruff:
|
ruff:
|
||||||
ruff check . --fix
|
ruff check . --fix
|
||||||
ruff format .
|
ruff format .
|
||||||
|
|
||||||
# Runs ruff, fixing all errors it can fix and formatting
|
# Runs ruff, fixing all errors it can fix and formatting
|
||||||
ruff-unsafe:
|
ruff-unsafe:
|
||||||
ruff check . --fix --unsafe-fixes
|
ruff check . --fix --unsafe-fixes
|
||||||
ruff format .
|
ruff format .
|
||||||
|
|
||||||
# Runs mypy, using the config in pyproject.toml
|
# Runs mypy, using the config in pyproject.toml
|
||||||
mypy:
|
mypy:
|
||||||
mypy scripts/invokeai-web.py
|
mypy scripts/invokeai-web.py
|
||||||
|
|
||||||
# Runs mypy, ignoring the config in pyproject.toml but still ignoring missing (untyped) imports
|
# Runs mypy, ignoring the config in pyproject.toml but still ignoring missing (untyped) imports
|
||||||
# (many files are ignored by the config, so this is useful for checking all files)
|
# (many files are ignored by the config, so this is useful for checking all files)
|
||||||
mypy-all:
|
mypy-all:
|
||||||
mypy scripts/invokeai-web.py --config-file= --ignore-missing-imports
|
mypy scripts/invokeai-web.py --config-file= --ignore-missing-imports
|
||||||
|
|
||||||
|
# Run the unit tests
|
||||||
|
test:
|
||||||
|
pytest ./tests
|
||||||
|
|
||||||
|
# Install the pnpm modules needed for the front end
|
||||||
|
frontend-install:
|
||||||
|
rm -rf invokeai/frontend/web/node_modules
|
||||||
|
cd invokeai/frontend/web && pnpm install
|
||||||
|
|
||||||
# Build the frontend
|
# Build the frontend
|
||||||
frontend-build:
|
frontend-build:
|
||||||
|
Loading…
Reference in New Issue
Block a user