kb_folder_manager/contains core logic:operations.pyfor split/merge/validate/index workflowscli.pyandgui.pyfor user interfacesconfig.py,validator.py,indexer.py, andutils.pyfor support layers
- Root entry points:
kb_folder_manager.py(CLI) andkb_folder_manager_gui.py(GUI). tests/includes unit tests plus GUI validation scripts.docs/contains user/developer guides and release notes.config.yamlstores runtime settings (file types, placeholder suffix, hash algorithm).
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -r requirements.txt
python kb_folder_manager.py --help
python kb_folder_manager_gui.py
python -m unittest discover tests
python tests\test_gui.py
python tests\test_gui_launch.py- Use the first three commands to prepare a local dev environment.
- Use CLI/GUI commands to verify entry points quickly.
- Run
unittestfor automated regression checks; run GUI scripts for interaction/startup sanity.
- Target Python 3.10+ and follow PEP 8 with 4-space indentation.
- Keep line length near 88 characters.
- Naming:
PascalCasefor classes,snake_casefor functions/variables,UPPER_SNAKE_CASEfor constants. - Keep interface files thin; place business rules in
kb_folder_manager/operations.pyand related modules. - Add type hints and concise docstrings for public functions when practical.
- Primary test framework is
unittest(tests/test_basic.py). - Name test files
test_*.pyand test methodstest_*. - Prefer
tempfile-based test data and avoid machine-specific absolute paths. - For GUI changes, run both simulation (
tests/test_gui.py) and launch smoke test (tests/test_gui_launch.py).
- Current history mixes styles (
feat: ...,Add ...,Delete ...). Prefer consistenttype: summarymessages (feat,fix,docs,test,refactor). - Keep commits focused on one change area.
- PRs should include purpose, key implementation notes, test commands/results, linked issues, and GUI screenshots when UI behavior changes.
- Treat
placeholder_suffixinconfig.yamlas a reserved marker. - Test split/merge workflows on copied data before running against critical knowledge-base folders.