Skip to content

feat(r): add all base+utils in components for the R package#43

Merged
Neclow merged 1 commit intosbhattlab:mainfrom
Neclow:update_r
May 23, 2025
Merged

feat(r): add all base+utils in components for the R package#43
Neclow merged 1 commit intosbhattlab:mainfrom
Neclow:update_r

Conversation

@Neclow
Copy link
Collaborator

@Neclow Neclow commented May 22, 2025

No description provided.

@Neclow Neclow requested a review from Copilot May 23, 2025 11:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces several new functions and tests, expanding the Phylo2Vec R package and its Rust backend.

  • Added tests for the new matrix conversion functions in test_base.R.
  • Renamed and added several functions in the Rust backend and updated corresponding R wrapper functions and documentation.
  • Updated package installation scripts and documentation to expose new APIs.

Reviewed Changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/testthat/test_base.R Added tests for converting matrices to Newick and back
tests/testthat/config.R Updated test configuration constants
src/rust/src/lib.rs Added new functions (sample_matrix, to_matrix, check_m, cophenetic functions) and renamed cophenetic_distances to cophenetic_from_vector
scripts/install-package.R Modified the installation process to use devtools::install
man/*.Rd Updated/added documentation for newly introduced functions and APIs
R/extendr-wrappers.R; R/base_newick.R; R/metrics.R Added new wrapper functions and utility functions supporting new features
NAMESPACE Updated exports to include new functions
R/utils.R Added new sample_tree function

}

/// Sample a random tree via Phylo2Vec
/// Sample a random tree topoloy via Phylo2Vec
Copy link

Copilot AI May 23, 2025

Choose a reason for hiding this comment

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

The word 'topoloy' appears to be a typo. Please change it to 'topology' for clarity.

Suggested change
/// Sample a random tree topoloy via Phylo2Vec
/// Sample a random tree topology via Phylo2Vec

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +10
\title{Sample a random tree topoloy via Phylo2Vec}
\usage{
sample_vector(n_leaves, ordered)
}
\description{
Sample a random tree via Phylo2Vec
Sample a random tree topoloy via Phylo2Vec
Copy link

Copilot AI May 23, 2025

Choose a reason for hiding this comment

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

There is a spelling error in the title ('topoloy'). Please correct it to 'topology'.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will solve in a future commit

@Neclow Neclow merged commit 142e3cb into sbhattlab:main May 23, 2025
7 checks passed
@Neclow Neclow deleted the update_r branch October 16, 2025 12:37
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