Skip to content

Define package structure for integrations #452

Description

@psschwei

Summary

Decide and implement the package structure for integrations - whether they live in the core package as extras or as separate packages.

Problem / Opportunity

The package structure affects how users install and use integrations. There are tradeoffs between:

  • Extras (mellea[langchain]): Simpler for users, single package to manage
  • Separate packages (mellea-langchain): Cleaner dependency isolation, independent versioning

This decision impacts all integration tasks and should be made early.

User Story / Use Case

As a mellea user, I want a clear, simple way to install the integrations I need so that I can get started quickly without unnecessary dependencies.

Proposed Solution (High-level)

Implement the chosen structure in:

  • Updated pyproject.toml with extras or separate package configs
  • mellea/integrations/__init__.py with lazy imports
  • Import guards for optional dependencies
  • Documentation for installation

Recommendation: Start with extras (mellea[langchain], mellea[dspy], etc.) for simplicity. Consider separate packages later if versioning becomes complex.

Scope

In scope:

  • pyproject.toml configuration for chosen structure
  • Lazy import system for optional dependencies
  • Helpful error messages when dependencies are missing
  • Installation documentation

Out of scope:

  • Separate package repositories (if separate packages chosen)
  • Publishing automation
  • Version compatibility matrices

Acceptance Criteria

  • pip install mellea[langchain] works (or equivalent for chosen structure)
  • Import errors are helpful when dependencies are missing
  • No core functionality broken when extras are not installed

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions