Skip to content

feat(framework): Validate FAB include/exclude pattern lists in app config#6803

Open
chongshenng wants to merge 6 commits intomainfrom
feat/minimal-fab-pattern-config-validation
Open

feat(framework): Validate FAB include/exclude pattern lists in app config#6803
chongshenng wants to merge 6 commits intomainfrom
feat/minimal-fab-pattern-config-validation

Conversation

@chongshenng
Copy link
Member

This PR adds config validation for [tool.flwr.app].fab-include and fab-exclude: if set, they must be lists of non-empty strings (for example, fab-include = ["**/*.py"], fab-exclude = ["tests/**"]; invalid: fab-include = "src/**" or fab-exclude = ["", 123]). There are no flwr build behavior changes.

@chongshenng chongshenng requested a review from tanertopal as a code owner March 20, 2026 14:49
Copilot AI review requested due to automatic review settings March 20, 2026 14:49
Copy link
Contributor

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 stricter validation for optional FAB file pattern configuration fields in pyproject.toml, ensuring [tool.flwr.app].fab-include and fab-exclude are well-formed without changing flwr build behavior.

Changes:

  • Introduce constants for the fab-include/fab-exclude config keys.
  • Add validation ensuring fab-include/fab-exclude (when present) are lists of non-empty strings.
  • Add unit tests covering valid patterns and invalid types/items.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
framework/py/flwr/common/constant.py Adds constants for FAB include/exclude config key names.
framework/py/flwr/common/config.py Implements pattern-list validation and wires it into existing config field validation.
framework/py/flwr/common/config_test.py Adds tests for valid/invalid fab-include and fab-exclude inputs.

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

@github-actions github-actions bot added the Maintainer Used to determine what PRs (mainly) come from Flower maintainers. label Mar 20, 2026
@chongshenng chongshenng requested a review from panh99 March 20, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maintainer Used to determine what PRs (mainly) come from Flower maintainers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants