Skip to content

dep: getValue deprecation in favor of snake case - #215

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

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

Conversation

@cadenmyers13

Copy link
Copy Markdown
Contributor

getValue deprecation was also missed in the last release for the name deprecation. This PR deprecates it in favor of snake case.

cadenmyers13 and others added 2 commits September 16, 2026 11:04
getValue was the last camelCase half of the value accessor pair; its
partner setValue was renamed in c4c0b10 and shipped in 3.3.0. Follow
that commit's shape: rename outright through the internal machinery
(LiteralABC, Literal, Argument, Operator, ParameterProxy,
ParameterAdapter) and all internal call sites, and add a forwarding
@deprecated shim on the user-facing class.

Unlike setValue, getValue is reachable on the Operator side of the
hierarchy too, so the shim goes on Literal as well as on Parameter.
Parameter's overrides Literal's, so Parameter users get a message
naming Parameter.get_value and everyone else gets one naming
Literal.get_value. Argument, Operator, Equation, ParameterProxy and
ParameterAdapter all keep accepting getValue.

This unblocks the structure and sas subpackage renames, which could not
rename their getValue overrides while core still dispatched on the old
name.

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

Copy link
Copy Markdown
Contributor Author

@sbillinge ready for review

@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.78912% with 40 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.60%. Comparing base (a9eae82) to head (c901b47).
⚠️ Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
tests/test_objcrystparset.py 0.00% 30 Missing ⚠️
tests/test_sgconstraints.py 0.00% 4 Missing ⚠️
tests/test_pdfgenerator.py 0.00% 3 Missing ⚠️
tests/test_sas.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #215       +/-   ##
===========================================
+ Coverage   71.63%   82.60%   +10.97%     
===========================================
  Files          25       27        +2     
  Lines        3437     4151      +714     
===========================================
+ Hits         2462     3429      +967     
+ Misses        975      722      -253     
Files with missing lines Coverage Δ
tests/test_constraint.py 98.30% <100.00%> (+1.33%) ⬆️
tests/test_diffpyparset.py 98.79% <100.00%> (ø)
tests/test_equation.py 100.00% <100.00%> (ø)
tests/test_fitrecipe.py 99.86% <100.00%> (+0.09%) ⬆️
tests/test_literals.py 99.33% <100.00%> (+0.15%) ⬆️
tests/test_parameter.py 99.06% <100.00%> (+0.91%) ⬆️
tests/test_recipeorganizer.py 99.53% <100.00%> (-0.16%) ⬇️
tests/test_visitors.py 99.19% <100.00%> (ø)
tests/test_weakrefcallable.py 98.91% <100.00%> (ø)
tests/test_pdfgenerator.py 16.66% <0.00%> (ø)
... and 3 more

... and 5 files with indirect coverage changes

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

@sbillinge
sbillinge merged commit 8d8931a into diffpy:main Sep 16, 2026
7 checks passed
@sbillinge

Copy link
Copy Markdown
Contributor

@cadenmyers13 thanks, nice and clean.

@cadenmyers13
cadenmyers13 deleted the getvalue-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