Skip to content

tree.py enhancements and tests#636

Merged
bartlettroscoe merged 4 commits intoTriBITSPub:masterfrom
bartlettroscoe:tree-exclude-list
Sep 20, 2025
Merged

tree.py enhancements and tests#636
bartlettroscoe merged 4 commits intoTriBITSPub:masterfrom
bartlettroscoe:tree-exclude-list

Conversation

@bartlettroscoe
Copy link
Copy Markdown
Member

No description provided.

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

This PR enhances the tree.py utility with improved command-line options and comprehensive test coverage. The changes modernize the option interface and fix several functional issues.

  • Enhanced exclude functionality to support multiple entries and comma-separated lists
  • Fixed option naming consistency and added long-form alternatives
  • Added comprehensive unit tests with golden output validation

Reviewed Changes

Copilot reviewed 3 out of 11 changed files in this pull request and generated 3 comments.

File Description
tribits/python_utils/tree.py Enhanced exclude logic, fixed option naming, and improved command-line interface
test/python_utils/tree_unittests.py Added comprehensive test suite with golden output tests for all functionality
test/python_utils/CMakeLists.txt Added test configuration for the new unit tests

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread tribits/python_utils/tree.py
Comment thread tribits/python_utils/tree.py
Comment on lines +129 to +130
if exc_entry is None:
continue
Copy link

Copilot AI Sep 20, 2025

Choose a reason for hiding this comment

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

This None check is unnecessary since options.exclude is only set when the option is provided, and action='append' with default=None means individual entries cannot be None.

Suggested change
if exc_entry is None:
continue

Copilot uses AI. Check for mistakes.
NOTE: You can't use the real directory name ".git" because git will not allow
you to commit files under that directory.
Copy link
Copy Markdown
Collaborator

@rabartlett1972 rabartlett1972 left a comment

Choose a reason for hiding this comment

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

LGTM

@bartlettroscoe bartlettroscoe merged commit 02fb9c9 into TriBITSPub:master Sep 20, 2025
6 checks passed
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.

3 participants