fix: add parameters option for shape parameter optimization#142
Conversation
remove baseline option because it was removed from ml-spectra-fitting
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #142 +/- ##
=======================================
Coverage 95.51% 95.51%
=======================================
Files 17 17
Lines 379 379
Branches 128 128
=======================================
Hits 362 362
Misses 17 17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the peak optimization wrapper to align with ml-spectra-fitting v6 by removing the no-longer-supported baseline option and introducing a new parameters option to allow per-parameter optimization configuration.
Changes:
- Upgrade
ml-spectra-fittingto^6.0.1and remove the deprecatedbaselineoption from the public optimization API. - Add a new
parametersoption (typed fromml-spectra-fitting) and forward it into the underlyingoptimizecall. - Update the optimization log expectations in tests and add
.yalcto lint/git ignore lists.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
vitest.config.ts |
Removes snapshot formatting overrides from Vitest configuration. |
src/post/optimizePeaksWithLogs.ts |
Drops baseline forwarding and forwards new parameters option into ml-spectra-fitting optimize call. |
src/post/optimizePeaks.ts |
Removes baseline from OptimizePeaksOptions and documents/adds parameters typing. |
src/post/__tests__/optimizePeaksWithLogs.test.ts |
Updates expected optimizer log values for the new ml-spectra-fitting behavior. |
package.json |
Bumps ml-spectra-fitting dependency to v6. |
eslint.config.js / .gitignore |
Ignores .yalc artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Your commit message is wrong for the breaking change. If the title is not the breaking change, you should remove the |
remove baseline option because it was removed from ml-spectra-fitting
it fix the ticket related with shape parameters optimization when the shape.kind is
lorentzianby scaling internally the y data by max absolute value to 1.