Skip to content

Conversation

@bokelley
Copy link
Contributor

Summary

Moves email-validator from optional dev dependencies to runtime dependencies. The generated Pydantic types use EmailStr which requires email-validator at runtime for email validation.

Changes

  • Move email-validator>=2.0.0 to main dependencies in pyproject.toml
  • Add test_cli_imports_successfully to catch missing runtime dependencies

Fixes CLI failing with ModuleNotFoundError: No module named 'email_validator' when importing generated types.

🤖 Generated with Claude Code

bokelley and others added 2 commits November 16, 2025 13:27
The generated types use Pydantic's EmailStr which requires email-validator
at runtime. Previously it was only in dev dependencies, causing the CLI to
fail with "ModuleNotFoundError: No module named 'email_validator'".

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Added test_cli_imports_successfully to verify that the CLI can import
all required dependencies, specifically including types that use EmailStr
which requires email_validator. This test would have caught the bug where
email_validator was only in dev dependencies.

The test imports Contact from brand_manifest which uses EmailStr, triggering
Pydantic's validation that requires email_validator to be installed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@bokelley bokelley merged commit 6ce1535 into main Nov 16, 2025
7 checks passed
bokelley added a commit that referenced this pull request Nov 18, 2025
* fix: Move email-validator to runtime dependencies

The generated types use Pydantic's EmailStr which requires email-validator
at runtime. Previously it was only in dev dependencies, causing the CLI to
fail with "ModuleNotFoundError: No module named 'email_validator'".

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* test: Add CLI import test to catch missing runtime dependencies

Added test_cli_imports_successfully to verify that the CLI can import
all required dependencies, specifically including types that use EmailStr
which requires email_validator. This test would have caught the bug where
email_validator was only in dev dependencies.

The test imports Contact from brand_manifest which uses EmailStr, triggering
Pydantic's validation that requires email_validator to be installed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants