feat(cli): add pymake project build tool support
add pymake command alias to CLI, create pymake config yaml and move its legacy tool config out of _LEGACY_TOOLS dict
This commit is contained in:
@@ -59,6 +59,7 @@ class PfApp:
|
||||
"pdftool": "pdftool",
|
||||
"pt": "pdftool",
|
||||
"pip": "piptool",
|
||||
"pymake": "pymake",
|
||||
"piptool": "piptool",
|
||||
"pp": "piptool",
|
||||
"screenshot": "screenshot",
|
||||
@@ -72,7 +73,6 @@ class PfApp:
|
||||
|
||||
# 传统工具: 有自己的 main() 函数 (尚未完全 YAML 化)
|
||||
_LEGACY_TOOLS: dict[str, str] = {
|
||||
"pymake": "pyflowx.cli.pymake:main",
|
||||
"emlman": "pyflowx.cli.emlmanager:main",
|
||||
"profiler": "pyflowx.cli.profiler:main",
|
||||
"pxp": "pyflowx.cli.profiler:main",
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
# pymake - 项目构建工具
|
||||
# 用法
|
||||
# pf pymake <command>
|
||||
# 命令
|
||||
# b: 构建项目
|
||||
# c: 清理项目
|
||||
strategy: thread
|
||||
variables:
|
||||
CWD: "."
|
||||
cli:
|
||||
description: "PyMake - 项目构建工具"
|
||||
usage: "pf pymake <command>"
|
||||
options:
|
||||
- name: CWD
|
||||
flag: "--cwd"
|
||||
type: str
|
||||
required: false
|
||||
default: "."
|
||||
help: "工作目录 (默认: 当前目录)"
|
||||
subcommands:
|
||||
b:
|
||||
help: "构建项目"
|
||||
c:
|
||||
help: "清理项目"
|
||||
cov:
|
||||
help: "代码覆盖率"
|
||||
p:
|
||||
help: "发布项目"
|
||||
sync:
|
||||
help: "同步项目"
|
||||
t:
|
||||
help: "测试项目"
|
||||
tc:
|
||||
help: "类型检查"
|
||||
tf:
|
||||
help: "测试项目 - 快速"
|
||||
jobs:
|
||||
b:
|
||||
cmd: ["uv", "build", "${CWD}"]
|
||||
bump:
|
||||
cmd: ["bumpversion", "patch"]
|
||||
c:
|
||||
cmd: ["pf", "gitt", "c", "${CWD}"]
|
||||
cov:
|
||||
cmd: ["pytest", "--cov", "${CWD}", "-n", "8", "--dist", "loadfile", "--tb=short", "-v", "--color=yes", "--durations=10"]
|
||||
p:
|
||||
cmd: ["uv", "publish", "${CWD}"]
|
||||
sync:
|
||||
cmd: ["pf", "gitt", "sync", "${CWD}"]
|
||||
t:
|
||||
cmd: ["pytest", "${CWD}", "-m", "not slow", "-n", "8", "--dist", "loadfile", "--color=yes", "--durations=10"]
|
||||
tc:
|
||||
cmd: ["uv", "typecheck", "${CWD}"]
|
||||
tf:
|
||||
cmd: ["pytest", "${CWD}", "-m", "not slow", "--dist", "loadfile", "--color=yes", "--durations=10"]
|
||||
|
||||
Reference in New Issue
Block a user