Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split "plot_tree" phases #7

Merged
merged 9 commits into from
Nov 9, 2022
Merged

Split "plot_tree" phases #7

merged 9 commits into from
Nov 9, 2022

Conversation

russHyde
Copy link
Collaborator

@russHyde russHyde commented Nov 7, 2022

Aim: simplify the definition / saving of the tree images in treeview() function.

The tree images are created by the .plot_tree() inner function. But, since plot_tree depended on a lot of variables in the treeview() scope, it wasn't easy to pull plot_tree() out in one go.

.plot_tree() had a few separate stages: The creation of a non-interactive ggtree object, the creation of an interactive ggtree object, the conversion of the latter into an htmlwidget, and the saving of some of these objects.

The changes here (which build upon #6 ) extract those inner phases of .plot_tree and all variables used by the new functions are passed in as arguments, to isolate them from the plot_view scope.

A further PR, where plot_tree is separated into the steps that make the tree objects, and the steps that save them, and extract those functions from the plot_tree scope builds upon this in [TODO]

@russHyde russHyde requested a review from jr-nicola November 7, 2022 11:52
@russHyde russHyde mentioned this pull request Nov 7, 2022
@russHyde russHyde changed the base branch from master to staging-wp3 November 7, 2022 11:58
Copy link

@jr-nicola jr-nicola left a comment

Choose a reason for hiding this comment

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

Looks good to me - much easier to read when the code is in smaller, separate function. The version number in the Description and NEWS file need bumped before merging, but otherwise happy for you to merge whenever :)

@russHyde russHyde force-pushed the split-plot-tree-phases branch from d630c3c to 75f0a75 Compare November 9, 2022 09:53
@russHyde
Copy link
Collaborator Author

russHyde commented Nov 9, 2022

@jr-nicola I've bumped the version of the package now. Could you approve please.

@russHyde russHyde requested a review from jr-nicola November 9, 2022 09:58
Copy link

@jr-nicola jr-nicola left a comment

Choose a reason for hiding this comment

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

Thanks Russ - looks good

@russHyde russHyde merged commit ecbd87b into staging-wp3 Nov 9, 2022
@russHyde russHyde deleted the split-plot-tree-phases branch November 9, 2022 10:18
russHyde pushed a commit that referenced this pull request Jan 17, 2023
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