-
Notifications
You must be signed in to change notification settings - Fork 0
Introduce process-existing-flat #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…process-existing` flag for processing existing images on startup. Enhance path validation and error handling, and add tests for new functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces the --process-existing
flag for controlling whether existing images are processed on startup, changing the default behavior to watch-only mode.
- Adds
--process-existing
command-line flag andIMGC_PROCESS_EXISTING
environment variable support - Implements path validation with helpful error messages for nonexistent directories and files
- Changes default behavior to watch-only mode (existing images are skipped unless flag is set)
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
main.py | Adds process-existing argument parsing, environment variable support, and path validation |
imgc/watcher.py | Implements conditional existing file processing and improved logging |
imgc/cli.py | Updates CLI to pass process_existing parameter |
imgc/config.py | Adds default configuration constant |
tests/test_main.py | New comprehensive tests for argument parsing and path validation |
tests/test_watcher_extra.py | New tests for process_existing functionality and environment variable parsing |
README.md | Updates documentation with new flag usage examples |
CHANGELOG.md | Documents changes in v0.0.2 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…ocess_existing` for clarity. Update documentation and tests to reflect the new default behavior of watch-only mode, enhancing path validation and error handling. Update CHANGELOG for breaking changes and new features.
…to feat/process-existing-flag
This new file outlines project overview, code review guidelines, testing protocols, performance and security considerations, and common patterns to suggest for the imgc (Intelligent Image Compression Watcher) project. It aims to enhance collaboration and ensure code quality across the development team.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This commit introduces dedicated functions for parsing environment variables (_env_str, _env_int, _env_float, _env_bool) in main.py, improving code clarity and reusability. The test suite is updated to validate these functions, ensuring accurate parsing of boolean, string, integer, and float values from the environment. Additionally, the Copilot instructions are enhanced to emphasize testing actual implementations over reimplementing logic in tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This commit extracts environment variable parsing logic into dedicated functions, enhancing clarity and testability. The boolean parsing is updated to use explicit constants for maintainability. Additionally, the CHANGELOG is updated to reflect these changes and improvements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This commit introduces several new context files (.ai-context, .claude-context.md, .claude-project, and .cursorrules) that provide comprehensive documentation on the imgc project. These files outline the project's overview, key features, architecture principles, development philosophy, testing strategies, and common patterns. This addition aims to enhance collaboration, maintainability, and clarity for current and future contributors, ensuring a consistent understanding of the project's goals and standards.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…process-existing` flag for processing existing images on startup.