Skip to content

Add glob filtering to list commands - #10

Open
onefloid wants to merge 1 commit into
mainfrom
feat/glob-filter
Open

onefloid wants to merge 1 commit into
mainfrom
feat/glob-filter

Conversation

@onefloid

Copy link
Copy Markdown
Owner

Summary

  • add a shared --filter PATTERN option to all list commands
  • use case-insensitive glob matching via Python's standard-library fnmatch
  • preserve the existing positional arguments and plain-text output
  • handle TM1py's (private, public) return value for view names correctly
  • document the glob syntax and shell quoting

Examples:

tm1cli cube list --filter 'Sales*'
tm1cli process list --filter '*Import*'
tm1cli view list Sales --filter '*Budget*'

A pattern without wildcards performs an exact case-insensitive match.

Backwards compatibility

Existing commands, positional arguments, and output remain unchanged when --filter is omitted. This intentionally leaves paging, alternative output formats, global scans, and visibility selection out of scope.

Attribution

This focused change extracts and adapts the filtering work proposed by @151N3 in #9. Enis Isufi is also credited as co-author on the commit.

Verification

  • 28 focused command and utility tests pass
  • Pylint: 10.00/10
  • source distribution and wheel build successfully

The repository's existing live-server-dependent tests still require a TM1 configuration; this PR does not change those tests.

Extract the filtering work proposed in #9 into a focused, backwards-compatible change.

Co-authored-by: Enis Isufi <enis.isufi@deutschebahn.com>

This branch has not been deployed

No deployments
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.

1 participant