Skip to content

Add excluded parts to parts tables#501

Merged
ducky64 merged 2 commits into
masterfrom
excluded-parts
May 28, 2026
Merged

Add excluded parts to parts tables#501
ducky64 merged 2 commits into
masterfrom
excluded-parts

Conversation

@ducky64
Copy link
Copy Markdown
Collaborator

@ducky64 ducky64 commented May 28, 2026

Adds excluded_parts to all the base PartsTablePart.

This could be used, for example, in refinements to exclude parts that are out of stock.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for excluding specific part numbers from parts-table-based selection blocks, enabling refinements (eg, filtering out out-of-stock parts) without changing the underlying parts tables.

Changes:

  • Add an excluded_parts init argument to PartsTablePart and expose it as an argument parameter.
  • Include excluded_parts as a generator dependency for parts-table selectors.
  • Update the base _row_filter to exclude rows whose part number is in excluded_parts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread edg/abstract_parts/PartsTablePart.py Outdated
Comment on lines +66 to +68
return (not self.get(self.part) or (self.get(self.part) == row[self.PART_NUMBER_COL])) and (
not self.get(self.excluded_parts) or row[self.PART_NUMBER_COL] not in self.get(self.excluded_parts)
)
@ducky64 ducky64 merged commit af892cf into master May 28, 2026
12 checks passed
@ducky64 ducky64 deleted the excluded-parts branch May 28, 2026 07:54
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.

2 participants