Skip to content

Meta builder abstraction#1195

Merged
audiodude merged 3 commits into
mainfrom
metaBuilder_abstraction
Jun 16, 2026
Merged

Meta builder abstraction#1195
audiodude merged 3 commits into
mainfrom
metaBuilder_abstraction

Conversation

@ziaddevv

Copy link
Copy Markdown
Collaborator

Introduces a MetaBuilder abstraction for builders that reference other builders.

New structure:

  • wp1/selection/abstract_builder.py

    • AbstractBuilder
    • generic builder lifecycle
    • _as_text()
  • wp1/selection/meta_builder.py

    • MetaBuilder
    • _builder_model()
    • _builder_label()
    • _reference_label()
    • _is_meta_builder()
    • _dedupe()
    • _fetch_selection_data()
  • wp1/selection/models/combinator.py

    • Builder(MetaBuilder)
    • Combinator-specific validation/build logic
    • include/exclude group handling
    • TSV-to-set parsing
    • union/intersection/difference behavior
  • wp1/selection/meta_builder_test.py

    • tests for shared MetaBuilder referenced-selection behavior
  • wp1/selection/models/combinator_test.py

    • updated to use the new MetaBuilder structure

    fixes Move metabulider helpers out of CombinatorBuilder #1181

@codecov

codecov Bot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.85714% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.50%. Comparing base (70a35b7) to head (8545797).

Files with missing lines Patch % Lines
wp1/selection/meta_builder.py 89.65% 3 Missing ⚠️
wp1/logic/builder.py 77.77% 2 Missing ⚠️
wp1/models/wp10/builder.py 95.23% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1195      +/-   ##
==========================================
+ Coverage   92.46%   92.50%   +0.03%     
==========================================
  Files          77       78       +1     
  Lines        4701     4711      +10     
==========================================
+ Hits         4347     4358      +11     
+ Misses        354      353       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ziaddevv

Copy link
Copy Markdown
Collaborator Author

@audiodude can you review this ? I feel like i'm being blocked by it so we can move forward

@audiodude audiodude left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay. This is a really good refactor. Most of my comments are getting into the territory of "I'm sure this works, but....". Trying to make sound design decisions and make sure the code is readable and resuable. Thanks!

Comment thread wp1/selection/meta_builder.py Outdated
Comment thread wp1/selection/meta_builder.py Outdated
Comment thread wp1/selection/meta_builder.py Outdated
Comment thread wp1/selection/meta_builder.py Outdated
Comment thread wp1/selection/meta_builder.py Outdated
Comment thread wp1/selection/meta_builder.py
Comment thread wp1/selection/meta_builder.py Outdated

@audiodude audiodude left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work refactoring those methods, I think they make more sense now.

Comment thread wp1/models/wp10/builder.py Outdated
Comment thread wp1/selection/models/combinator.py Outdated
Comment thread wp1/selection/models/combinator.py Outdated
Comment thread wp1/selection/models/combinator.py Outdated
@ziaddevv ziaddevv force-pushed the metaBuilder_abstraction branch from 62587a6 to 8545797 Compare June 16, 2026 12:50
@audiodude audiodude added this pull request to the merge queue Jun 16, 2026
Merged via the queue into main with commit 41f25e8 Jun 16, 2026
7 checks passed
@audiodude audiodude deleted the metaBuilder_abstraction branch June 16, 2026 13:33
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.

Move metabulider helpers out of CombinatorBuilder

2 participants