Skip to content

chore: Suggestions for BestDose#218

Merged
mhovd merged 7 commits into
bestdosefrom
bestdose-more-suggestions
Nov 5, 2025
Merged

chore: Suggestions for BestDose#218
mhovd merged 7 commits into
bestdosefrom
bestdose-more-suggestions

Conversation

@mhovd
Copy link
Copy Markdown
Collaborator

@mhovd mhovd commented Nov 5, 2025

No description provided.

Copilot AI review requested due to automatic review settings November 5, 2025 11:24
Copy link
Copy Markdown
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 refactors the BestDoseResult API by making its fields private and providing getter methods for controlled access. This improves encapsulation and API design.

Key Changes:

  • Made BestDoseResult fields private (pub(crate))
  • Added public getter methods for accessing result data
  • Introduced a new doses() convenience method to extract dose amounts
  • Added Serialize and Deserialize derives to BestDoseResult

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/bestdose/types.rs Made BestDoseResult fields private and added public getter methods; added doses() helper method; added serialization support
tests/bestdose_tests.rs Updated test code to use new getter methods instead of direct field access; replaced repetitive dose extraction code with doses() method
examples/bestdose_bounds.rs Updated to use optimal_subject() and objf() getter methods
examples/bestdose_auc.rs Updated to use new getter methods and doses() helper method
examples/bestdose.rs Updated to use getter methods for accessing result fields

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread examples/bestdose.rs Outdated
Comment thread tests/bestdose_tests.rs Outdated
Comment thread examples/bestdose_auc.rs
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 5, 2025

🐰 Bencher Report

Branchbestdose-more-suggestions
Testbedrust-moan

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkLatencyseconds (s)
bimodal_ke_npag📈 view plot
⚠️ NO THRESHOLD
24.03 s
bimodal_ke_npod📈 view plot
⚠️ NO THRESHOLD
10.51 s
bimodal_ke_postprob📈 view plot
⚠️ NO THRESHOLD
3.45 s
🐰 View full continuous benchmarking report in Bencher

@mhovd mhovd merged commit 78f7dc2 into bestdose Nov 5, 2025
1 check failed
@mhovd mhovd deleted the bestdose-more-suggestions branch May 21, 2026 12:13
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.

3 participants