Skip to content

Conversation

henrikjacobsenfys
Copy link
Member

Model components: Gaussian, Lorentzian, Damped Harmonic Oscillator, Delta Function, Polynomial. There is also a user defined component which is not implemented yet - it's there as a reminder.

These components are not intended to be used alone - they should go in SampleModels, which will be in 2 PRs.

@henrikjacobsenfys henrikjacobsenfys added the [scope] enhancement Adds/improves features (major.MINOR.patch) label Sep 19, 2025
Copy link

codecov bot commented Sep 19, 2025

Codecov Report

❌ Patch coverage is 98.48485% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.48%. Comparing base (3d99faa) to head (b5bd527).

Files with missing lines Patch % Lines
src/easydynamics/sample/components.py 98.45% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop      #50       +/-   ##
============================================
+ Coverage     0.00%   98.48%   +98.48%     
============================================
  Files            1        2        +1     
  Lines            2      396      +394     
============================================
+ Hits             0      390      +390     
- Misses           2        6        +4     
Flag Coverage Δ
unittests 98.48% <98.48%> (+98.48%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

Copy link
Member

@rozyczko rozyczko left a comment

Choose a reason for hiding this comment

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

This is a great start! No serious issues, the base class for the components is well designed and the derived classes are correctly implemented.
Only minor issues raised:

  • missing type annotations (especially for return values)
  • naming style consistency
  • lack of tests, e.g. no coverage of copy, __repr__, convert_unit and what's most important - nothing of the base class (apart of fix_all_parameters and fit_all_parameters

@henrikjacobsenfys
Copy link
Member Author

@rozyczko would you have a quick look again? I added tons of tests, fixed a few issues that they revealed, and fixed the formatting issues. I removed the user defined component for now, since I need to think more about how I want to implement it, and it's not required for the first release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[scope] enhancement Adds/improves features (major.MINOR.patch)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants