mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-07-09 12:41:05 +02:00
## ℹ️ Description This pull request extracts CLI parsing and runtime bootstrap into dedicated modules while keeping the existing command behavior intact. - Link to the related issue(s): Issue # - Describe the motivation and context for this change. ## 📋 Changes Summary - Moved CLI parsing/help logic into `src/kleinanzeigen_bot/cli.py`. - Moved workspace resolution, config loading, browser config application, and file logging setup into `src/kleinanzeigen_bot/runtime_config.py`. - Kept `python -m kleinanzeigen_bot` behavior unchanged via `src/kleinanzeigen_bot/__main__.py`. - Preserved frozen build startup by importing `runtime_config` statically. - Added focused tests for CLI parsing and runtime bootstrap behavior. - Updated contributor docs and translation entries for the moved user-facing messages. ### ⚙️ Type of Change Select the type(s) of change(s) included in this pull request: - [x] 🐞 Bug fix (non-breaking change which fixes an issue) - [ ] ✨ New feature (adds new functionality without breaking existing usage) - [ ] 💥 Breaking change (changes that might break existing user setups, scripts, or configurations) ## ✅ Checklist Before requesting a review, confirm the following: - [x] I have reviewed my changes to ensure they meet the project's standards. - [x] I have tested my changes and ensured that all tests pass (`pdm run test`). - [x] I have formatted the code (`pdm run format`). - [x] I have verified that linting passes (`pdm run lint`). - [x] I have updated documentation where necessary. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Clarified bootstrap docs to state the app’s CLI-driven entry point. * **New Features** * Localized CLI with improved argument parsing, help text and banner control. * Runtime bootstrapping: default-config creation, env-var credential placeholders, category loading, workspace-aware browser profile handling, and optional file logging. * **Refactor** * Centralized startup into the CLI/runtime layer; package entrypoint now delegates to the CLI. * **Tests** * Added/updated unit and smoke tests covering CLI, runtime config, workspace behavior and create-config. * **Chores** * Updated project script wrappers to print tool headers before running linters. <!-- end of auto-generated comment: release notes by coderabbit.ai -->