py-wlcli 0.6.13__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.
- py_wlcli-0.6.13/LICENSE +21 -0
- py_wlcli-0.6.13/PKG-INFO +126 -0
- py_wlcli-0.6.13/README.md +93 -0
- py_wlcli-0.6.13/pyproject.toml +137 -0
- py_wlcli-0.6.13/rust/Cargo.lock +165 -0
- py_wlcli-0.6.13/rust/Cargo.toml +18 -0
- py_wlcli-0.6.13/rust/LICENSE +21 -0
- py_wlcli-0.6.13/rust/build.rs +29 -0
- py_wlcli-0.6.13/rust/rust-analyzer.json +20 -0
- py_wlcli-0.6.13/rust/src/lib.rs +13 -0
- py_wlcli-0.6.13/rust/src/main.rs +3 -0
- py_wlcli-0.6.13/src/wl_cli/__init__.py +27 -0
- py_wlcli-0.6.13/src/wl_cli/__main__.py +117 -0
- py_wlcli-0.6.13/src/wl_cli/cli_click.py +107 -0
- py_wlcli-0.6.13/src/wl_cli/commands/__init__.py +84 -0
- py_wlcli-0.6.13/src/wl_cli/commands/base.py +80 -0
- py_wlcli-0.6.13/src/wl_cli/commands/buildcommands/__init__.py +4 -0
- py_wlcli-0.6.13/src/wl_cli/commands/buildcommands/build.py +71 -0
- py_wlcli-0.6.13/src/wl_cli/commands/buildcommands/build_utils.py +71 -0
- py_wlcli-0.6.13/src/wl_cli/commands/buildcommands/builders/__init__.py +18 -0
- py_wlcli-0.6.13/src/wl_cli/commands/buildcommands/builders/cleanup.py +35 -0
- py_wlcli-0.6.13/src/wl_cli/commands/buildcommands/builders/coordinator.py +135 -0
- py_wlcli-0.6.13/src/wl_cli/commands/buildcommands/builders/environment.py +81 -0
- py_wlcli-0.6.13/src/wl_cli/commands/buildcommands/builders/rust_builder.py +37 -0
- py_wlcli-0.6.13/src/wl_cli/commands/buildcommands/builders/stubs.py +58 -0
- py_wlcli-0.6.13/src/wl_cli/commands/buildcommands/dist.py +291 -0
- py_wlcli-0.6.13/src/wl_cli/commands/buildcommands/test.py +89 -0
- py_wlcli-0.6.13/src/wl_cli/commands/clean/__init__.py +6 -0
- py_wlcli-0.6.13/src/wl_cli/commands/clean/build.py +148 -0
- py_wlcli-0.6.13/src/wl_cli/commands/clean/clean.py +285 -0
- py_wlcli-0.6.13/src/wl_cli/commands/clean/clean_utils.py +66 -0
- py_wlcli-0.6.13/src/wl_cli/commands/clean/core.py +230 -0
- py_wlcli-0.6.13/src/wl_cli/commands/clean/dead_code/__init__.py +0 -0
- py_wlcli-0.6.13/src/wl_cli/commands/clean/dead_code/dead_code_command.py +79 -0
- py_wlcli-0.6.13/src/wl_cli/commands/clean/dead_code/detector.py +137 -0
- py_wlcli-0.6.13/src/wl_cli/commands/clean/dead_code/fixer.py +124 -0
- py_wlcli-0.6.13/src/wl_cli/commands/clean/dead_code/reporter.py +305 -0
- py_wlcli-0.6.13/src/wl_cli/commands/clean/dead_code/utils.py +0 -0
- py_wlcli-0.6.13/src/wl_cli/commands/clean/lfs.py +278 -0
- py_wlcli-0.6.13/src/wl_cli/commands/clean/python.py +74 -0
- py_wlcli-0.6.13/src/wl_cli/commands/clean/rust.py +101 -0
- py_wlcli-0.6.13/src/wl_cli/commands/clean/utils/__init__.py +34 -0
- py_wlcli-0.6.13/src/wl_cli/commands/clean/venv.py +87 -0
- py_wlcli-0.6.13/src/wl_cli/commands/cleanup.py +69 -0
- py_wlcli-0.6.13/src/wl_cli/commands/click_base.py +79 -0
- py_wlcli-0.6.13/src/wl_cli/commands/config/__init__.py +1 -0
- py_wlcli-0.6.13/src/wl_cli/commands/config/config.py +241 -0
- py_wlcli-0.6.13/src/wl_cli/commands/debug/__init__.py +6 -0
- py_wlcli-0.6.13/src/wl_cli/commands/debug/debug.py +288 -0
- py_wlcli-0.6.13/src/wl_cli/commands/debug/debug_cache.py +71 -0
- py_wlcli-0.6.13/src/wl_cli/commands/debug/debug_subagent.py +156 -0
- py_wlcli-0.6.13/src/wl_cli/commands/debug/output_formatter.py +165 -0
- py_wlcli-0.6.13/src/wl_cli/commands/debug/source_hasher.py +90 -0
- py_wlcli-0.6.13/src/wl_cli/commands/dependency_resolver.py +25 -0
- py_wlcli-0.6.13/src/wl_cli/commands/format/__init__.py +31 -0
- py_wlcli-0.6.13/src/wl_cli/commands/format/format_cache.py +75 -0
- py_wlcli-0.6.13/src/wl_cli/commands/format/format_command.py +152 -0
- py_wlcli-0.6.13/src/wl_cli/commands/format/format_coordinator.py +97 -0
- py_wlcli-0.6.13/src/wl_cli/commands/format/format_executor.py +366 -0
- py_wlcli-0.6.13/src/wl_cli/commands/format/format_path_handler.py +352 -0
- py_wlcli-0.6.13/src/wl_cli/commands/format/format_progress.py +62 -0
- py_wlcli-0.6.13/src/wl_cli/commands/format/format_reporter.py +31 -0
- py_wlcli-0.6.13/src/wl_cli/commands/format/python_formatter.py +236 -0
- py_wlcli-0.6.13/src/wl_cli/commands/format/rust_formatter.py +80 -0
- py_wlcli-0.6.13/src/wl_cli/commands/git/__init__.py +1 -0
- py_wlcli-0.6.13/src/wl_cli/commands/git/config.py +157 -0
- py_wlcli-0.6.13/src/wl_cli/commands/git/git_facts.py +43 -0
- py_wlcli-0.6.13/src/wl_cli/commands/git/git_flow.py +86 -0
- py_wlcli-0.6.13/src/wl_cli/commands/git/hook.py +99 -0
- py_wlcli-0.6.13/src/wl_cli/commands/git/policy.py +216 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/__init__.py +1 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/common/__init__.py +23 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/common/check_git_bash.py +77 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/common/error_handler.py +70 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/common/exceptions.py +52 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/__init__.py +4 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/cargo_sync.py +237 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/config_manager.py +105 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/directory_utils.py +71 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/git/__init__.py +11 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/git/branch_creator.py +136 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/git/git_flow_interface.py +24 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/git/git_flow_manager.py +153 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/git/git_lfs_manager.py +249 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/git/git_utility.py +245 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/git/gitignore_manager.py +48 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/git/pre_commit_manager.py +127 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/git_initializer.py +193 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/i18n_manager.py +104 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/log_manager.py +241 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/project_structure/__init__.py +21 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/project_structure/config_generator.py +161 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/project_structure/directory_creator.py +177 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/project_structure/hooks_manager.py +152 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/project_structure/readme_handler.py +56 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/project_structure/rust_files_handler.py +21 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/project_structure/setup_handler.py +84 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/project_structure/sop_generator.py +55 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/project_structure/template_copier.py +96 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/project_structure/template_manager.py +170 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/pyproject_generator.py +213 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/rust_initializer.py +136 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/symlink_cleaner.py +99 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/symlink_manager.py +51 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/components/venv_manager.py +103 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/initenv.py +151 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/services/__init__.py +11 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/services/environment_initializer.py +262 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/services/git_lfs_initializer.py +26 -0
- py_wlcli-0.6.13/src/wl_cli/commands/initenv/services/project_structure_initializer.py +49 -0
- py_wlcli-0.6.13/src/wl_cli/commands/lfs/README.md +221 -0
- py_wlcli-0.6.13/src/wl_cli/commands/lfs/__init__.py +5 -0
- py_wlcli-0.6.13/src/wl_cli/commands/lfs/cli.py +94 -0
- py_wlcli-0.6.13/src/wl_cli/commands/lfs/config.py +152 -0
- py_wlcli-0.6.13/src/wl_cli/commands/lfs/hook.py +61 -0
- py_wlcli-0.6.13/src/wl_cli/commands/lfs/initializer.py +486 -0
- py_wlcli-0.6.13/src/wl_cli/commands/lfs/manager.py +95 -0
- py_wlcli-0.6.13/src/wl_cli/commands/lfs/policy.py +165 -0
- py_wlcli-0.6.13/src/wl_cli/commands/lfs/watcher.py +265 -0
- py_wlcli-0.6.13/src/wl_cli/commands/lint/__init__.py +1 -0
- py_wlcli-0.6.13/src/wl_cli/commands/lint/lint.py +11 -0
- py_wlcli-0.6.13/src/wl_cli/commands/lint/lint_command.py +196 -0
- py_wlcli-0.6.13/src/wl_cli/commands/lint/lint_executor.py +93 -0
- py_wlcli-0.6.13/src/wl_cli/commands/lint/lint_reporter.py +352 -0
- py_wlcli-0.6.13/src/wl_cli/commands/lint/mypy_config.py +20 -0
- py_wlcli-0.6.13/src/wl_cli/commands/registry.py +91 -0
- py_wlcli-0.6.13/src/wl_cli/commands/self/__init__.py +7 -0
- py_wlcli-0.6.13/src/wl_cli/commands/self/common/__init__.py +8 -0
- py_wlcli-0.6.13/src/wl_cli/commands/self/common/config.py +27 -0
- py_wlcli-0.6.13/src/wl_cli/commands/self/common/version_cache.py +85 -0
- py_wlcli-0.6.13/src/wl_cli/commands/self/handlers/__init__.py +19 -0
- py_wlcli-0.6.13/src/wl_cli/commands/self/handlers/base_handler.py +29 -0
- py_wlcli-0.6.13/src/wl_cli/commands/self/handlers/install_handler.py +80 -0
- py_wlcli-0.6.13/src/wl_cli/commands/self/handlers/status_handler.py +64 -0
- py_wlcli-0.6.13/src/wl_cli/commands/self/handlers/uninstall_handler.py +57 -0
- py_wlcli-0.6.13/src/wl_cli/commands/self/handlers/update_handler.py +97 -0
- py_wlcli-0.6.13/src/wl_cli/commands/self/handlers/version_handler.py +17 -0
- py_wlcli-0.6.13/src/wl_cli/commands/self/self_command.py +208 -0
- py_wlcli-0.6.13/src/wl_cli/commands/self/services/__init__.py +15 -0
- py_wlcli-0.6.13/src/wl_cli/commands/self/services/installation_manager.py +182 -0
- py_wlcli-0.6.13/src/wl_cli/commands/self/services/local_installer.py +167 -0
- py_wlcli-0.6.13/src/wl_cli/commands/self/services/pypi_updater.py +273 -0
- py_wlcli-0.6.13/src/wl_cli/commands/self/services/windows_update.py +172 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/__init__.py +8 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/base_dependency_analyzer.py +197 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/batch_processor.py +278 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/cache_manager.py +937 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/coverage_analyzer.py +619 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/coverage_cache_manager.py +210 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/progress_manager.py +66 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/python_env_detector.py +179 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/report_generator.py +89 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/single_test_executor.py +158 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/speed_checker.py +118 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/test_command_builder.py +140 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/test_commands.py +616 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/test_reporter.py +171 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/test_result_handler.py +88 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/test_runner.py +225 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/test_utils.py +164 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/utils/__init__.py +17 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/utils/coverage_parser.py +98 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/utils/env_info.py +36 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/utils/junit_parser.py +75 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/utils/markdown_utils.py +20 -0
- py_wlcli-0.6.13/src/wl_cli/commands/testcommands/utils/project_root.py +37 -0
- py_wlcli-0.6.13/src/wl_cli/commands/update/__init__.py +9 -0
- py_wlcli-0.6.13/src/wl_cli/commands/update/services/__init__.py +23 -0
- py_wlcli-0.6.13/src/wl_cli/commands/update/services/backup_manager.py +195 -0
- py_wlcli-0.6.13/src/wl_cli/commands/update/services/component_manager.py +92 -0
- py_wlcli-0.6.13/src/wl_cli/commands/update/services/conflict_resolver.py +181 -0
- py_wlcli-0.6.13/src/wl_cli/commands/update/services/gstack_updater.py +576 -0
- py_wlcli-0.6.13/src/wl_cli/commands/update/services/vendors_updater.py +71 -0
- py_wlcli-0.6.13/src/wl_cli/commands/update/services/version_tracker.py +126 -0
- py_wlcli-0.6.13/src/wl_cli/commands/update/update_command.py +371 -0
- py_wlcli-0.6.13/src/wl_cli/commands/update/utils/__init__.py +3 -0
- py_wlcli-0.6.13/src/wl_cli/commands/version/__init__.py +9 -0
- py_wlcli-0.6.13/src/wl_cli/commands/version/version_command.py +155 -0
- py_wlcli-0.6.13/src/wl_cli/commands/workflow.py +473 -0
- py_wlcli-0.6.13/src/wl_cli/exceptions.py +85 -0
- py_wlcli-0.6.13/src/wl_cli/infrastructure/dependency_injection.py +417 -0
- py_wlcli-0.6.13/src/wl_cli/lib/__init__.py +3 -0
- py_wlcli-0.6.13/src/wl_cli/lib/rust_utils.py +34 -0
- py_wlcli-0.6.13/src/wl_cli/utils/__init__.py +7 -0
- py_wlcli-0.6.13/src/wl_cli/utils/cache.py +479 -0
- py_wlcli-0.6.13/src/wl_cli/utils/config/__init__.py +27 -0
- py_wlcli-0.6.13/src/wl_cli/utils/config/config_loader.py +155 -0
- py_wlcli-0.6.13/src/wl_cli/utils/config/core.py +677 -0
- py_wlcli-0.6.13/src/wl_cli/utils/config/defaults.py +94 -0
- py_wlcli-0.6.13/src/wl_cli/utils/config/env_exporter.py +86 -0
- py_wlcli-0.6.13/src/wl_cli/utils/config/env_parser.py +108 -0
- py_wlcli-0.6.13/src/wl_cli/utils/config/validation.py +280 -0
- py_wlcli-0.6.13/src/wl_cli/utils/error_handler.py +165 -0
- py_wlcli-0.6.13/src/wl_cli/utils/file_copier.py +55 -0
- py_wlcli-0.6.13/src/wl_cli/utils/file_operations.py +503 -0
- py_wlcli-0.6.13/src/wl_cli/utils/language_utils.py +122 -0
- py_wlcli-0.6.13/src/wl_cli/utils/lazy_import.py +240 -0
- py_wlcli-0.6.13/src/wl_cli/utils/log_levels.py +35 -0
- py_wlcli-0.6.13/src/wl_cli/utils/log_rotators.py +74 -0
- py_wlcli-0.6.13/src/wl_cli/utils/logging.py +340 -0
- py_wlcli-0.6.13/src/wl_cli/utils/output_context.py +142 -0
- py_wlcli-0.6.13/src/wl_cli/utils/performance/__init__.py +1 -0
- py_wlcli-0.6.13/src/wl_cli/utils/performance/decorators.py +111 -0
- py_wlcli-0.6.13/src/wl_cli/utils/performance/exporter.py +38 -0
- py_wlcli-0.6.13/src/wl_cli/utils/performance/models.py +16 -0
- py_wlcli-0.6.13/src/wl_cli/utils/performance/monitor.py +161 -0
- py_wlcli-0.6.13/src/wl_cli/utils/performance_monitor.py +32 -0
- py_wlcli-0.6.13/src/wl_cli/utils/platform_adapter.py +94 -0
- py_wlcli-0.6.13/src/wl_cli/utils/project_root.py +86 -0
- py_wlcli-0.6.13/src/wl_cli/utils/structured_logger.py +18 -0
- py_wlcli-0.6.13/src/wl_cli/utils/structured_logging/__init__.py +19 -0
- py_wlcli-0.6.13/src/wl_cli/utils/structured_logging/config.py +349 -0
- py_wlcli-0.6.13/src/wl_cli/utils/structured_logging/core.py +214 -0
- py_wlcli-0.6.13/src/wl_cli/utils/structured_logging/filtering.py +75 -0
- py_wlcli-0.6.13/src/wl_cli/utils/structured_logging/filters.py +55 -0
- py_wlcli-0.6.13/src/wl_cli/utils/structured_logging/formatters.py +251 -0
- py_wlcli-0.6.13/src/wl_cli/utils/structured_logging/handlers.py +316 -0
- py_wlcli-0.6.13/src/wl_cli/utils/structured_logging/logger.py +395 -0
- py_wlcli-0.6.13/src/wl_cli/utils/subprocess.py +71 -0
- py_wlcli-0.6.13/src/wl_cli/utils/subprocess_utils.py +164 -0
- py_wlcli-0.6.13/src/wl_cli/utils/test_utils/__init__.py +5 -0
- py_wlcli-0.6.13/src/wl_cli/utils/test_utils/test_filter.py +36 -0
- py_wlcli-0.6.13/src/wl_cli/utils/uv_tool.py +117 -0
- py_wlcli-0.6.13/src/wl_cli/utils/uv_workspace.py +198 -0
- py_wlcli-0.6.13/src/wl_cli/utils/version/__init__.py +15 -0
- py_wlcli-0.6.13/src/wl_cli/utils/version/pypi_version_checker.py +84 -0
- py_wlcli-0.6.13/src/wl_cli/utils/version/version_comparator.py +133 -0
- py_wlcli-0.6.13/src/wl_cli/utils/version/version_detectors.py +302 -0
- py_wlcli-0.6.13/src/wl_cli/utils/version/version_service.py +118 -0
- py_wlcli-0.6.13/src/wl_cli/utils/version/version_updater.py +186 -0
- py_wlcli-0.6.13/src/wl_cli/utils/wl_dir_updater.py +571 -0
- py_wlcli-0.6.13/src/wl_cli/utils/workspace_detector/__init__.py +28 -0
- py_wlcli-0.6.13/src/wl_cli/utils/workspace_detector/core.py +153 -0
- py_wlcli-0.6.13/src/wl_cli/utils/workspace_detector/detection_strategies.py +89 -0
- py_wlcli-0.6.13/src/wl_cli/utils/workspace_detector/exceptions.py +5 -0
- py_wlcli-0.6.13/src/wl_cli/utils/workspace_detector/types.py +17 -0
- py_wlcli-0.6.13/src/wl_cli/utils/workspace_detector/venv_resolver.py +84 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/config/.codespellrc +2 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/config/.coveragerc +16 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/config/dependencies.toml +10 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/config/mypy.ini +59 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/config/pyproject_defaults.toml +28 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/config/template_config.toml +24 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/config/tool_configs.toml +76 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/git/.gitignore +119 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/git/.pre-commit-config.yaml +37 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/applypatch-msg.sample +15 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/commit-msg.sample +24 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/fsmonitor-watchman.sample +174 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/post-update.sample +8 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/pre-applypatch.sample +14 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/pre-commit +45 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/pre-commit.legacy +31 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/pre-commit.sample +49 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/pre-merge-commit.sample +13 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/pre-push.sample +60 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/pre-rebase.sample +169 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/pre-receive.sample +24 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/prepare-commit-msg.sample +42 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/push-to-checkout.sample +78 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/sendemail-validate.sample +77 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/unix/applypatch-msg.sample +15 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/unix/check_lockfile.py +58 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/unix/check_lockfile.sh +36 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/unix/commit-msg.sample +24 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/unix/fsmonitor-watchman.sample +174 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/unix/post-update.sample +8 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/unix/pre-applypatch.sample +14 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/unix/pre-commit +186 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/unix/pre-commit.legacy +31 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/unix/pre-commit.py +81 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/unix/pre-commit.sample +49 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/unix/pre-merge-commit.sample +13 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/unix/pre-push +303 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/unix/pre-push.sample +53 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/unix/pre-rebase.sample +169 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/unix/pre-receive.sample +24 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/unix/prepare-commit-msg.sample +42 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/update.sample +128 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/hooks/win/work.bat +63 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/project/.gitignore +87 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/project/.python-version +1 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/project/LICENSE +21 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/project/README.md +0 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/project/pyproject.toml +27 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/project/pyproject_no_workspace.toml +16 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/project/pyproject_workspace.toml +14 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/readme/README.md +120 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/rust/Cargo.toml +14 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/rust/lib/__init__.py +3 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/rust/lib/rust_utils.py +29 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/rust/src/lib.rs +13 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/rust/src/main.rs +3 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/rust/tests/test_rust_fallback.py +40 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/sop_doc/industrial-standard-sop.md +145 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/sop_doc/python-sop.md +345 -0
- py_wlcli-0.6.13/src/wl_cli/vendors/sop_doc/rust-readme.md +219 -0
py_wlcli-0.6.13/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Admin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
py_wlcli-0.6.13/PKG-INFO
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: py_wlcli
|
|
3
|
+
Version: 0.6.13
|
|
4
|
+
Requires-Dist: toml>=0.10.2
|
|
5
|
+
Requires-Dist: click>=8.1.0
|
|
6
|
+
Requires-Dist: tqdm>=4.66.0
|
|
7
|
+
Requires-Dist: pre-commit>=4.5.1
|
|
8
|
+
Requires-Dist: mypy>=1.18.2 ; extra == 'dev'
|
|
9
|
+
Requires-Dist: ruff==0.15.21 ; extra == 'dev'
|
|
10
|
+
Requires-Dist: types-toml>=0.10.8.20240310 ; extra == 'dev'
|
|
11
|
+
Requires-Dist: types-tqdm>=4.67.0.20250809 ; extra == 'dev'
|
|
12
|
+
Requires-Dist: pytest-xdist>=3.8.0 ; extra == 'dev'
|
|
13
|
+
Requires-Dist: twine>=6.2.0 ; extra == 'dev'
|
|
14
|
+
Requires-Dist: pyyaml>=6.0.0 ; extra == 'lfs'
|
|
15
|
+
Requires-Dist: watchdog>=6.0.0 ; extra == 'lfs'
|
|
16
|
+
Requires-Dist: pytest>=9.0.3 ; extra == 'test'
|
|
17
|
+
Requires-Dist: pytest-cov>=7.0.0 ; extra == 'test'
|
|
18
|
+
Requires-Dist: pytest-asyncio>=1.3.0 ; extra == 'test'
|
|
19
|
+
Requires-Dist: pyyaml>=6.0.0 ; extra == 'test'
|
|
20
|
+
Requires-Dist: watchdog>=6.0.0 ; extra == 'test'
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Provides-Extra: lfs
|
|
23
|
+
Provides-Extra: test
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Summary: wl_cli - Python项目
|
|
26
|
+
Author-email: WL Admin <wl.admin@example.com>
|
|
27
|
+
License-Expression: MIT
|
|
28
|
+
Requires-Python: >=3.11
|
|
29
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
30
|
+
Project-URL: Homepage, https://gitlab.gewinnrobo.com/Humuyuan/py_wlcommands
|
|
31
|
+
Project-URL: Issues, https://gitlab.gewinnrobo.com/Humuyuan/py_wlcommands/-/issues
|
|
32
|
+
|
|
33
|
+
# wl_cli(`wl` CLI)
|
|
34
|
+
|
|
35
|
+
`wl_cli` 是一个 Python + Rust 混合的命令行工具,命令入口为 `wl`。它以 Click 构建 CLI,
|
|
36
|
+
以 maturin + pyo3 编译 Rust 原生扩展,面向 Python 项目的初始化、构建、测试、格式化、lint、
|
|
37
|
+
清理与质量门等日常开发工作流。
|
|
38
|
+
|
|
39
|
+
## 功能概览
|
|
40
|
+
|
|
41
|
+
| 命令 | 用途 |
|
|
42
|
+
|------|------|
|
|
43
|
+
| `wl init` | 初始化项目环境(Git、虚拟环境、i18n、Rust 子模块等) |
|
|
44
|
+
| `wl build` | 执行构建任务,支持 Python 包构建与分发 |
|
|
45
|
+
| `wl test` | 运行测试(支持缓存、覆盖率、逐步模式) |
|
|
46
|
+
| `wl format` | 格式化 Python 与 Rust 代码 |
|
|
47
|
+
| `wl lint` | 代码质量检查(ruff/mypy 等) |
|
|
48
|
+
| `wl clean` | 清理构建产物与临时文件 |
|
|
49
|
+
| `wl debug` | 质量门(测试 + 格式检查) |
|
|
50
|
+
| `wl self` | 自管理命令 |
|
|
51
|
+
|
|
52
|
+
命令行别名:`b`→build、`c`→clean、`f`→format、`i`→init。
|
|
53
|
+
完整命令参考见 [CLI_COMMANDS.md](https://github.com/CharlieZi/py_wlcommands/blob/main/CLI_COMMANDS.md)。
|
|
54
|
+
|
|
55
|
+
## 环境要求
|
|
56
|
+
|
|
57
|
+
- Python >= 3.11
|
|
58
|
+
- 从源码构建 Rust 扩展时需要 Rust 工具链(maturin/pyo3)
|
|
59
|
+
- 包管理器推荐 [uv](https://docs.astral.sh/uv/)
|
|
60
|
+
|
|
61
|
+
## 安装
|
|
62
|
+
|
|
63
|
+
### 稳定版(PyPI)
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pip install wl-cli
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
按需安装可选 extra:`pip install "wl-cli[lfs]"`(LFS watch)、
|
|
70
|
+
`pip install "wl-cli[test]"`(测试套件)、`pip install "wl-cli[dev]"`(开发工具)。
|
|
71
|
+
详见[安装文档](https://github.com/CharlieZi/py_wlcommands/blob/main/docs/user/installation.md)。
|
|
72
|
+
|
|
73
|
+
### 开发版(从源码)
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# 以 GitLab 为主仓(origin),GitHub 为镜像
|
|
77
|
+
git clone https://gitlab.gewinnrobo.com/Humuyuan/py_wlcommands.git
|
|
78
|
+
cd wl_cli
|
|
79
|
+
uv pip install -e ".[dev,test]"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
GitHub 镜像:<https://github.com/CharlieZi/py_wlcommands.git>
|
|
83
|
+
|
|
84
|
+
## 快速开始
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
wl --help # 查看帮助
|
|
88
|
+
wl init # 初始化项目
|
|
89
|
+
wl build # 构建
|
|
90
|
+
wl test # 运行测试
|
|
91
|
+
wl format # 格式化代码
|
|
92
|
+
wl lint # 代码质量检查
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## 测试与质量门
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
wl test # 运行全部测试
|
|
99
|
+
wl test --cover # 覆盖率(阈值 70%)
|
|
100
|
+
wl test -s # 逐个测试文件运行,首个失败即停
|
|
101
|
+
pytest tests/ -v # 指定文件(pytest 直跑)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
提交前请确保 pre-commit 通过(ruff、codespell、lockfile 一致性等)。
|
|
105
|
+
开发约束详见 [CLAUDE.md](https://github.com/CharlieZi/py_wlcommands/blob/main/CLAUDE.md),
|
|
106
|
+
贡献流程见 [CONTRIBUTING.md](https://github.com/CharlieZi/py_wlcommands/blob/main/CONTRIBUTING.md)。
|
|
107
|
+
|
|
108
|
+
## 文档
|
|
109
|
+
|
|
110
|
+
- [CLI_COMMANDS.md](https://github.com/CharlieZi/py_wlcommands/blob/main/CLI_COMMANDS.md) — 命令参考
|
|
111
|
+
- [CONTEXT.md](https://github.com/CharlieZi/py_wlcommands/blob/main/CONTEXT.md) — 架构术语(Click 迁移语境)
|
|
112
|
+
- [docs/](https://github.com/CharlieZi/py_wlcommands/tree/main/docs) — 设计、ADR、章节与 CICD/发布文档
|
|
113
|
+
- [安装文档](https://github.com/CharlieZi/py_wlcommands/blob/main/docs/user/installation.md) — 安装细节与 shell 补全
|
|
114
|
+
|
|
115
|
+
## 架构速览
|
|
116
|
+
|
|
117
|
+
Click CLI([src/py_wlcommands/cli_click.py](https://github.com/CharlieZi/py_wlcommands/blob/main/src/py_wlcommands/cli_click.py)
|
|
118
|
+
经 `setup_commands()` 直接注册)→ 各命令实现(`commands/<group>/`)→ 业务逻辑;
|
|
119
|
+
Rust 原生扩展(`rust/`、`src/wl_cli/lib/`)经 maturin 编译为 `wl_cli_native`;
|
|
120
|
+
依赖注入容器集中管理共享服务(`infrastructure/dependency_injection.py`)。
|
|
121
|
+
架构演进背景见 [Click 迁移设计](https://github.com/CharlieZi/py_wlcommands/blob/main/docs/superpowers/specs/2026-06-02-full-click-migration-design.md)。
|
|
122
|
+
|
|
123
|
+
## 许可证
|
|
124
|
+
|
|
125
|
+
MIT,见 [LICENSE](https://github.com/CharlieZi/py_wlcommands/blob/main/LICENSE)。
|
|
126
|
+
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# wl_cli(`wl` CLI)
|
|
2
|
+
|
|
3
|
+
`wl_cli` 是一个 Python + Rust 混合的命令行工具,命令入口为 `wl`。它以 Click 构建 CLI,
|
|
4
|
+
以 maturin + pyo3 编译 Rust 原生扩展,面向 Python 项目的初始化、构建、测试、格式化、lint、
|
|
5
|
+
清理与质量门等日常开发工作流。
|
|
6
|
+
|
|
7
|
+
## 功能概览
|
|
8
|
+
|
|
9
|
+
| 命令 | 用途 |
|
|
10
|
+
|------|------|
|
|
11
|
+
| `wl init` | 初始化项目环境(Git、虚拟环境、i18n、Rust 子模块等) |
|
|
12
|
+
| `wl build` | 执行构建任务,支持 Python 包构建与分发 |
|
|
13
|
+
| `wl test` | 运行测试(支持缓存、覆盖率、逐步模式) |
|
|
14
|
+
| `wl format` | 格式化 Python 与 Rust 代码 |
|
|
15
|
+
| `wl lint` | 代码质量检查(ruff/mypy 等) |
|
|
16
|
+
| `wl clean` | 清理构建产物与临时文件 |
|
|
17
|
+
| `wl debug` | 质量门(测试 + 格式检查) |
|
|
18
|
+
| `wl self` | 自管理命令 |
|
|
19
|
+
|
|
20
|
+
命令行别名:`b`→build、`c`→clean、`f`→format、`i`→init。
|
|
21
|
+
完整命令参考见 [CLI_COMMANDS.md](https://github.com/CharlieZi/py_wlcommands/blob/main/CLI_COMMANDS.md)。
|
|
22
|
+
|
|
23
|
+
## 环境要求
|
|
24
|
+
|
|
25
|
+
- Python >= 3.11
|
|
26
|
+
- 从源码构建 Rust 扩展时需要 Rust 工具链(maturin/pyo3)
|
|
27
|
+
- 包管理器推荐 [uv](https://docs.astral.sh/uv/)
|
|
28
|
+
|
|
29
|
+
## 安装
|
|
30
|
+
|
|
31
|
+
### 稳定版(PyPI)
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install wl-cli
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
按需安装可选 extra:`pip install "wl-cli[lfs]"`(LFS watch)、
|
|
38
|
+
`pip install "wl-cli[test]"`(测试套件)、`pip install "wl-cli[dev]"`(开发工具)。
|
|
39
|
+
详见[安装文档](https://github.com/CharlieZi/py_wlcommands/blob/main/docs/user/installation.md)。
|
|
40
|
+
|
|
41
|
+
### 开发版(从源码)
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# 以 GitLab 为主仓(origin),GitHub 为镜像
|
|
45
|
+
git clone https://gitlab.gewinnrobo.com/Humuyuan/py_wlcommands.git
|
|
46
|
+
cd wl_cli
|
|
47
|
+
uv pip install -e ".[dev,test]"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
GitHub 镜像:<https://github.com/CharlieZi/py_wlcommands.git>
|
|
51
|
+
|
|
52
|
+
## 快速开始
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
wl --help # 查看帮助
|
|
56
|
+
wl init # 初始化项目
|
|
57
|
+
wl build # 构建
|
|
58
|
+
wl test # 运行测试
|
|
59
|
+
wl format # 格式化代码
|
|
60
|
+
wl lint # 代码质量检查
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## 测试与质量门
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
wl test # 运行全部测试
|
|
67
|
+
wl test --cover # 覆盖率(阈值 70%)
|
|
68
|
+
wl test -s # 逐个测试文件运行,首个失败即停
|
|
69
|
+
pytest tests/ -v # 指定文件(pytest 直跑)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
提交前请确保 pre-commit 通过(ruff、codespell、lockfile 一致性等)。
|
|
73
|
+
开发约束详见 [CLAUDE.md](https://github.com/CharlieZi/py_wlcommands/blob/main/CLAUDE.md),
|
|
74
|
+
贡献流程见 [CONTRIBUTING.md](https://github.com/CharlieZi/py_wlcommands/blob/main/CONTRIBUTING.md)。
|
|
75
|
+
|
|
76
|
+
## 文档
|
|
77
|
+
|
|
78
|
+
- [CLI_COMMANDS.md](https://github.com/CharlieZi/py_wlcommands/blob/main/CLI_COMMANDS.md) — 命令参考
|
|
79
|
+
- [CONTEXT.md](https://github.com/CharlieZi/py_wlcommands/blob/main/CONTEXT.md) — 架构术语(Click 迁移语境)
|
|
80
|
+
- [docs/](https://github.com/CharlieZi/py_wlcommands/tree/main/docs) — 设计、ADR、章节与 CICD/发布文档
|
|
81
|
+
- [安装文档](https://github.com/CharlieZi/py_wlcommands/blob/main/docs/user/installation.md) — 安装细节与 shell 补全
|
|
82
|
+
|
|
83
|
+
## 架构速览
|
|
84
|
+
|
|
85
|
+
Click CLI([src/py_wlcommands/cli_click.py](https://github.com/CharlieZi/py_wlcommands/blob/main/src/py_wlcommands/cli_click.py)
|
|
86
|
+
经 `setup_commands()` 直接注册)→ 各命令实现(`commands/<group>/`)→ 业务逻辑;
|
|
87
|
+
Rust 原生扩展(`rust/`、`src/wl_cli/lib/`)经 maturin 编译为 `wl_cli_native`;
|
|
88
|
+
依赖注入容器集中管理共享服务(`infrastructure/dependency_injection.py`)。
|
|
89
|
+
架构演进背景见 [Click 迁移设计](https://github.com/CharlieZi/py_wlcommands/blob/main/docs/superpowers/specs/2026-06-02-full-click-migration-design.md)。
|
|
90
|
+
|
|
91
|
+
## 许可证
|
|
92
|
+
|
|
93
|
+
MIT,见 [LICENSE](https://github.com/CharlieZi/py_wlcommands/blob/main/LICENSE)。
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "py_wlcli"
|
|
3
|
+
dynamic = [ "version",]
|
|
4
|
+
description = "wl_cli - Python项目"
|
|
5
|
+
requires-python = ">=3.11"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
dependencies = [
|
|
9
|
+
"toml>=0.10.2",
|
|
10
|
+
"click>=8.1.0",
|
|
11
|
+
"tqdm>=4.66.0",
|
|
12
|
+
"pre-commit>=4.5.1",
|
|
13
|
+
]
|
|
14
|
+
[[project.authors]]
|
|
15
|
+
name = "WL Admin"
|
|
16
|
+
email = "wl.admin@example.com"
|
|
17
|
+
|
|
18
|
+
[project.scripts]
|
|
19
|
+
wl = "wl_cli.__main__:main"
|
|
20
|
+
|
|
21
|
+
[project.optional-dependencies]
|
|
22
|
+
dev = [
|
|
23
|
+
"mypy>=1.18.2",
|
|
24
|
+
"ruff==0.15.21",
|
|
25
|
+
"types-toml>=0.10.8.20240310",
|
|
26
|
+
"types-tqdm>=4.67.0.20250809",
|
|
27
|
+
"pytest-xdist>=3.8.0",
|
|
28
|
+
"twine>=6.2.0",
|
|
29
|
+
]
|
|
30
|
+
test = [
|
|
31
|
+
"pytest>=9.0.3",
|
|
32
|
+
"pytest-cov>=7.0.0",
|
|
33
|
+
"pytest-asyncio>=1.3.0",
|
|
34
|
+
"pyyaml>=6.0.0",
|
|
35
|
+
"watchdog>=6.0.0",
|
|
36
|
+
]
|
|
37
|
+
lfs = [
|
|
38
|
+
"pyyaml>=6.0.0",
|
|
39
|
+
"watchdog>=6.0.0",
|
|
40
|
+
]
|
|
41
|
+
|
|
42
|
+
[[tool.uv.index]]
|
|
43
|
+
url = "https://pypi.mirrors.ustc.edu.cn/simple"
|
|
44
|
+
default = true
|
|
45
|
+
|
|
46
|
+
[build-system]
|
|
47
|
+
requires = [ "maturin>=1.0,<2.0",]
|
|
48
|
+
build-backend = "maturin"
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
[project.urls]
|
|
52
|
+
Homepage = "https://gitlab.gewinnrobo.com/Humuyuan/py_wlcommands"
|
|
53
|
+
Issues = "https://gitlab.gewinnrobo.com/Humuyuan/py_wlcommands/-/issues"
|
|
54
|
+
|
|
55
|
+
[tool.maturin]
|
|
56
|
+
manifest-path = "rust/Cargo.toml"
|
|
57
|
+
module-name = "wl_cli.lib.wl_cli_native"
|
|
58
|
+
python-source = "src"
|
|
59
|
+
include = [
|
|
60
|
+
"src/wl_cli/**/*",
|
|
61
|
+
"typings/**/*",
|
|
62
|
+
"LICENSE",
|
|
63
|
+
]
|
|
64
|
+
bindings = "pyo3"
|
|
65
|
+
# 与 rust/Cargo.toml 的 pyo3 features 保持同步(lockstep):maturin 将此处特性作为 --features
|
|
66
|
+
# 透传给 cargo,与 Cargo.toml 取并集,任一处即可生效;两处必须一致。
|
|
67
|
+
# Keep in lockstep with pyo3.features in rust/Cargo.toml — maturin forwards these to
|
|
68
|
+
# cargo as --features, unioned with the Cargo.toml features; both must match.
|
|
69
|
+
features = [
|
|
70
|
+
"pyo3/extension-module",
|
|
71
|
+
"pyo3/abi3",
|
|
72
|
+
"pyo3/abi3-py311",
|
|
73
|
+
"pyo3/generate-import-lib",
|
|
74
|
+
]
|
|
75
|
+
sdist-include = [
|
|
76
|
+
"src/**/*",
|
|
77
|
+
"typings/**/*",
|
|
78
|
+
"VERSION",
|
|
79
|
+
"LICENSE",
|
|
80
|
+
]
|
|
81
|
+
sdist-exclude = [
|
|
82
|
+
"src/wl_cli/vendors/**/*",
|
|
83
|
+
]
|
|
84
|
+
python-packages = [ "wl_cli",]
|
|
85
|
+
|
|
86
|
+
[tool.ruff]
|
|
87
|
+
line-length = 88
|
|
88
|
+
target-version = "py310"
|
|
89
|
+
|
|
90
|
+
[tool.ruff.format]
|
|
91
|
+
preview = false
|
|
92
|
+
|
|
93
|
+
[tool.ruff.lint]
|
|
94
|
+
select = ["E", "W", "F", "I", "C4", "UP", "N", "B", "C90", "TCH"]
|
|
95
|
+
ignore = ["E501", "B904", "F401", "F841", "E402", "F811", "S607", "N802", "N817"]
|
|
96
|
+
exclude = [ ".git", ".ruff_cache", "__pycache__", "build", "dist", "*.egg-info", "uv.lock", "tmp",]
|
|
97
|
+
|
|
98
|
+
[tool.ruff.lint.mccabe]
|
|
99
|
+
max-complexity = 14
|
|
100
|
+
|
|
101
|
+
[tool.ruff.lint.pylint]
|
|
102
|
+
max-args = 15
|
|
103
|
+
max-branches = 16
|
|
104
|
+
max-statements = 60
|
|
105
|
+
|
|
106
|
+
[tool.pytest.ini_options]
|
|
107
|
+
testpaths = [ "tests",]
|
|
108
|
+
python_files = [ "test_*.py",]
|
|
109
|
+
addopts = "-v --cov=wl_cli --cov-report=term --cov-context=test"
|
|
110
|
+
asyncio_mode = "auto"
|
|
111
|
+
asyncio_default_fixture_loop_scope = "function"
|
|
112
|
+
cache_dir = ".pytest_cache"
|
|
113
|
+
markers = [
|
|
114
|
+
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
|
|
115
|
+
]
|
|
116
|
+
filterwarnings = [
|
|
117
|
+
"ignore:coroutine 'AsyncMockMixin._execute_mock_call' was never awaited:RuntimeWarning",
|
|
118
|
+
"ignore:coroutine 'PublishCommand._execute_async' was never awaited:RuntimeWarning",
|
|
119
|
+
]
|
|
120
|
+
|
|
121
|
+
[tool.ruff.lint.isort]
|
|
122
|
+
known-first-party = [ "wl_cli",]
|
|
123
|
+
|
|
124
|
+
[tool.coverage.run]
|
|
125
|
+
source = ["wl_cli"]
|
|
126
|
+
disable_warnings = ["module-not-measured"]
|
|
127
|
+
|
|
128
|
+
[tool.coverage.report]
|
|
129
|
+
fail_under = 70
|
|
130
|
+
show_missing = true
|
|
131
|
+
skip_covered = false
|
|
132
|
+
omit = [
|
|
133
|
+
"tests/*",
|
|
134
|
+
"*/__pycache__/*",
|
|
135
|
+
".venv/*",
|
|
136
|
+
"wl_cli/commands/selfcommands/*",
|
|
137
|
+
]
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "cc"
|
|
7
|
+
version = "1.4.5"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "005ec2760ca554fae18df7a11195552ec576cd665632a881bc011d5bb2fd4d80"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"find-msvc-tools",
|
|
12
|
+
"shlex",
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
[[package]]
|
|
16
|
+
name = "find-msvc-tools"
|
|
17
|
+
version = "0.1.12"
|
|
18
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
19
|
+
checksum = "3e0f1c7c3a72c66fd80abe965175f7523475c0489a87d3ff9d6e8c87d87a9d2d"
|
|
20
|
+
|
|
21
|
+
[[package]]
|
|
22
|
+
name = "heck"
|
|
23
|
+
version = "0.5.0"
|
|
24
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
25
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
26
|
+
|
|
27
|
+
[[package]]
|
|
28
|
+
name = "libc"
|
|
29
|
+
version = "0.2.189"
|
|
30
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
31
|
+
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
|
|
32
|
+
|
|
33
|
+
[[package]]
|
|
34
|
+
name = "once_cell"
|
|
35
|
+
version = "1.21.4"
|
|
36
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
37
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
38
|
+
|
|
39
|
+
[[package]]
|
|
40
|
+
name = "portable-atomic"
|
|
41
|
+
version = "1.15.0"
|
|
42
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
43
|
+
checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
|
|
44
|
+
|
|
45
|
+
[[package]]
|
|
46
|
+
name = "proc-macro2"
|
|
47
|
+
version = "1.0.107"
|
|
48
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
49
|
+
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
50
|
+
dependencies = [
|
|
51
|
+
"unicode-ident",
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
[[package]]
|
|
55
|
+
name = "pyo3"
|
|
56
|
+
version = "0.28.3"
|
|
57
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
58
|
+
checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12"
|
|
59
|
+
dependencies = [
|
|
60
|
+
"libc",
|
|
61
|
+
"once_cell",
|
|
62
|
+
"portable-atomic",
|
|
63
|
+
"pyo3-build-config",
|
|
64
|
+
"pyo3-ffi",
|
|
65
|
+
"pyo3-macros",
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
[[package]]
|
|
69
|
+
name = "pyo3-build-config"
|
|
70
|
+
version = "0.28.3"
|
|
71
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
72
|
+
checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e"
|
|
73
|
+
dependencies = [
|
|
74
|
+
"python3-dll-a",
|
|
75
|
+
"target-lexicon",
|
|
76
|
+
]
|
|
77
|
+
|
|
78
|
+
[[package]]
|
|
79
|
+
name = "pyo3-ffi"
|
|
80
|
+
version = "0.28.3"
|
|
81
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
82
|
+
checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e"
|
|
83
|
+
dependencies = [
|
|
84
|
+
"libc",
|
|
85
|
+
"pyo3-build-config",
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
[[package]]
|
|
89
|
+
name = "pyo3-macros"
|
|
90
|
+
version = "0.28.3"
|
|
91
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
92
|
+
checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813"
|
|
93
|
+
dependencies = [
|
|
94
|
+
"proc-macro2",
|
|
95
|
+
"pyo3-macros-backend",
|
|
96
|
+
"quote",
|
|
97
|
+
"syn",
|
|
98
|
+
]
|
|
99
|
+
|
|
100
|
+
[[package]]
|
|
101
|
+
name = "pyo3-macros-backend"
|
|
102
|
+
version = "0.28.3"
|
|
103
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
104
|
+
checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb"
|
|
105
|
+
dependencies = [
|
|
106
|
+
"heck",
|
|
107
|
+
"proc-macro2",
|
|
108
|
+
"pyo3-build-config",
|
|
109
|
+
"quote",
|
|
110
|
+
"syn",
|
|
111
|
+
]
|
|
112
|
+
|
|
113
|
+
[[package]]
|
|
114
|
+
name = "python3-dll-a"
|
|
115
|
+
version = "0.2.15"
|
|
116
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
117
|
+
checksum = "d80ba7540edb18890d444c5aa8e1f1f99b1bdf26fb26ae383135325f4a36042b"
|
|
118
|
+
dependencies = [
|
|
119
|
+
"cc",
|
|
120
|
+
]
|
|
121
|
+
|
|
122
|
+
[[package]]
|
|
123
|
+
name = "quote"
|
|
124
|
+
version = "1.0.47"
|
|
125
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
126
|
+
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
127
|
+
dependencies = [
|
|
128
|
+
"proc-macro2",
|
|
129
|
+
]
|
|
130
|
+
|
|
131
|
+
[[package]]
|
|
132
|
+
name = "shlex"
|
|
133
|
+
version = "2.0.1"
|
|
134
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
135
|
+
checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
|
|
136
|
+
|
|
137
|
+
[[package]]
|
|
138
|
+
name = "syn"
|
|
139
|
+
version = "2.0.119"
|
|
140
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
141
|
+
checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
|
|
142
|
+
dependencies = [
|
|
143
|
+
"proc-macro2",
|
|
144
|
+
"quote",
|
|
145
|
+
"unicode-ident",
|
|
146
|
+
]
|
|
147
|
+
|
|
148
|
+
[[package]]
|
|
149
|
+
name = "target-lexicon"
|
|
150
|
+
version = "0.13.5"
|
|
151
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
152
|
+
checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
|
|
153
|
+
|
|
154
|
+
[[package]]
|
|
155
|
+
name = "unicode-ident"
|
|
156
|
+
version = "1.0.24"
|
|
157
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
158
|
+
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
159
|
+
|
|
160
|
+
[[package]]
|
|
161
|
+
name = "wl_cli_native"
|
|
162
|
+
version = "0.6.13"
|
|
163
|
+
dependencies = [
|
|
164
|
+
"pyo3",
|
|
165
|
+
]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
[package]
|
|
3
|
+
name = "wl_cli_native"
|
|
4
|
+
version = "0.6.13"
|
|
5
|
+
edition = "2024"
|
|
6
|
+
description = "wl_cli - Python项目"
|
|
7
|
+
authors = ["WL Admin <wl.admin@example.com>"]
|
|
8
|
+
license = "MIT"
|
|
9
|
+
|
|
10
|
+
[dependencies]
|
|
11
|
+
# 与 pyproject.toml [tool.maturin] features 保持同步(lockstep)——二者取并集,改动需同步。
|
|
12
|
+
# Keep in lockstep with [tool.maturin] features in pyproject.toml — cargo unions both sets.
|
|
13
|
+
pyo3 = { version = "0.28.2", features = ["extension-module", "abi3", "abi3-py311", "generate-import-lib"] }
|
|
14
|
+
|
|
15
|
+
[lib]
|
|
16
|
+
name = "wl_cli_native"
|
|
17
|
+
crate-type = ["cdylib"]
|
|
18
|
+
path = "src/lib.rs"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Admin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
use std::env;
|
|
2
|
+
use std::fs::File;
|
|
3
|
+
use std::io::Read;
|
|
4
|
+
use std::path::PathBuf;
|
|
5
|
+
|
|
6
|
+
fn main() {
|
|
7
|
+
// 告诉 Cargo 当 VERSION 文件改变时重新运行此脚本
|
|
8
|
+
println!("cargo:rerun-if-changed=../VERSION");
|
|
9
|
+
|
|
10
|
+
// 读取 VERSION 文件
|
|
11
|
+
let mut version_path = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
|
|
12
|
+
version_path.pop(); // 从 rust/ 回到项目根目录
|
|
13
|
+
version_path.push("VERSION");
|
|
14
|
+
|
|
15
|
+
if version_path.exists() {
|
|
16
|
+
let mut file = File::open(version_path).expect("Failed to open VERSION file");
|
|
17
|
+
let mut version = String::new();
|
|
18
|
+
file.read_to_string(&mut version)
|
|
19
|
+
.expect("Failed to read VERSION file");
|
|
20
|
+
let version = version.trim();
|
|
21
|
+
|
|
22
|
+
// 设置环境变量,供代码中使用
|
|
23
|
+
println!("cargo:rustc-env=CARGO_PKG_VERSION={}", version);
|
|
24
|
+
|
|
25
|
+
println!("cargo:warning=Using version from VERSION file: {}", version);
|
|
26
|
+
} else {
|
|
27
|
+
println!("cargo:warning=VERSION file not found, using Cargo.toml version");
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rust": {
|
|
3
|
+
"analyzerTargetDir": "target/rust-analyzer"
|
|
4
|
+
},
|
|
5
|
+
"check": {
|
|
6
|
+
"OnSave": {
|
|
7
|
+
"overrideCommand": [
|
|
8
|
+
"cargo",
|
|
9
|
+
"check",
|
|
10
|
+
"--workspace",
|
|
11
|
+
"--message-format=json",
|
|
12
|
+
"--all-targets",
|
|
13
|
+
"--target-dir=target/rust-analyzer"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"primeCaches": {
|
|
18
|
+
"numThreads": 2
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
use pyo3::prelude::*;
|
|
2
|
+
|
|
3
|
+
/// A Python module implemented in Rust.
|
|
4
|
+
#[pymodule]
|
|
5
|
+
fn wl_cli_native(m: &Bound<'_, PyModule>) -> PyResult<()> {
|
|
6
|
+
m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
|
|
7
|
+
Ok(())
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
#[pyfunction]
|
|
11
|
+
fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
|
|
12
|
+
Ok((a + b).to_string())
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""
|
|
2
|
+
WL Commands - Command line interface for project management
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def _read_version_from_file() -> str:
|
|
9
|
+
"""Read version from VERSION file or importlib.metadata."""
|
|
10
|
+
import importlib.metadata
|
|
11
|
+
|
|
12
|
+
try:
|
|
13
|
+
return importlib.metadata.version("py_wlcli")
|
|
14
|
+
except (importlib.metadata.PackageNotFoundError, Exception):
|
|
15
|
+
pass
|
|
16
|
+
version_file = Path(__file__).parent.parent.parent / "VERSION"
|
|
17
|
+
if version_file.exists():
|
|
18
|
+
try:
|
|
19
|
+
return version_file.read_text(encoding="utf-8").strip()
|
|
20
|
+
except Exception:
|
|
21
|
+
pass
|
|
22
|
+
return "0.0.0"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
__version__ = _read_version_from_file()
|
|
26
|
+
|
|
27
|
+
from .commands import Command
|