Skip to content

Phase 3: Create pyproject.toml #5

Description

@tinkermonkey

Create the sole project configuration file declaring the package name, Python version constraint, core dependencies, optional adapter extras, and development tooling.

Requirements

  • Create pyproject.toml at the project root
  • Package name: context-library; Python package directory: src/context_library
  • Minimum Python version: 3.10
  • Core (mandatory) dependencies:
    • lancedb>=0.29
    • sentence-transformers>=5.0
    • mistune>=3.0
    • pydantic>=2.0
  • Optional dependency groups:
    • [gmail]: google-api-python-client, google-auth-oauthlib
    • [spotify]: spotipy
    • [todoist]: todoist-api-python
    • [dev]: ruff, mypy, pytest
  • No setup.py, setup.cfg, or requirements.txt may exist

Design Guidance

  • Use hatchling as the build backend (natively supports src/ layout with minimal config)
  • Full file content:
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "context-library"
version = "0.1.0"
requires-python = ">=3.10"
dependencies = [
    "lancedb>=0.29",
    "sentence-transformers>=5.0",
    "mistune>=3.0",
    "pydantic>=2.0",
]

[project.optional-dependencies]
gmail = ["google-api-python-client", "google-auth-oauthlib"]
spotify = ["spotipy"]
todoist = ["todoist-api-python"]
dev = ["ruff", "mypy", "pytest"]

[tool.hatch.build.targets.wheel]
packages = ["src/context_library"]
  • No ORM, no async framework, no DI container dependencies are included — the architecture explicitly forbids these
  • sqlite3 is not listed because it is part of the Python standard library
  • The sentence-transformers package provides the local embedding model (default: all-MiniLM-L6-v2, 384-dimensional vectors) used by the Embedder component

Acceptance Criteria

  • pyproject.toml exists at the project root
  • pip install -e . succeeds in a fresh Python 3.10+ virtual environment and installs lancedb, sentence-transformers, mistune, and pydantic
  • After install, python -c 'import context_library' succeeds without error
  • pip install -e ".[gmail]" additionally installs google-api-python-client and google-auth-oauthlib
  • pip install -e ".[spotify]" additionally installs spotipy
  • pip install -e ".[todoist]" additionally installs todoist-api-python
  • pip install -e ".[dev]" makes ruff, mypy, and pytest available on the path
  • No setup.py, setup.cfg, or requirements.txt exists in the repository

Dependencies

Phase 2

Parent Issue

Part of #1

Discussion

This work is detailed in discussion 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions