Architecture Decision: Choice of Poetry for Dependency Management - surapuramakhil-org/Job_search_agent GitHub Wiki

Context

When developing the job-hunt-assistant project, we needed a robust and reliable tool for managing dependencies and packaging. The current pip-based setup has two critical issues:

  • Requirements.txt inconsistencies across different systems
  • Slow installation times (120+ seconds) impacting CI/CD pipeline efficiency

Decision

We chose Poetry as our dependency management solution primarily because of its platform-independent lockfile generation. This is crucial for our open-source project where contributors work across different operating systems.

Key Advantages of Poetry:

  • Platform-Agnostic Dependency Resolution: Generates consistent lockfiles that work across all operating systems
  • Deterministic Builds: Ensures all contributors and CI environments use identical dependencies
  • Project Metadata Management: Single pyproject.toml file handles all project configurations
  • Built-in Publishing Tools: Streamlined package publishing to PyPI

Alternatives Considered

uv

While uv offers impressive features, it has critical limitations for our use case:

Advantages

  • 10-20x faster installation speeds compared to pip
  • Built-in Python version management
  • Simplified toolchain replacing multiple tools

Deal-breaking Limitations

  • Platform-dependent lockfile generation
  • Different lockfiles needed for different operating systems
  • Additional configuration required for cross-platform compatibility
  • Requires building packages to determine metadata on each platform

References