Skip to content

docs: add --diversity flag to gotree prune docs and generate example SVGs#27

Merged
fredericlemoine merged 3 commits intomasterfrom
copilot/add-gotree-prune-diversity-option
Mar 13, 2026
Merged

docs: add --diversity flag to gotree prune docs and generate example SVGs#27
fredericlemoine merged 3 commits intomasterfrom
copilot/add-gotree-prune-diversity-option

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 13, 2026

gotree prune --diversity was implemented but absent from the documentation. This adds full documentation coverage and the generated example images.

Changes

  • docs/commands/prune.md

    • Updated option 3 description to explain --diversity behaviour: closest tip pairs are iteratively identified and one randomly removed to maximise diversity of retained tips; clarifies how --random and -r interact

    • Added --diversity to the Flags usage block

    • Added example: keeping 4 diversity-maximising tips from a 20-tip tree

      gotree generate yuletree --seed 10 -l 20 -o outtree1.nw
      gotree prune -i outtree1.nw --random 4 --diversity --seed 10 -r -o pruned.nw
      gotree draw svg -w 200 -H 200 -i outtree1.nw -o commands/prune_8.svg
      gotree draw svg -w 200 -H 200 -i pruned.nw   -o commands/prune_9.svg
  • docs/commands/prune_8.svg — 20-tip input tree (new)

  • docs/commands/prune_9.svg — 4-tip diversity-pruned output tree (new)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: fredericlemoine <16349382+fredericlemoine@users.noreply.github.com>
Copilot AI changed the title [WIP] Add gotree prune --diversity option to documentation docs: add --diversity flag to gotree prune documentation Mar 13, 2026
Copilot AI requested a review from fredericlemoine March 13, 2026 12:36
Co-authored-by: fredericlemoine <16349382+fredericlemoine@users.noreply.github.com>
Copilot AI changed the title docs: add --diversity flag to gotree prune documentation docs: add --diversity flag to gotree prune docs and generate example SVGs Mar 13, 2026
@fredericlemoine fredericlemoine marked this pull request as ready for review March 13, 2026 12:48
@fredericlemoine fredericlemoine self-requested a review March 13, 2026 16:07
@fredericlemoine fredericlemoine merged commit 13dffc0 into master Mar 13, 2026
1 check 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.

2 participants