+
Skip to content

Conversation

cvele
Copy link
Owner

@cvele cvele commented Sep 17, 2025

…process-existing` flag for processing existing images on startup.

…process-existing` flag for processing existing images on startup. Enhance path validation and error handling, and add tests for new functionality.
@Copilot Copilot AI review requested due to automatic review settings September 17, 2025 13:10
Copy link
Contributor

@Copilot Copilot AI left a 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 and IMGC_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>
@Copilot Copilot AI review requested due to automatic review settings September 17, 2025 13:11
Copy link
Contributor

@Copilot Copilot AI left a 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.
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.
@Copilot Copilot AI review requested due to automatic review settings September 17, 2025 13:18
Copy link
Contributor

@Copilot Copilot AI left a 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.
@cvele cvele requested a review from Copilot September 17, 2025 13:25
Copy link
Contributor

@Copilot Copilot AI left a 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.
@cvele cvele requested a review from Copilot September 17, 2025 13:28
Copy link
Contributor

@Copilot Copilot AI left a 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>
@Copilot Copilot AI review requested due to automatic review settings September 17, 2025 13:30
Copy link
Contributor

@Copilot Copilot AI left a 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.

cvele and others added 2 commits September 17, 2025 15:32
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>
@Copilot Copilot AI review requested due to automatic review settings September 17, 2025 13:33
Copy link
Contributor

@Copilot Copilot AI left a 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>
@Copilot Copilot AI review requested due to automatic review settings September 17, 2025 13:34
Copy link
Contributor

@Copilot Copilot AI left a 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>
@Copilot Copilot AI review requested due to automatic review settings September 17, 2025 13:35
Copy link
Contributor

@Copilot Copilot AI left a 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.

@cvele cvele merged commit 3ab0860 into main Sep 17, 2025
4 checks passed
@cvele cvele deleted the feat/process-existing-flag branch September 17, 2025 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载