Skip to content

Conversation

@junniest
Copy link
Contributor

This PR is to reduce the final package size of the crate. It moves small data files used in doctests into the examples/data directory and updates paths to the files. Additionally, it simplifies the PhyloInfoBuilder class by removing the redundant sequence_file method, as this one file path is the only necessary attribute to create a valid PhyloInfo.

junniest and others added 20 commits July 8, 2025 22:19
Rename `use-precomputed-test-results` feature to `precomputed-test-results` to comply
with Rust crate development guidelines.
Fix README to describe Dima's future feature properly, add ARPIP paper link.
Co-authored-by: Mattes Mrzik <[email protected]>
Added comment to the cost function definition so that users know that the function is maximised
and should be negated if it should be minimised.
Remove sequence_file method from PhyloBuilder as the sequence file path is the minimal
configuration PhyloInfo needs to be properly created.
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 reduces the crate’s final package size by moving small test data into examples/data and cleaning up the builder API.

  • Moves all small data files used in doctests into examples/data and updates paths accordingly
  • Removes the redundant sequence_file setter method from PhyloInfoBuilder
  • Updates Cargo.toml to exclude the old data directory and other non-shipped folders

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
phylo/src/phylo_info/phyloinfo_builder.rs Updated doctest paths to examples/data and removed sequence_file setter
phylo/src/phylo_info/mod.rs Updated example paths in docs to examples/data
phylo/src/optimisers/topo_optimiser.rs Updated example path for K80 data
phylo/src/io/mod.rs Updated all doctest paths for sequence/tree I/O
phylo/examples/data/* Added moved data files
phylo/Cargo.toml Adjusted exclude patterns to drop data/, add benches/ and target/
README.md Updated sample code path for K80.fasta example
Comments suppressed due to low confidence (3)

phylo/src/phylo_info/phyloinfo_builder.rs:59

  • Removing the sequence_file setter method breaks the existing builder API; consider deprecating it first or bumping the crate's major version under semantic versioning.
        PhyloInfoBuilder {

phylo/src/io/mod.rs:109

  • [nitpick] Example doctest writes output into the source-tracked examples/data directory; it may be better to use std::env::temp_dir() or a dedicated temporary path to avoid choking version control or write-permission issues.
/// let output_path = PathBuf::from("./examples/data/doctest_tmp_output.fasta");

phylo/Cargo.toml:15

  • [nitpick] The exclude list includes benches/ and target/, but these directories may not exist in the crate root; consider verifying or removing unused patterns to simplify the manifest.
]

@junniest junniest closed this Jul 12, 2025
@junniest junniest deleted the release-prep/fix-package-size branch July 12, 2025 23:12
@codecov
Copy link

codecov bot commented Jul 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.65%. Comparing base (c9c73d6) to head (e72bff7).
Report is 7 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #70      +/-   ##
===========================================
+ Coverage    96.26%   96.65%   +0.38%     
===========================================
  Files           27       30       +3     
  Lines         3991     4240     +249     
===========================================
+ Hits          3842     4098     +256     
+ Misses         149      142       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant