Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for exclude patterns #42

Merged
merged 5 commits into from
Feb 5, 2024
Merged

Conversation

Pennycook
Copy link
Contributor

exclude_patterns replaces the exclude_files option, allowing the use of git-style "pathspec"s in place of globs. This may seem like a small change, but it's very powerful, allowing patterns as simple as "*.ext" to exclude ALL files with a particular extension.

This PR also adds a --exclude option to the codebasin script that exposes the same functionality without having to modify the YAML configuration file, which is both more convenient and more aligned with our long-term direction.

The functionality here is 99% of the work for supporting a .cbiignore file in the source directory (which basically acts as an implicit list of exclude patterns) but I wanted to keep that separate to simplify review of the base functionality.

exclude_patterns replaces the exclude_files option, allowing the use of
git-style "pathspec"s in place of globs.

This may seem like a small change, but it's very powerful, allowing patterns as
simple as "*.ext" to exclude ALL files with a particular extension.

Signed-off-by: John Pennycook <[email protected]>
Acts as a shorthand for defining exclude patterns in a YAML configuration file.

Signed-off-by: John Pennycook <[email protected]>
@Pennycook Pennycook added the enhancement New feature or request label Feb 5, 2024
@Pennycook Pennycook added this to the 1.2.0 milestone Feb 5, 2024
codebasin.py Outdated Show resolved Hide resolved
setup.py Show resolved Hide resolved
tests/exclude/test_exclude.py Outdated Show resolved Hide resolved
@Pennycook Pennycook merged commit 26ec038 into intel:main Feb 5, 2024
1 check passed
@Pennycook Pennycook deleted the exclude_patterns branch February 5, 2024 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants