Skip to content

feat: support multiple sources per section with join and antijoin composition - #294

Open
ArdaTkn wants to merge 1 commit into
SkyeAv:mainfrom
ArdaTkn:feat/multi-source-compose
Open

ArdaTkn wants to merge 1 commit into
SkyeAv:mainfrom
ArdaTkn:feat/multi-source-compose

Conversation

@ArdaTkn

@ArdaTkn ArdaTkn commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Closes #271.

Summary

  • Add sources: dict[str, Source] and compose: list[ComposeStep] (inner | left | right | full | semi | anti) to Section in src/tablassert/models.py, mutually exclusive with single source (section-source-conflict, section-source-required), and validate declared source aliases in compose (compose-unknown-source) and namespaced alias:COL encodings (encoding-unknown-source).
  • Add compose_sources in src/tablassert/lib.py to scan named sources lazily, namespace each source's columns as <alias>__column_<n>, preserve the primary source's extracted_from_row_number, and execute join/antijoin steps before encoding/resolution.
  • Update idxname and trim for alias:COL addressing while keeping single-source configs byte-identical.
  • Update _section_store_key_for_build and section_sources in src/tablassert/cli.py to hash all composed source files and record all source URLs.
  • Add tests/test_multi_source_compose.py and an Unreleased changelog entry in CHANGELOG.md.

Local gate

  • scripts/check_changelog.py --base upstream/main: PASS
  • ruff check . / ruff format --check .: clean
  • pyright: 0 errors
  • vulture / deptry .: clean
  • pytest tests/test_multi_source_compose.py tests/test_docs_source_of_truth.py tests/test_docs_style.py tests/test_models.py tests/test_cover_models.py: all passed

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7ff7f18c-ac3c-4ad6-9056-2063b5f8b624
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ArdaTkn
ArdaTkn force-pushed the feat/multi-source-compose branch from 12c6d39 to fb5b995 Compare November 19, 2026 23:18

This branch has not been deployed

No deployments
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.

Support multiple sources per section with join and antijoin composition

1 participant