fcmd 0.3.7__tar.gz → 0.3.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fcmd-0.3.7 → fcmd-0.3.9}/.bumpversion.toml +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/.copier-answers.yml +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/.coveragerc +0 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/.gitattributes +5 -0
- fcmd-0.3.9/.github/dependabot.yml +34 -0
- fcmd-0.3.9/.github/workflows/ci.yml +103 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/.github/workflows/release.yml +2 -2
- fcmd-0.3.9/.gitignore +92 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/.pre-commit-config.yaml +1 -1
- fcmd-0.3.9/AGENTS.md +40 -0
- fcmd-0.3.9/Makefile +80 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/PKG-INFO +88 -36
- {fcmd-0.3.7 → fcmd-0.3.9}/README.md +63 -35
- fcmd-0.3.9/docs/AI_DRIVEN_DEV_FLOW.md +134 -0
- fcmd-0.3.9/docs/REQUIREMENT_CARD_TEMPLATE.md +39 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/pyproject.toml +29 -25
- {fcmd-0.3.7 → fcmd-0.3.9}/pyrefly.toml +1 -1
- fcmd-0.3.9/pytest.ini +8 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/ruff.toml +2 -1
- fcmd-0.3.9/src/fcmd/__init__.py +121 -0
- fcmd-0.3.9/src/fcmd/_lazyload.py +42 -0
- fcmd-0.3.9/src/fcmd/cli/__init__.py +20 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/cli/_builtins/__init__.py +9 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/cli/_builtins/completion_cmd.py +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/cli/_builtins/doctor_cmd.py +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/cli/_builtins/env_cmd.py +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/cli/_builtins/graph_cmd.py +5 -5
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/cli/_builtins/info_cmd.py +12 -12
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/cli/_builtins/profiler_cmd.py +4 -4
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/cli/_builtins/yaml_cmd.py +6 -6
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/cli/_common.py +3 -24
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/cli/_discovery.py +119 -34
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/cli/_doctor_helpers.py +4 -4
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/cli/_profiler_helpers.py +3 -3
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/cli/main.py +11 -14
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/autofmt.toml +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/calcdate.toml +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/colortool.toml +3 -4
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/dockercmd.toml +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/folderzip.toml +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/gittool.toml +4 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/hashfile.toml +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/imagetool.toml +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/img2ico.toml +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/iptool.toml +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/mathtool.toml +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/nettool.toml +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/packtool.toml +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/pdftool.toml +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/pymake.toml +1 -10
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/randtool.toml +1 -1
- fcmd-0.3.9/src/fcmd/commands/sshcopyid.toml +57 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/stattool.toml +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/timetool.toml +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/tomltool.toml +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/urlcheck.toml +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/websave.toml +1 -1
- fcmd-0.3.9/src/fcmd/console.py +164 -0
- fcmd-0.3.9/src/fcmd/core/__init__.py +118 -0
- {fcmd-0.3.7/src/fcmd/apis → fcmd-0.3.9/src/fcmd/core}/dag.py +4 -4
- {fcmd-0.3.7/src/fcmd/engine → fcmd-0.3.9/src/fcmd/core/execution}/__init__.py +11 -18
- {fcmd-0.3.7/src/fcmd/engine → fcmd-0.3.9/src/fcmd/core/execution}/dependency_runner.py +4 -4
- {fcmd-0.3.7/src/fcmd/engine → fcmd-0.3.9/src/fcmd/core/execution}/executors.py +17 -17
- {fcmd-0.3.7/src/fcmd/engine → fcmd-0.3.9/src/fcmd/core/execution}/layer_runner.py +5 -5
- {fcmd-0.3.7/src/fcmd/engine → fcmd-0.3.9/src/fcmd/core/execution}/task_command.py +3 -3
- {fcmd-0.3.7/src/fcmd/engine → fcmd-0.3.9/src/fcmd/core/execution}/task_runner.py +46 -36
- {fcmd-0.3.7/src/fcmd/models → fcmd-0.3.9/src/fcmd/core}/filefilter.py +72 -10
- {fcmd-0.3.7/src/fcmd → fcmd-0.3.9/src/fcmd/core}/models/__init__.py +6 -5
- {fcmd-0.3.7/src/fcmd → fcmd-0.3.9/src/fcmd/core}/models/command.py +18 -7
- {fcmd-0.3.7/src/fcmd → fcmd-0.3.9/src/fcmd/core}/orchestration/__init__.py +4 -4
- {fcmd-0.3.7/src/fcmd → fcmd-0.3.9/src/fcmd/core}/orchestration/conditions.py +3 -3
- {fcmd-0.3.7/src/fcmd → fcmd-0.3.9/src/fcmd/core}/orchestration/yaml_loader.py +5 -5
- {fcmd-0.3.7/src/fcmd/apis → fcmd-0.3.9/src/fcmd/core}/task.py +2 -2
- fcmd-0.3.7/src/fcmd/apis/toolkit.py → fcmd-0.3.9/src/fcmd/core/toolkit/__init__.py +10 -11
- fcmd-0.3.7/src/fcmd/apis/_tool_args.py → fcmd-0.3.9/src/fcmd/core/toolkit/args.py +23 -95
- fcmd-0.3.7/src/fcmd/apis/_tool_exec.py → fcmd-0.3.9/src/fcmd/core/toolkit/exec.py +19 -16
- {fcmd-0.3.7/src/fcmd/models → fcmd-0.3.9/src/fcmd/core}/version.py +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/__init__.py +5 -3
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/actions/__init__.py +68 -6
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/actions/archive.py +5 -3
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/actions/calc.py +9 -17
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/actions/calcdate.py +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/actions/conv.py +59 -64
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/actions/conv2.py +16 -45
- fcmd-0.3.9/src/fcmd/dsl/actions/crypto.py +201 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/actions/data.py +63 -172
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/actions/fileops.py +26 -39
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/actions/genid.py +7 -31
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/actions/hashing.py +4 -3
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/actions/media.py +14 -15
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/actions/net.py +17 -32
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/actions/system.py +54 -55
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/actions/text.py +27 -64
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/decl.py +53 -16
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/entry.py +4 -5
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/synth.py +27 -7
- fcmd-0.3.9/src/fcmd/tools/__init__.py +12 -0
- {fcmd-0.3.7/src/fcmd/cli → fcmd-0.3.9/src/fcmd/tools}/archive/__init__.py +1 -1
- {fcmd-0.3.7/src/fcmd/cli → fcmd-0.3.9/src/fcmd/tools}/archive/archivex.py +10 -30
- {fcmd-0.3.7/src/fcmd/cli → fcmd-0.3.9/src/fcmd/tools}/archive/zipencrypt.py +61 -55
- {fcmd-0.3.7/src/fcmd/cli → fcmd-0.3.9/src/fcmd/tools}/calc/__init__.py +1 -1
- {fcmd-0.3.7/src/fcmd/cli → fcmd-0.3.9/src/fcmd/tools}/calc/lscalc.py +1 -1
- {fcmd-0.3.7/src/fcmd/cli → fcmd-0.3.9/src/fcmd/tools}/dev/__init__.py +1 -1
- {fcmd-0.3.7/src/fcmd/cli → fcmd-0.3.9/src/fcmd/tools}/dev/bumpversion.py +11 -9
- {fcmd-0.3.7/src/fcmd/cli → fcmd-0.3.9/src/fcmd/tools}/dev/envdev.py +72 -27
- {fcmd-0.3.7/src/fcmd/cli → fcmd-0.3.9/src/fcmd/tools}/dev/envdev_go.py +7 -5
- {fcmd-0.3.7/src/fcmd/cli → fcmd-0.3.9/src/fcmd/tools}/dev/envdev_java.py +6 -5
- {fcmd-0.3.7/src/fcmd/cli → fcmd-0.3.9/src/fcmd/tools}/dev/envdev_node.py +2 -2
- {fcmd-0.3.7/src/fcmd/cli → fcmd-0.3.9/src/fcmd/tools}/dev/packtool.py +4 -21
- {fcmd-0.3.7/src/fcmd/cli → fcmd-0.3.9/src/fcmd/tools}/media/__init__.py +1 -1
- fcmd-0.3.9/src/fcmd/tools/media/filecheck.py +765 -0
- {fcmd-0.3.7/src/fcmd/cli → fcmd-0.3.9/src/fcmd/tools}/media/screenshot.py +1 -1
- {fcmd-0.3.7/src/fcmd/cli → fcmd-0.3.9/src/fcmd/tools}/net/__init__.py +1 -1
- {fcmd-0.3.7/src/fcmd/cli → fcmd-0.3.9/src/fcmd/tools}/net/portcheck.py +44 -124
- fcmd-0.3.9/tests/__init__.py +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/conftest.py +12 -0
- fcmd-0.3.9/tests/helpers.py +20 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli.py +197 -35
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_archivex.py +22 -22
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_asciitool.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_autofmt.py +5 -5
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_bumpversion.py +14 -14
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_calcdate.py +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_casetool.py +3 -14
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_codetool.py +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_colortool.py +73 -14
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_convtool.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_cryptool.py +75 -173
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_csvtool.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_dockercmd.py +10 -8
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_envdev.py +320 -193
- fcmd-0.3.9/tests/test_cli_filecheck.py +603 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_filedate.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_filelevel.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_filerename.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_filesearch.py +31 -14
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_folderback.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_folderzip.py +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_gittool.py +10 -10
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_hashfile.py +3 -14
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_hashtool.py +3 -15
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_idtool.py +3 -14
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_imagetool.py +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_img2ico.py +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_inifile.py +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_iptool.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_jsontool.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_lscalc.py +23 -23
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_mathtool.py +3 -14
- fcmd-0.3.9/tests/test_cli_model_info.py +28 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_nettool.py +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_packtool.py +12 -12
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_padtool.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_pathtool.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_pdftool.py +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_piptool.py +11 -11
- fcmd-0.3.9/tests/test_cli_portcheck.py +325 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_profiler.py +9 -9
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_pymake.py +8 -18
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_randtool.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_regextool.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_reseticoncache.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_screenshot.py +20 -20
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_setenv.py +2 -2
- fcmd-0.3.9/tests/test_cli_sshcopyid.py +325 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_stattool.py +2 -2
- fcmd-0.3.9/tests/test_cli_sysinfo.py +177 -0
- fcmd-0.3.9/tests/test_cli_taskkill.py +214 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_textdiff.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_timetool.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_tomltool.py +1 -27
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_txttool.py +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_urlcheck.py +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_urltool.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_websave.py +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_which.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_writefile.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_xmltool.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_cli_yamtool.py +2 -2
- fcmd-0.3.9/tests/test_cli_zipencrypt.py +340 -0
- fcmd-0.3.9/tests/test_console.py +238 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_context.py +3 -3
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_dsl.py +121 -87
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_dsl_actions.py +65 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_engine_executors.py +9 -9
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_engine_task_command.py +7 -7
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_graph.py +4 -4
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_init.py +41 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_models.py +38 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_models_pdf.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_orchestration_conditions.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_orchestration_yaml_loader.py +11 -11
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_perf_baseline.py +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_profiling.py +4 -4
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_report.py +2 -2
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_task.py +1 -1
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_toolkit.py +82 -117
- {fcmd-0.3.7 → fcmd-0.3.9}/tox.ini +1 -1
- fcmd-0.3.9/uv.lock +1165 -0
- fcmd-0.3.7/.claude/artifacts/fixes/dsl-entry-heavy-import-latency.md +0 -83
- fcmd-0.3.7/.claude/artifacts/plans/dsl-extension-cli-migration.md +0 -180
- fcmd-0.3.7/.github/workflows/ci.yml +0 -63
- fcmd-0.3.7/.gitignore +0 -35
- fcmd-0.3.7/.readthedocs.yaml +0 -23
- fcmd-0.3.7/.vscode/settings.json +0 -9
- fcmd-0.3.7/Makefile +0 -68
- fcmd-0.3.7/docs/api.rst +0 -121
- fcmd-0.3.7/docs/changelog.rst +0 -130
- fcmd-0.3.7/docs/conf.py +0 -73
- fcmd-0.3.7/docs/index.rst +0 -120
- fcmd-0.3.7/pytest.ini +0 -8
- fcmd-0.3.7/src/fcmd/__init__.py +0 -131
- fcmd-0.3.7/src/fcmd/apis/__init__.py +0 -127
- fcmd-0.3.7/src/fcmd/cli/__init__.py +0 -19
- fcmd-0.3.7/src/fcmd/commands/sshcopyid.toml +0 -44
- fcmd-0.3.7/src/fcmd/console.py +0 -686
- fcmd-0.3.7/src/fcmd/dsl/actions/crypto.py +0 -214
- fcmd-0.3.7/tests/test_cli_portcheck.py +0 -443
- fcmd-0.3.7/tests/test_cli_sshcopyid.py +0 -160
- fcmd-0.3.7/tests/test_cli_sysinfo.py +0 -88
- fcmd-0.3.7/tests/test_cli_taskkill.py +0 -133
- fcmd-0.3.7/tests/test_cli_zipencrypt.py +0 -416
- fcmd-0.3.7/tests/test_console.py +0 -785
- fcmd-0.3.7/uv.lock +0 -669
- {fcmd-0.3.7 → fcmd-0.3.9}/LICENSE +0 -0
- {fcmd-0.3.7/docs/_static → fcmd-0.3.9/docs/adr}/.gitkeep +0 -0
- /fcmd-0.3.7/src/fcmd/py.typed → /fcmd-0.3.9/docs/requirements/.gitkeep +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/__main__.py +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/_lazylog.py +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/cli/_completion_scripts.py +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/cli/_env_helpers.py +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/cli/_env_persist.py +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/asciitool.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/casetool.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/clr.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/codetool.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/convtool.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/cryptool.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/csvtool.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/filedate.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/filelevel.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/filerename.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/filesearch.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/folderback.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/hashtool.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/idtool.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/inifile.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/jsontool.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/padtool.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/pathtool.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/piptool.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/regextool.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/reseticoncache.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/setenv.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/sysinfo.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/taskkill.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/textdiff.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/txttool.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/urltool.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/which.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/writefile.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/xmltool.toml +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/commands/yamtool.toml +0 -0
- {fcmd-0.3.7/src/fcmd/apis → fcmd-0.3.9/src/fcmd/core}/context.py +0 -0
- {fcmd-0.3.7/src/fcmd/apis → fcmd-0.3.9/src/fcmd/core}/errors.py +0 -0
- {fcmd-0.3.7/src/fcmd → fcmd-0.3.9/src/fcmd/core}/models/pdf.py +0 -0
- {fcmd-0.3.7/src/fcmd/apis → fcmd-0.3.9/src/fcmd/core}/profiling.py +0 -0
- {fcmd-0.3.7/src/fcmd/apis → fcmd-0.3.9/src/fcmd/core}/report.py +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/actions/basic.py +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/actions/compute.py +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/actions/filenames.py +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/src/fcmd/dsl/loader.py +0 -0
- /fcmd-0.3.7/tests/__init__.py → /fcmd-0.3.9/src/fcmd/py.typed +0 -0
- {fcmd-0.3.7/src/fcmd/cli → fcmd-0.3.9/src/fcmd/tools}/dev/envdev_core.py +0 -0
- {fcmd-0.3.7/src/fcmd/cli → fcmd-0.3.9/src/fcmd/tools}/dev/gittool.py +0 -0
- {fcmd-0.3.7/src/fcmd/cli → fcmd-0.3.9/src/fcmd/tools}/dev/pymake.py +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_e2e_cli.py +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_e2e_tools.py +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_e2e_workflow.py +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_env_persist.py +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_fcmd.py +0 -0
- {fcmd-0.3.7 → fcmd-0.3.9}/tests/test_lazylog.py +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
[tool.bumpversion]
|
|
2
|
-
current_version = "0.3.
|
|
2
|
+
current_version = "0.3.9"
|
|
3
3
|
commit = true
|
|
4
4
|
exclude = ["template/*"]
|
|
5
|
-
message = "chore:
|
|
5
|
+
message = "chore: bump version {current_version} → {new_version}"
|
|
6
6
|
tag = true
|
|
7
7
|
tag_name = "v{new_version}"
|
|
8
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Changes here will be overwritten by Copier
|
|
2
|
-
_commit:
|
|
2
|
+
_commit: v1.0.14
|
|
3
3
|
_src_path: https://gitee.com/gooker_young/coopie.git
|
|
4
4
|
author_email: gooker_young@qq.com
|
|
5
5
|
author_name: gookeryoung
|
|
@@ -13,7 +13,7 @@ project_name: fcmd
|
|
|
13
13
|
project_type: cli
|
|
14
14
|
use_cicd: true
|
|
15
15
|
use_docker: false
|
|
16
|
-
use_docs:
|
|
16
|
+
use_docs: false
|
|
17
17
|
use_domestic_mirrors: true
|
|
18
18
|
use_tox: true
|
|
19
19
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Dependabot 自动依赖更新
|
|
2
|
+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates
|
|
3
|
+
version: 2
|
|
4
|
+
updates:
|
|
5
|
+
# pip 依赖:uv.lock 由 Dependabot 无法直接更新,改用 uv 官方建议的
|
|
6
|
+
# `pip` 生态扫描 pyproject.toml 直接依赖;lockfile 同步由本地 uv lock 完成
|
|
7
|
+
- package-ecosystem: pip
|
|
8
|
+
directory: /
|
|
9
|
+
schedule:
|
|
10
|
+
interval: weekly
|
|
11
|
+
commit-message:
|
|
12
|
+
prefix: chore
|
|
13
|
+
include: scope
|
|
14
|
+
groups:
|
|
15
|
+
dev-dependencies:
|
|
16
|
+
dependency-type: development
|
|
17
|
+
# GitHub Actions:workflow 内 action 版本对齐
|
|
18
|
+
- package-ecosystem: github-actions
|
|
19
|
+
directory: /
|
|
20
|
+
schedule:
|
|
21
|
+
interval: weekly
|
|
22
|
+
commit-message:
|
|
23
|
+
prefix: ci
|
|
24
|
+
# 前端依赖:Dependabot 的 npm 生态同时支持 pnpm-lock.yaml
|
|
25
|
+
- package-ecosystem: npm
|
|
26
|
+
directory: /frontend
|
|
27
|
+
schedule:
|
|
28
|
+
interval: weekly
|
|
29
|
+
commit-message:
|
|
30
|
+
prefix: chore
|
|
31
|
+
include: scope
|
|
32
|
+
groups:
|
|
33
|
+
frontend-dependencies:
|
|
34
|
+
patterns: ["*"]
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, develop]
|
|
6
|
+
# Skip CI for changes that cannot affect lint/test results (e.g. docs)
|
|
7
|
+
paths: &ci_paths
|
|
8
|
+
- 'src/**'
|
|
9
|
+
- 'tests/**'
|
|
10
|
+
- 'pyproject.toml'
|
|
11
|
+
- 'uv.lock'
|
|
12
|
+
- 'pyrefly.toml'
|
|
13
|
+
- 'pytest.ini'
|
|
14
|
+
- 'ruff.toml'
|
|
15
|
+
- '.coveragerc'
|
|
16
|
+
- '.pre-commit-config.yaml'
|
|
17
|
+
- 'Makefile'
|
|
18
|
+
- '.github/workflows/ci.yml'
|
|
19
|
+
pull_request:
|
|
20
|
+
branches: [main, develop]
|
|
21
|
+
paths: *ci_paths
|
|
22
|
+
# Allow manual full runs (bypasses the paths filter)
|
|
23
|
+
workflow_dispatch:
|
|
24
|
+
|
|
25
|
+
# Least privilege: CI only needs read access to the repository
|
|
26
|
+
permissions:
|
|
27
|
+
contents: read
|
|
28
|
+
|
|
29
|
+
concurrency:
|
|
30
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
31
|
+
cancel-in-progress: true
|
|
32
|
+
|
|
33
|
+
jobs:
|
|
34
|
+
lint:
|
|
35
|
+
name: Lint & Typecheck
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
timeout-minutes: 10
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v7
|
|
40
|
+
|
|
41
|
+
- name: Install uv
|
|
42
|
+
uses: astral-sh/setup-uv@v10.3.0
|
|
43
|
+
with:
|
|
44
|
+
enable-cache: true
|
|
45
|
+
cache-dependency-glob: "uv.lock"
|
|
46
|
+
|
|
47
|
+
- name: Sync dependencies
|
|
48
|
+
env:
|
|
49
|
+
UV_DEFAULT_INDEX: https://pypi.org/simple
|
|
50
|
+
run: uv sync --frozen --extra lint
|
|
51
|
+
|
|
52
|
+
- name: Cache ruff
|
|
53
|
+
uses: actions/cache@v6
|
|
54
|
+
with:
|
|
55
|
+
path: .ruff_cache
|
|
56
|
+
key: ruff-${{ runner.os }}-${{ hashFiles('pyproject.toml','ruff.toml') }}
|
|
57
|
+
|
|
58
|
+
- name: Ruff check + format
|
|
59
|
+
run: |
|
|
60
|
+
uv run ruff check --silent src tests --cache-dir .ruff_cache
|
|
61
|
+
uv run ruff format --check src tests
|
|
62
|
+
|
|
63
|
+
- name: Cache pyrefly
|
|
64
|
+
uses: actions/cache@v6
|
|
65
|
+
with:
|
|
66
|
+
path: .pyrefly_cache
|
|
67
|
+
key: pyrefly-${{ runner.os }}-${{ hashFiles('pyrefly.toml','pyproject.toml','src/**/*.py') }}
|
|
68
|
+
restore-keys: |
|
|
69
|
+
pyrefly-${{ runner.os }}-
|
|
70
|
+
|
|
71
|
+
- name: Pyrefly check (parallel)
|
|
72
|
+
run: uv run pyrefly check -j 0
|
|
73
|
+
|
|
74
|
+
test:
|
|
75
|
+
name: Test (Python 3.13 & 3.14)
|
|
76
|
+
runs-on: ubuntu-latest
|
|
77
|
+
timeout-minutes: 15
|
|
78
|
+
strategy:
|
|
79
|
+
fail-fast: false
|
|
80
|
+
matrix:
|
|
81
|
+
python-version: ["3.13", "3.14"]
|
|
82
|
+
steps:
|
|
83
|
+
- uses: actions/checkout@v7
|
|
84
|
+
|
|
85
|
+
- name: Install uv
|
|
86
|
+
uses: astral-sh/setup-uv@v10.3.0
|
|
87
|
+
with:
|
|
88
|
+
enable-cache: true
|
|
89
|
+
cache-dependency-glob: "uv.lock"
|
|
90
|
+
|
|
91
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
92
|
+
run: uv python install ${{ matrix.python-version }}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
- name: Sync dependencies
|
|
97
|
+
env:
|
|
98
|
+
UV_DEFAULT_INDEX: https://pypi.org/simple
|
|
99
|
+
run: uv sync --frozen --extra test --python ${{ matrix.python-version }}
|
|
100
|
+
|
|
101
|
+
- name: Run tests
|
|
102
|
+
|
|
103
|
+
run: uv run pytest -m "not slow" --cov=fcmd --cov-fail-under=95 --cov-report=term-missing
|
|
@@ -19,10 +19,10 @@ jobs:
|
|
|
19
19
|
environment: pypi
|
|
20
20
|
timeout-minutes: 10
|
|
21
21
|
steps:
|
|
22
|
-
- uses: actions/checkout@
|
|
22
|
+
- uses: actions/checkout@v7
|
|
23
23
|
|
|
24
24
|
- name: Install uv
|
|
25
|
-
uses: astral-sh/setup-uv@
|
|
25
|
+
uses: astral-sh/setup-uv@v10.3.0
|
|
26
26
|
with:
|
|
27
27
|
enable-cache: true
|
|
28
28
|
cache-dependency-glob: "uv.lock"
|
fcmd-0.3.9/.gitignore
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[ocd]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
|
|
9
|
+
# Virtual environments
|
|
10
|
+
.venv
|
|
11
|
+
|
|
12
|
+
# 测试与覆盖率
|
|
13
|
+
.coverage
|
|
14
|
+
.coverage.*
|
|
15
|
+
htmlcov/
|
|
16
|
+
coverage.xml
|
|
17
|
+
.tox/
|
|
18
|
+
|
|
19
|
+
# 工具缓存
|
|
20
|
+
.eslintcache/
|
|
21
|
+
.mypy_cache/
|
|
22
|
+
.pnpm-store/
|
|
23
|
+
.pytmp/
|
|
24
|
+
.pytest_cache/
|
|
25
|
+
.pyrefly_cache/
|
|
26
|
+
.ruff_cache/
|
|
27
|
+
.uv-cache/
|
|
28
|
+
.vitest-cache/
|
|
29
|
+
|
|
30
|
+
# --- Node / frontend ---
|
|
31
|
+
node_modules/
|
|
32
|
+
frontend/node_modules/
|
|
33
|
+
frontend/dist/
|
|
34
|
+
frontend/.vite/
|
|
35
|
+
frontend/coverage/
|
|
36
|
+
frontend/.eslintcache
|
|
37
|
+
frontend/package-lock.json
|
|
38
|
+
*.tsbuildinfo
|
|
39
|
+
package-lock.json
|
|
40
|
+
|
|
41
|
+
# --- E2E(Playwright)---
|
|
42
|
+
.e2e/
|
|
43
|
+
frontend/test-results/
|
|
44
|
+
frontend/playwright-report/
|
|
45
|
+
frontend/e2e-report/
|
|
46
|
+
reports/
|
|
47
|
+
|
|
48
|
+
# --- Data & artifacts(绝不提交)---
|
|
49
|
+
# 数据库为本地研究数据,体积可达数百 MB
|
|
50
|
+
data/
|
|
51
|
+
*.db
|
|
52
|
+
*.db-wal
|
|
53
|
+
*.db-shm
|
|
54
|
+
*.sqlite
|
|
55
|
+
*.parquet
|
|
56
|
+
*.joblib
|
|
57
|
+
*.pkl
|
|
58
|
+
*.log
|
|
59
|
+
logs/
|
|
60
|
+
|
|
61
|
+
# IDE
|
|
62
|
+
.idea/
|
|
63
|
+
*_profile.html
|
|
64
|
+
|
|
65
|
+
# 本地协作产物一律不入库
|
|
66
|
+
.trae/*
|
|
67
|
+
!.trae/rules/
|
|
68
|
+
!.trae/skills/
|
|
69
|
+
.claude/
|
|
70
|
+
.workbuddy/
|
|
71
|
+
|
|
72
|
+
# --- OS / editor ---
|
|
73
|
+
Thumbs.db
|
|
74
|
+
desktop.ini
|
|
75
|
+
.DS_Store
|
|
76
|
+
.idea/
|
|
77
|
+
.vscode/
|
|
78
|
+
*.bak
|
|
79
|
+
*backup-*.tar.gz
|
|
80
|
+
pytest-of-*
|
|
81
|
+
|
|
82
|
+
# --- 本地环境与凭证 ---
|
|
83
|
+
.env
|
|
84
|
+
.env.local
|
|
85
|
+
.env.*
|
|
86
|
+
# 示例配置必须入库(.env.* 会误伤它)
|
|
87
|
+
!.env.example
|
|
88
|
+
!deploy/.env.prod.example
|
|
89
|
+
|
|
90
|
+
# Sphinx 文档构建输出
|
|
91
|
+
docs/_build/
|
|
92
|
+
.preview
|
fcmd-0.3.9/AGENTS.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# 开发工作流
|
|
2
|
+
|
|
3
|
+
## 门禁分级(先定性,再选门禁)
|
|
4
|
+
|
|
5
|
+
提交前用 `git diff --name-only` + `git status --short` 判定改动类型,**按最高级别执行**;拿不准按 L2 处理(fail-safe)。
|
|
6
|
+
|
|
7
|
+
| 级别 | 判定范围(只看文件路径) | 必跑 | 跳过 |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| **L0 文档** | 仅 `*.md`(`docs/`、`CONTEXT.md`、`CHANGELOG.md`、`AGENTS.md`、`.trae/rules/`、`README.md` 等) | `make check-docs`(`gitkeep-check` + `adr-check`) | 所有测试与前端门禁 |
|
|
10
|
+
| **L1 配置** | 仅 `Makefile`、`pyproject.toml`、`ruff.toml`、`pyrefly.toml`、`pytest.ini`、`uv.lock`、`frontend/package.json`、`frontend/tsconfig*.json`、`frontend/eslint*`、`docker-compose*.yml`、`deploy/`、`scripts/`、`.github/`、`.codeup/` | `make check-fast`;**触及测试发现 / 依赖 / 打包 / CI 行为**(`pyproject.toml`、`pytest.ini`、lock 文件、workflow、`scripts/` 里的门禁脚本)时加跑 `make test` | `cov` / `frontend-coverage` / `e2e`(除非本次显式改覆盖率或 e2e 口径) |
|
|
11
|
+
| **L2 代码** | 命中 `src/`、`tests/`、`frontend/src`、`frontend/tests`、`migrations/` 等 | `make flow`(`check-fast` → `test`);阶段收尾 / 发版 / 改覆盖率口径时 `make check` | — |
|
|
12
|
+
|
|
13
|
+
- 只改文档或项目配置时不跑 `make flow`:`test` / `cov` / `e2e` 对 Markdown 与 Makefile 目标增删没有判别力,跑了只是等时间。
|
|
14
|
+
- 但**不能因为「主要改了文档」而降级**:同一次提交里既有代码又有文档 / 配置,按 L2 走全链。
|
|
15
|
+
- 分级只约束本地内环与提交前自查;CI 仍跑全量门禁,不因分级放宽。
|
|
16
|
+
- 禁止 `--no-verify`、禁止跳过 pre-commit(prek);prek 对 L0 / L1 同样会触发,属预期。
|
|
17
|
+
- commit message 用 conventional commits:L0 用 `docs:`,L1 用 `chore:` / `ci:` / `build:`,L2 按改动性质(`feat:` / `fix:` / `refactor:` / `test:`)。
|
|
18
|
+
|
|
19
|
+
## 代码改动(L2)执行链
|
|
20
|
+
|
|
21
|
+
- 每次改完代码必须依次执行:`make check-fast` → `make test` → 项目文档更新 → `make push`
|
|
22
|
+
- 任一步失败就修,修完重跑,全过才算完成
|
|
23
|
+
|
|
24
|
+
## 开工前(换会话 / 换 agent 必读)
|
|
25
|
+
|
|
26
|
+
1. 先读 [docs/AI_DRIVEN_DEV_FLOW.md](docs/AI_DRIVEN_DEV_FLOW.md) 与 [.trae/rules/](.trae/rules/) 下的规则;工具不自动加载时也必须手动读。
|
|
27
|
+
2. 找当前任务的 ADR:看 [docs/adr/README.md](docs/adr/README.md) 的「落地阶段」,再读 ADR 的「落地状态」与「交接」。
|
|
28
|
+
3. 跑一次基线:代码任务 `make check-fast`,纯文档 / 配置任务 `make check-docs`;不要假设上一轮全绿。
|
|
29
|
+
|
|
30
|
+
## 收工前
|
|
31
|
+
|
|
32
|
+
1. 回填 ADR 的「落地状态」与「交接」(做到哪期 / 下一步 / 已知坑)。
|
|
33
|
+
2. 更新 CHANGELOG(条目带 `(ADR NNNN Pn)`)与相关文档。
|
|
34
|
+
3. 按「门禁分级」跑到对应级别全绿再提交(L0 / L1 不跑 `make flow`;L2 至少 `make flow`);推送按 [.trae/rules/dev-workflow.md](.trae/rules/dev-workflow.md) 执行。
|
|
35
|
+
|
|
36
|
+
## 需求移除 / 变更
|
|
37
|
+
|
|
38
|
+
1. 先清理 ADR,再改代码:删去失效的口径行 / 现状条目 / 决策行 / 测试与分期,不留「历史方案」段落,保持 ADR 与当前项目一致。
|
|
39
|
+
2. ADR 被新方案替代或需求作废:**直接删除**该 ADR 文件、README 索引行及代码 / 文档中的引用,不在仓库保留 `Superseded` / `Deprecated` 文档;编号不复用,追溯看 git 历史(`git log -- docs/adr/`)。
|
|
40
|
+
3. 细则见 [.trae/rules/design.md](.trae/rules/design.md);`make adr-check` 会拦截残留的失效状态文档,并校验索引 Status 一致。
|
fcmd-0.3.9/Makefile
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Makefile - fcmd project shortcuts
|
|
2
|
+
# Run `make help` to list all available commands
|
|
3
|
+
|
|
4
|
+
PACKAGE := fcmd
|
|
5
|
+
COV_THRESHOLD := 95
|
|
6
|
+
PYTEST_JOBS := 8 # pytest-xdist worker count; 8 by default on Windows to avoid handle exhaustion
|
|
7
|
+
|
|
8
|
+
# Override with: make push REMOTES="origin codeup"
|
|
9
|
+
REMOTES = $(shell git remote)
|
|
10
|
+
|
|
11
|
+
.PHONY: help sync build b clean c test cov lint typecheck typecheck-ci check check-docs check-fast flow gitkeep-check adr-check prek tox pub bump patch minor major push
|
|
12
|
+
|
|
13
|
+
help: ## Show this help
|
|
14
|
+
@uv run python -c "import re,sys;ms=[(m.group(1),m.group(2).strip()) for f in sys.argv[1:] for l in open(f,encoding='utf-8') if (m:=re.match(r'^([a-zA-Z][\w -]*):.*?##\s*(.*)',l))];[print(f' {n:<14} {d}') for n,d in ms]" $(MAKEFILE_LIST)
|
|
15
|
+
|
|
16
|
+
sync: ## Install development dependencies
|
|
17
|
+
uv sync --extra dev
|
|
18
|
+
|
|
19
|
+
build b: ## Build distribution packages (wheel + sdist)
|
|
20
|
+
uv build
|
|
21
|
+
|
|
22
|
+
clean c: ## Remove build artifacts and caches
|
|
23
|
+
rm -rf build/ dist/ wheels/ *.egg-info htmlcov/ .coverage .coverage.* coverage.xml .pytest_cache/ .tox/
|
|
24
|
+
rm -rf .ruff_cache/ .pyrefly_cache/ .mypy_cache/
|
|
25
|
+
find src tests -type d -name __pycache__ -exec rm -rf {} +
|
|
26
|
+
find src tests -type f -name "*.py[oc]" -delete
|
|
27
|
+
|
|
28
|
+
test: ## Run tests (no coverage)
|
|
29
|
+
uv run pytest -m "not slow" -n $(PYTEST_JOBS)
|
|
30
|
+
|
|
31
|
+
cov: ## Run tests and generate an HTML coverage report
|
|
32
|
+
uv run pytest --cov --cov-report=term --cov-fail-under=$(COV_THRESHOLD) --cov-report=html -n $(PYTEST_JOBS)
|
|
33
|
+
@uv run python -c "print('Coverage report: htmlcov/index.html')"
|
|
34
|
+
|
|
35
|
+
lint: ## Lint code style (ruff)
|
|
36
|
+
uv run ruff check .
|
|
37
|
+
uv run ruff format --check .
|
|
38
|
+
|
|
39
|
+
typecheck: ## Type check (pyrefly)
|
|
40
|
+
uv run pyrefly check
|
|
41
|
+
|
|
42
|
+
typecheck-ci: ## Type check (pyrefly, CI platform linux - catch cross-platform issues)
|
|
43
|
+
uv run pyrefly check --python-platform linux
|
|
44
|
+
|
|
45
|
+
gitkeep-check: ## 校验占位目录未被清空(空目录须有 .gitkeep)
|
|
46
|
+
@uv run python -c "import pathlib,sys;ds=[p for p in map(pathlib.Path,['docs/adr','docs/requirements','docs/_static']) if p.is_dir()];bad=[str(p) for p in ds if not any(p.iterdir())];[print('gitkeep-check: 空目录缺少 .gitkeep -> '+b) for b in bad];print('gitkeep-check: 通过') if not bad else None;sys.exit(1 if bad else 0)"
|
|
47
|
+
|
|
48
|
+
adr-check: ## 校验 ADR 编号/命名与索引登记
|
|
49
|
+
@uv run python -c "import pathlib,re,sys;d=pathlib.Path('docs/adr');fs=[p for p in sorted(d.glob('*.md')) if p.name!='README.md'] if d.is_dir() else [];ns=[p.name for p in fs];idx=(d/'README.md').read_text(encoding='utf-8') if (d/'README.md').is_file() else '';dups=sorted({n[:4] for n in ns if sum(m[:4]==n[:4] for m in ns)>1});bad=[f'{n}: 文件名应为 NNNN-<topic>.md' for n in ns if not re.fullmatch(r'\d{4}-[\w-]+\.md',n)]+[f'编号 {x} 重复' for x in dups]+(['docs/adr/README.md 缺失'] if fs and not (d/'README.md').is_file() else [])+[f'{n}: 未登记到 docs/adr/README.md 索引' for n in ns if n not in idx];[print('adr-check: '+b) for b in bad];print(f'adr-check: 通过 ({len(fs)} ADR)') if not bad else None;sys.exit(1 if bad else 0)"
|
|
50
|
+
|
|
51
|
+
check-docs: gitkeep-check adr-check ## L0 文档门禁(gitkeep-check + adr-check)
|
|
52
|
+
check-fast: gitkeep-check adr-check lint typecheck ## L1 配置/内环门禁(gitkeep + adr + lint + typecheck)
|
|
53
|
+
flow: check-fast test ## L2 代码门禁(check-fast + test)
|
|
54
|
+
|
|
55
|
+
check: check-fast typecheck-ci cov ## 全量门禁(check-fast + typecheck-ci + cov)
|
|
56
|
+
|
|
57
|
+
prek: ## Run pre-commit hooks on all files (prek)
|
|
58
|
+
uv run prek run -a
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
tox: ## Run multi-version tests (tox)
|
|
62
|
+
uvx tox -p auto
|
|
63
|
+
|
|
64
|
+
BUMP_PART := $(filter-out bump,$(MAKECMDGOALS))
|
|
65
|
+
|
|
66
|
+
bump: ## Bump version (default patch, usage: make bump [minor|major])
|
|
67
|
+
@uvx bump-my-version bump $(if $(BUMP_PART),$(firstword $(BUMP_PART)),patch) --tag
|
|
68
|
+
uv sync --extra dev
|
|
69
|
+
git add uv.lock
|
|
70
|
+
-git diff --cached --quiet || git commit -m "chore: sync uv.lock after version bump"
|
|
71
|
+
|
|
72
|
+
patch minor major:
|
|
73
|
+
@:
|
|
74
|
+
|
|
75
|
+
pub: ## Upload to PyPI
|
|
76
|
+
uvx twine upload dist/*.whl dist/*.tar.gz
|
|
77
|
+
|
|
78
|
+
push: ## Push code to all remotes (continues on failure, non-zero exit if any failed)
|
|
79
|
+
@uv run python -c "import subprocess as sp,sys; remotes='$(REMOTES)'.split(); failed=[]; [failed.append(r) for r in remotes if print(f'Pushing {r}...',flush=True) or sp.run(['git','push',r]).returncode or sp.run(['git','push',r,'--tags']).returncode]; print('Failed remotes: '+', '.join(failed) if failed else 'All remotes pushed.'); sys.exit(1 if failed else 0)"
|
|
80
|
+
|