Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions news/cf-names-match-3.4.0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* No news added: The camelCase characteristic function deprecation messages are unreleased, so the pdf-dep entry is corrected instead.

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
2 changes: 1 addition & 1 deletion news/pdf-dep.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

**Changed:**

* The deprecation messages of the camelCase characteristic functions (``sphericalCF``, ``shellCF`` and the others) now point to ``diffpy.cmipdf.characteristicfunctions`` instead of ``diffpy.srfit.pdf.characteristicfunctions``. ``lognormalSphericalCF`` now points to ``lognormal_spherical_distribution``, and ``shellCF`` and ``shellCF2`` now point to ``spherical_shell``.
* The deprecation messages of the camelCase characteristic functions (``sphericalCF``, ``shellCF`` and the others) now point to ``diffpy.cmipdf.characteristicfunctions`` instead of ``diffpy.srfit.pdf.characteristicfunctions``. ``lognormalSphericalCF``, ``shellCF`` and ``shellCF2`` point to the names srfit 3.4.0 gave them, ``lognormal_spherical_particle`` and ``shell_particle``.

**Deprecated:**

Expand Down
14 changes: 7 additions & 7 deletions src/diffpy/srfit/pdf/characteristicfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def _build_dep_msg(old_name, new_name, signature_note=None):

lognormalSphericalCF_dep_msg = _build_dep_msg(
"lognormalSphericalCF",
"lognormal_spherical_distribution",
"lognormal_spherical_particle",
"Additionally, the signature has changed. Please pass the parameters "
"'psize' and 'psig' as 'particle_diameter' and "
"'particle_diameter_sigma', respectively.",
Expand All @@ -110,14 +110,14 @@ def _build_dep_msg(old_name, new_name, signature_note=None):
"'sthick' as 'sheet_thickness'.",
)

shellCF_dep_msg = _build_dep_msg("shellCF", "spherical_shell")
shellCF_dep_msg = _build_dep_msg("shellCF", "shell_particle")

shellCF2_dep_msg = _build_dep_msg(
"shellCF2",
"spherical_shell",
"shell_particle",
"Additionally, the parameterization has changed. 'shellCF2' took the "
"central radius 'a' and the shell thickness 'delta', while "
"'spherical_shell' takes the inner radius. Please pass "
"'shell_particle' takes the inner radius. Please pass "
"radius = a - delta / 2 and thickness = delta.",
)

Expand Down Expand Up @@ -579,7 +579,7 @@ def lognormalSphericalCF(r, psize, psig):
4.0.0.

Please use
diffpy.cmipdf.characteristicfunctions.lognormal_spherical_distribution
diffpy.cmipdf.characteristicfunctions.lognormal_spherical_particle
instead.
"""
return lognormal_spherical_particle(r, psize, psig)
Expand All @@ -601,7 +601,7 @@ def shellCF(r, radius, thickness):
"""This function has been deprecated and will be removed in version
4.0.0.

Please use diffpy.cmipdf.characteristicfunctions.spherical_shell
Please use diffpy.cmipdf.characteristicfunctions.shell_particle
instead.
"""
return shell_particle(r, radius, thickness)
Expand All @@ -612,7 +612,7 @@ def shellCF2(r, a, delta):
"""This function has been deprecated and will be removed in version
4.0.0.

Please use diffpy.cmipdf.characteristicfunctions.spherical_shell
Please use diffpy.cmipdf.characteristicfunctions.shell_particle
instead.
"""
return shell_particle(r, a - delta / 2, delta)
Expand Down
8 changes: 4 additions & 4 deletions tests/test_characteristicfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ def test_non_physical_input_warns_only_once(
(
"lognormalSphericalCF",
"lognormal_spherical_particle",
"lognormal_spherical_distribution",
"lognormal_spherical_particle",
"Additionally, the signature has changed. Please pass the "
"parameters 'psize' and 'psig' as 'particle_diameter' and "
"'particle_diameter_sigma', respectively.",
Expand All @@ -679,7 +679,7 @@ def test_non_physical_input_warns_only_once(
(
"shellCF",
"shell_particle",
"spherical_shell",
"shell_particle",
"",
(numpy.array([0.0, 5.0, 12.5]), 10.0, 5.0),
(numpy.array([0.0, 5.0, 12.5]), 10.0, 5.0),
Expand All @@ -691,10 +691,10 @@ def test_non_physical_input_warns_only_once(
(
"shellCF2",
"shell_particle",
"spherical_shell",
"shell_particle",
"Additionally, the parameterization has changed. 'shellCF2' took "
"the central radius 'a' and the shell thickness 'delta', while "
"'spherical_shell' takes the inner radius. Please pass "
"'shell_particle' takes the inner radius. Please pass "
"radius = a - delta / 2 and thickness = delta.",
(numpy.array([0.0, 5.0, 12.5]), 12.5, 5.0),
(numpy.array([0.0, 5.0, 12.5]), 10.0, 5.0),
Expand Down
Loading