Add a few convenience targets to Makefile

- "test" to run pytests
- "frontend-install" to reinstall pnpm's node modeuls
This commit is contained in:
Lincoln Stein 2024-02-19 11:40:53 -05:00 committed by Brandon Rising
parent 03db2cba6c
commit 6e52d9bbce

View File

@ -10,6 +10,8 @@ help:
@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 "test" Run the unit tests.
@echo "frontend-install" Install the pnpm modules needed for the front end
@echo "frontend-build Build the frontend in order to run on localhost:9090" @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-dev Run the frontend in developer mode on localhost:5173"
@echo "installer-zip Build the installer .zip file for the current version" @echo "installer-zip Build the installer .zip file for the current version"
@ -34,6 +36,15 @@ mypy:
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:
cd invokeai/frontend/web && pnpm build cd invokeai/frontend/web && pnpm build