Skip to content

[Packaging] Migrate pyproject.toml to Poetry for dependency and packaging management #96

@williaby

Description

@williaby

Summary

Refactor the project’s pyproject.toml to adopt Poetry as the canonical dependency and packaging manager. Poetry will manage all runtime and development dependencies, enforce reproducible builds via lockfiles, and streamline both local and CI workflows.


Design Requirements

  • Use Poetry to:
    • Replace pip-tools and requirements*.txt generation
    • Maintain separate [tool.poetry.group.dev.dependencies] for dev tooling (pre-commit, pytest, mypy, etc.)
    • Automatically generate poetry.lock for reproducible CI builds
    • Manage version metadata, license, and maintainers within pyproject.toml

Implementation Tasks

  • Run poetry init to bootstrap missing metadata
  • Migrate install_requires and dev packages into [tool.poetry.dependencies] and [tool.poetry.group.dev.dependencies]
  • Replace requirements.txt generation with poetry export --without-hashes
  • Update CI to:
    • Use poetry install instead of pip install
    • Cache the virtualenv and poetry.lock
  • Add poetry.lock to version control
  • Update documentation for Poetry workflows

Acceptance Criteria

  • The project builds and runs entirely using Poetry
  • CI workflows install dependencies with poetry install
  • No references to requirements.txt or pip-tools remain
  • Development environment setup is documented with poetry shell and poetry install
  • Lockfile is checked into Git and used in all CI jobs

Dependencies

  • Clean transition of setup.cfg tooling configs to pyproject.toml (#XXX)
  • All dev tools must support Poetry environments (already verified)

Milestone

Milestone: v0.3.0 – ETL Enhancements and Data Integrity

Adopting Poetry lays the groundwork for reproducible development environments, streamlined CI/CD, and simpler dependency isolation across LedgerBase components.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions