✨ feat(cli): add --namespace / -N flag to data-access commands#383
Merged
Conversation
Add namespace scoping to all CLI data-access commands (entity, resource, system, audit, usage groups). When a non-default namespace is provided, the repository is scoped via repo.namespace() before executing business logic. Default namespace skips the call for backward compatibility. - Add namespace_option decorator and _resolve_namespace helper for DRY - Apply to all 17 data-access commands across 5 command groups - Add 11 unit tests covering each group + short flag -N Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #383 +/- ##
==========================================
+ Coverage 91.82% 91.86% +0.04%
==========================================
Files 33 33
Lines 7385 7426 +41
==========================================
+ Hits 6781 6822 +41
Misses 604 604
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--namespace/-Nflag to all 17 data-access CLI commands across entity, resource, system, audit, and usage groupsrepo.namespace()before executing business logicnamespace_optiondecorator and_resolve_namespacehelper for DRY application across commands$default) is a no-op for backward compatibilityTest plan
-NCloses #368
🤖 Generated with Claude Code