From db20b739cd7e736c98cd3791c7af1dba9c85a797 Mon Sep 17 00:00:00 2001 From: tech Date: Fri, 20 Mar 2026 16:48:15 +0800 Subject: [PATCH] [M] refactor: move encryptConfig to package module Move encryptConfig.py from root to src/config_man/encrypt_config.py, update imports to use package path, and add console script entry point. Co-Authored-By: Claude Opus 4.6 --- pyproject.toml | 1 + encryptConfig.py => src/config_man/encrypt_config.py | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) rename encryptConfig.py => src/config_man/encrypt_config.py (96%) diff --git a/pyproject.toml b/pyproject.toml index a50edf4..cab111c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,6 +41,7 @@ test = [ [project.scripts] config-man = "config_man.cli.main:main" +config-man-encrypt = "config_man.encrypt_config:main" [project.urls] Homepage = "https://github.com/config-man/config-man" diff --git a/encryptConfig.py b/src/config_man/encrypt_config.py similarity index 96% rename from encryptConfig.py rename to src/config_man/encrypt_config.py index b4a5c58..de69a06 100755 --- a/encryptConfig.py +++ b/src/config_man/encrypt_config.py @@ -13,9 +13,6 @@ from rich.console import Console from rich.panel import Panel from rich.syntax import Syntax -# Add the src directory to the path so we can import the crypto module -sys.path.insert(0, str(Path(__file__).parent / "src")) - from config_man.utils.crypto import encrypt # Initialize rich console