代码拉取完成,页面将自动刷新
.DEFAULT_GOAL:=all
path = src/python-fastui
.PHONY: install
install:
pip install -U pip pre-commit pip-tools
pip install -r $(path)/requirements/all.txt
pip install -e $(path)
pre-commit install
.PHONY: install-docs
install-docs:
pip install -r requirements/docs.txt
# note -- mkdocstrings-typescript and griffe-typedoc are not yet publicly available
# but the following can be added above the pip install -r requirements/docs.txt line in the future
# pip install mkdocstrings-python mkdocstrings-typescript griffe-typedoc
.PHONY: update-lockfiles
update-lockfiles:
@echo "Updating requirements files using pip-compile"
pip-compile -q --strip-extras -o $(path)/requirements/lint.txt $(path)/requirements/lint.in
pip-compile -q --strip-extras -o $(path)/requirements/pyproject.txt -c $(path)/requirements/lint.txt $(path)/pyproject.toml --extra=fastapi
pip-compile -q --strip-extras -o $(path)/requirements/test.txt -c $(path)/requirements/lint.txt -c $(path)/requirements/pyproject.txt $(path)/requirements/test.in
pip install --dry-run -r $(path)/requirements/all.txt
.PHONY: format
format:
ruff check --fix-only $(path) demo
ruff format $(path) demo
.PHONY: lint
lint:
ruff check $(path) demo
ruff format --check $(path) demo
.PHONY: typecheck
typecheck:
pyright
.PHONY: test
test:
coverage run -m pytest
.PHONY: testcov
testcov: test
coverage html
.PHONY: typescript-models
typescript-models:
fastui generate fastui:FastUI src/npm-fastui/src/models.d.ts
.PHONY: dev
dev:
uvicorn demo:app --reload --reload-dir .
.PHONY: docs
docs:
mkdocs build
.PHONY: serve
serve:
mkdocs serve
.PHONY: all
all: testcov lint
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。