Closed newville closed 5 months ago
Attention: Patch coverage is 92.30769%
with 1 lines
in your changes are missing coverage. Please review.
Project coverage is 93.20%. Comparing base (
cf2626b
) to head (217347e
).
Files | Patch % | Lines |
---|---|---|
lmfit/model.py | 90.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@reneeotten I'd like to merge this (or a reviewed version of it) and tag as 1.3.1 over the next week or so. Any objections?
@reneeotten I'd like to merge this (or a reviewed version of it) and tag as 1.3.1 over the next week or so. Any objections?
@newville I'll take a look tonight after work.
@reneeotten Thanks! I backed up and did a forced push for one commit to address #953. I think this is probably OK to leave as a few separate commits rather than squash-and-merge. Assuming the tests pass, I'll plan on merging in a day or so.
I would then rebase to get #952 (maybe with more tweaks) merged, then call that 1.3.1.
OK, merging this...
Description
This restores the behavior of setting a non-default keyword value for a Model function argument when creating a Model. That is, in 1.3.0,
could sometimes fail to set the form to
erf
. This is true inStepModel
, for example, as it set the independent variables to ['x'].The fix here is sort of "belt and suspenders" in that: the form above should normally work in 1.3.0, but now that new default value (held in
Model.opts = {'form': 'erf'}
) is used, and then any independent variables are set, and then any runtime keyword arguments.See #947
Not being able to leave well enough alone, I also tweaked
Model.__repr__()
to useModel._reprsting()
and to uselong=True
by default. With this, for example, the repr forStepModel
will always show theform
.This can be squashed-and-merged or the repr string change can be removed.
Type of Changes
Tested on
Python: 3.11.5 | packaged by conda-forge | (main, Aug 27 2023, 03:35:23) [Clang 15.0.7 ]
lmfit: 1.3.0.post2+gcf2626b.d20240407, scipy: 1.12.0, numpy: 1.26.4, asteval: 0.9.32, uncertainties: 3.1.7
Verification
Have you