Skip to content

deprecate: addParameter, newParameter, and removeParameter deprecation - #214

Merged
sbillinge merged 2 commits into
diffpy:mainfrom
cadenmyers13:addparameter-dep
Sep 16, 2026
Merged

sbillinge merged 2 commits into
diffpy:mainfrom
cadenmyers13:addparameter-dep

Conversation

@cadenmyers13

Copy link
Copy Markdown
Contributor

addParameter, newParameter and removeParameter were not updated to snake case in the last release. This PR updates their names to snake case

cadenmyers13 and others added 2 commits September 16, 2026 11:06
addParameter, newParameter and removeParameter were the public spelling
of RecipeOrganizer's private _add_parameter/_new_parameter/
_remove_parameter, exposed as bare class-level aliases. Point the
snake_case names at those aliases instead and add forwarding
@deprecated shims for the camelCase names, matching how
addParameterSet and removeParameterSet were handled in the same file.

Internal callers in fitbase, pdf, sas and structure move to the new
names so core no longer warns at itself.

BaseSpaceGroupParameters.addParameter in structure/sgconstraints.py is
deliberately untouched: it is a RecipeContainer, not a ParameterSet, so
it neither inherits nor reaches these accessors, and renaming it
belongs with the rest of the structure subpackage renames.

This unblocks the structure and sas subpackage renames, which could not
move off addParameter while it was core's only public spelling.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.51%. Comparing base (a9eae82) to head (caca725).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #214       +/-   ##
===========================================
+ Coverage   71.63%   82.51%   +10.88%     
===========================================
  Files          25       27        +2     
  Lines        3437     4130      +693     
===========================================
+ Hits         2462     3408      +946     
+ Misses        975      722      -253     
Files with missing lines Coverage Δ
tests/test_contribution.py 99.58% <100.00%> (+0.07%) ⬆️
tests/test_parameterset.py 98.33% <100.00%> (+3.59%) ⬆️
tests/test_recipeorganizer.py 99.53% <100.00%> (-0.16%) ⬇️
tests/test_weakrefcallable.py 98.91% <100.00%> (ø)

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cadenmyers13

Copy link
Copy Markdown
Contributor Author

@sbillinge ready for review

@sbillinge
sbillinge merged commit 1f47a32 into diffpy:main Sep 16, 2026
7 checks passed
@cadenmyers13
cadenmyers13 deleted the addparameter-dep branch September 16, 2026 20:42
Sign up for free to 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