Skip to content

Ensure no warning or errors when no extrapolation occurs - #278

Merged
sbillinge merged 3 commits into
diffpy:mainfrom
Sparks29032:extrap_fix
Dec 19, 2025
Merged

Ensure no warning or errors when no extrapolation occurs#278
sbillinge merged 3 commits into
diffpy:mainfrom
Sparks29032:extrap_fix

Conversation

@Sparks29032

Copy link
Copy Markdown
Collaborator

In #255, self.extrapolation_info was not set as a class variable. As such, there are cases where the code seeks to reference this value when it is not defined, producing an error.

For example, when a morph function without extrapolation warnings (e.g. scale) is used with one with warnings (e.g. stretch) and the the one with warnings does not extrapolate (e.g. --scale=1 --stretch=0), this will produce an error.
Tests are now added to cover this case in the future.

Please merge this asap. We may need to do a 0.3.1 release and scrap the 0.3.0 one on conda-forge since this error is not rare.

@codecov

codecovBot commented Dec 19, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.93%. Comparing base (177d073) to head (d3e5a91).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #278 +/- ##
=======================================
Coverage 99.93% 99.93% =======================================
Files 24 24 Lines 1446 1480 +34 =======================================
+ Hits 1445 1479 +34 
Misses 1 1 
Files with missing linesCoverage Δ
tests/test_morphshift.py100.00% <100.00%> (ø)
tests/test_morphsqueeze.py100.00% <100.00%> (ø)
tests/test_morphstretch.py100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sbillinge
sbillinge merged commit 811c86a into diffpy:mainDec 19, 2025
7 checks passed
Sign up for freeto 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.

2 participants

@Sparks29032@sbillinge