Skip to content

Support multiple Unix groups via --groups#18

Merged
dimalvovs merged 2 commits intomainfrom
copilot/extend-functionality-for-multiple-groups
Mar 31, 2026
Merged

Support multiple Unix groups via --groups#18
dimalvovs merged 2 commits intomainfrom
copilot/extend-functionality-for-multiple-groups

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 30, 2026

Replace the single-group --group parameter with --groups, accepting one or more group names. Member sets are unioned across all specified groups.

Changes

  • CLI: --group--groups with nargs='+'
  • main(): reads groups: list from config; builds union of members across all groups
  • get_directory_stats(): group: str | Nonegroups: list[str] | None; collects members from all groups before filtering
  • _build_directory_entry(): stores "groups" (list) in output dict instead of scalar "group"
  • report_directory(): prints Groups : group1, group2
  • config.yaml: group: namegroups:\n - name (list format)
  • Tests: all call sites updated; 3 new multi-group tests added

Usage

# Single group (unchanged behavior)
python3 ontrack.py --config config.yaml --groups researchers

# Multiple groups
python3 ontrack.py --config config.yaml --groups researchers analysts

# config.yaml
groups:
  - researchers
  - analysts

Copilot AI changed the title [WIP] Update functionality to support multiple groups Support multiple Unix groups via --groups Mar 30, 2026
Copilot AI requested a review from dimalvovs March 30, 2026 22:01
@dimalvovs dimalvovs marked this pull request as ready for review March 31, 2026 12:59
@dimalvovs dimalvovs merged commit 34af490 into main Mar 31, 2026
1 check passed
Copilot AI added a commit that referenced this pull request Mar 31, 2026
dimalvovs added a commit that referenced this pull request Mar 31, 2026
…-names

docs: sync README param names with #18/#19 renames
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.

2 participants