Skip to content

feat: make --user optional in password set/clear, use imap.user from config - #28

Merged
KHolodilin merged 5 commits into
mainfrom
feature/issue-7-password-user-optional
Jan 25, 2026
Merged

feat: make --user optional in password set/clear, use imap.user from config#28
KHolodilin merged 5 commits into
mainfrom
feature/issue-7-password-user-optional

Conversation

@KHolodilin

@KHolodilin KHolodilin commented Jan 24, 2026

Copy link
Copy Markdown
Owner

Description

Make --user optional for password set and password clear. When omitted, use imap.user from config. Error if neither --user nor imap.user is available.

Closes #27

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test addition or update
  • Other (please describe):

Related Issue

Closes #27

Changes Made

  • password: --user optional for password set / password clear; fallback to imap.user from config; error if neither.
  • send folder: dir and --to optional; fallback to smtp.send_folder and smtp.default_recipient from config.
  • send without subcommand: python -m email_processor send defaults to send folder with config.
  • README: Quick Start (install only, Fetch/Send steps, step 7 Send folder, step 8 Full pipeline); Fetch/send use config by default; send and send folder documented; Features block removed.
  • CodeQL / security: URL substring sanitization, workflow permissions, redact_email for logs.

Testing

  • All existing tests pass (731 passed, 32 skipped)
  • New tests added for new functionality
  • Manual testing performed (if applicable)
  • Test coverage maintained or improved

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published
  • Pre-commit hooks pass (pre-commit run --all-files)
  • Code formatting passes (ruff format --check .)
  • Linting passes (ruff check .)

Additional Notes

  • --user still overrides imap.user when both are present.
  • fetch and send use config by default; send = send from folder (config).

…config

- args: --user optional (default None) for password set and clear

- __main__: resolve user from args.user or cfg imap.user; error if neither

- tests: missing-user, imap.user fallback, parse without --user

- README: Quick Start and Password Management mention optional --user

Fixes #27
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

- Remove 'smtp.example.com' substring check (py/incomplete-url-substring-sanitization)

- Add permissions to CI and build-and-publish workflows (actions/missing-workflow-permissions)

- Add redact_email, use in auth/smtp/fetcher logs (py/clear-text-logging-sensitive-data)
- Quick Start: install module only (no .venv), split First Run into Fetch + Send

- Remove Features & Improvements / v7.1 Features block (duplicate of Key Features)
…older

- send folder: dir and --to optional, use smtp.send_folder / default_recipient from config

- send without subcommand defaults to send folder with config

- README: fetch/send use config by default, document 'send' and 'send folder'

- Tests: send_folder missing dir/to, parse send no args, send-without-subcommand integration
@KHolodilin
KHolodilin merged commit ce4ee62 into main Jan 25, 2026
18 checks passed
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.

feat: make --user optional in password set/clear, use imap.user from config

2 participants