Skip to content

Implement exponential function#130

Merged
henrikjacobsenfys merged 2 commits into
developfrom
exponential-function
Mar 13, 2026
Merged

Implement exponential function#130
henrikjacobsenfys merged 2 commits into
developfrom
exponential-function

Conversation

@henrikjacobsenfys

Copy link
Copy Markdown
Member

Every user* so far has requested this and needs it to fit their data.

  • I have a single user.

@henrikjacobsenfys henrikjacobsenfys added [scope] enhancement Adds/improves features (major.MINOR.patch) [priority] high Should be prioritized soon labels Mar 12, 2026
@codecov

codecov Bot commented Mar 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.29730% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@e28e3c0). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...asydynamics/sample_model/components/exponential.py 97.22% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #130   +/-   ##
==========================================
  Coverage           ?   97.75%           
==========================================
  Files              ?       37           
  Lines              ?     2408           
  Branches           ?      399           
==========================================
  Hits               ?     2354           
  Misses             ?       34           
  Partials           ?       20           
Flag Coverage Δ
integration 0.00% <0.00%> (?)
unittests 97.75% <97.29%> (?)

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.

@rozyczko rozyczko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks very good!
I made some nitpicking comments, though :)

Raises:
TypeError: If amplitude, center, or rate are not numbers or
Parameters.
ValueError: If rate is not positive.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

there is only a check for type and for finiteness (lines 104 and 89). No check is being made for positiveness.
Please update the docstring

Comment on lines +46 to +47
display_name (str | None): Name of the component. unique_name
(str | None): Unique name of the component.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

unique_name should be moved to the line below

# Attempt to rollback on failure
try:
for p in pars:
if hasattr(p, 'convert_unit'):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think this check is necessary. p is always a Parameter with all the methods.

@henrikjacobsenfys henrikjacobsenfys merged commit 6540464 into develop Mar 13, 2026
34 checks passed
@henrikjacobsenfys henrikjacobsenfys deleted the exponential-function branch March 25, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[priority] high Should be prioritized soon [scope] enhancement Adds/improves features (major.MINOR.patch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants