Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
330e612
update precommit deps
SYMSCAE Jun 25, 2026
70778b9
fix docformatter conflicts
SYMSCAE Jun 26, 2026
790eff8
Merge pull request #87 from SYMSCAE/precommit-deps
sbillinge Jun 26, 2026
7e24d50
updated cpp version and replaced boost smart pointer usages
SYMSCAE Jun 24, 2026
752e7a2
added nanobind source to build system
SYMSCAE Jun 24, 2026
acf2852
ran docformatter
SYMSCAE Jun 24, 2026
223c60e
news
SYMSCAE Jun 26, 2026
e7abdc8
migrated syntax for srreal_converters and srreal_validators
SYMSCAE Jun 24, 2026
d0df3c9
migrated syntax for srreal_ext and srreal_registry
SYMSCAE Jun 24, 2026
a0f1a62
reworked pickling and migrated syntax for wrap_AtomicStructureAdapter
SYMSCAE Jun 25, 2026
2d7772d
migrated bindings for AtomRadiiTable, Attributes, BaseBondGenerator a…
SYMSCAE Jun 25, 2026
89387dd
migrated bindings for BVParametersTable, BVSCalculator, EventTicker a…
SYMSCAE Jun 25, 2026
8c1b3a5
migrated bindings for ObjCrystAdapters, OverlapCalculator, PairQuanti…
SYMSCAE Jun 25, 2026
8891bc1
migrated bindings for PDFCalculators and PDFenvelope
SYMSCAE Jun 25, 2026
22c32b4
migrated bindings for PeakProfile, PeakWidthModel and ScatteringFacto…
SYMSCAE Jun 25, 2026
abf1700
migrated bindings for StructureAdapter and StructureDifference
SYMSCAE Jun 25, 2026
01003f2
fix build
SYMSCAE Jun 25, 2026
c80eb07
restore default constructors
SYMSCAE Jun 26, 2026
5de644d
corrected code behaviors
SYMSCAE Jun 26, 2026
450ed2e
restore PDFCalculator behavior
SYMSCAE Jun 26, 2026
1d67be4
reworked pickling system
SYMSCAE Jun 26, 2026
ef6acbd
fix tests
SYMSCAE Jun 26, 2026
822968c
ran docformatter
SYMSCAE Jul 7, 2026
f4f1796
cleanup boost imports
SYMSCAE Jul 8, 2026
20ca3cd
set python support range to >= 3.12, < 3.15
SYMSCAE Jul 22, 2026
25f58b0
sync build system choices and approaches with pyobjcryst
SYMSCAE Sep 28, 2026
82b03bf
revert github workflow changes
SYMSCAE Sep 28, 2026
a3b2cde
proper github action workflow
SYMSCAE Sep 28, 2026
4dbffd3
Fix nanobind runtime and custom calculator dispatch
SYMSCAE Oct 3, 2026
fb11ef4
Keep structure edits and retained NumPy views memory-safe
SYMSCAE Oct 3, 2026
eed85d9
Preserve usable calculators and saved calculation state
SYMSCAE Oct 3, 2026
9813214
Summarize nanobind changes in release notes
SYMSCAE Oct 3, 2026
ade2fce
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Oct 3, 2026
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
Prev Previous commit
Next Next commit
fix docformatter conflicts
  • Loading branch information
SYMSCAE committed Jun 26, 2026
commit 70778b96bb84c61272678b848507f743a387e53b
1 change: 0 additions & 1 deletion src/diffpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
##############################################################################
"""Blank namespace package for module diffpy."""


from pkgutil import extend_path

__path__ = extend_path(__path__, __name__)
Expand Down
1 change: 0 additions & 1 deletion src/diffpy/srreal/_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class prototypes is implemented in libdiffpy. Any Python-extended classes
a call of _registerThisType.
"""


import atexit
import weakref

Expand Down
13 changes: 6 additions & 7 deletions src/diffpy/srreal/_final_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@
"""Finalize tweak of classes from the extension module srreal_ext.

This private module handles loading of Python-level tweaks of the
extension-defined classes. Any client that imports this module
must call the `import_now` function. If this module is not loaded
by the time of srreal_ext initialization, `import_now` is executed
from srreal_ext.
extension-defined classes. Any client that imports this module must
call the `import_now` function. If this module is not loaded by the
time of srreal_ext initialization, `import_now` is executed from
srreal_ext.

This avoids unresolvable import dependencies for any order of imports.
"""

_import_now_called = False


def import_now():
"""Import all Python modules that tweak extension-defined
Expand All @@ -46,6 +48,3 @@ def import_now():
import_module("diffpy.srreal.pdfcalculator")
import_module("diffpy.srreal.structureconverters")
return


_import_now_called = False
6 changes: 3 additions & 3 deletions src/diffpy/srreal/atomradiitable.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
##############################################################################
"""Class AtomRadiiTable -- storage of empirical atom radii."""


# exported items, these also makes them show in pydoc.
__all__ = ["AtomRadiiTable", "ConstantRadiiTable", "CovalentRadiiTable"]

Expand Down Expand Up @@ -66,8 +65,9 @@ def clone(self):
return copy.copy(self)

def type(self):
"""Unique string identifier of the CovalentRadiiTable type. This
is used for class registration and as an argument for the
"""Unique string identifier of the CovalentRadiiTable type.

This is used for class registration and as an argument for the
createByType function.

Return string.
Expand Down
2 changes: 1 addition & 1 deletion src/diffpy/srreal/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
##############################################################################
"""class Attributes -- wrapper to C++ class diffpy::Attributes
A base to PairQuantity and quite a few other classes.
A base to PairQuantity and quite a few other classes.
"""

__all__ = ["Attributes"]
Expand Down
7 changes: 2 additions & 5 deletions src/diffpy/srreal/bondcalculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
##############################################################################
"""Class BondCalculator -- distances between atoms in the structure."""


# exported items, these also makes them show in pydoc.
__all__ = ["BondCalculator"]

Expand All @@ -28,14 +27,12 @@

BondCalculator.rmin = propertyFromExtDoubleAttr(
"rmin",
"""Lower bound for the bond distances.
[0 A]""",
"Lower bound for the bond distances. [0 A]",
)

BondCalculator.rmax = propertyFromExtDoubleAttr(
"rmax",
"""Upper bound for the bond distances.
[5 A]""",
"Upper bound for the bond distances. [5 A]",
)


Expand Down
1 change: 0 additions & 1 deletion src/diffpy/srreal/bvparameterstable.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"""Class BVParametersTable -- storage of bond valence parameters class BVParam
-- bond valence data associated with specific cation-anion pair."""


# exported items, these also makes them show in pydoc.
__all__ = ["BVParam", "BVParametersTable"]

Expand Down
27 changes: 14 additions & 13 deletions src/diffpy/srreal/bvscalculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
##############################################################################
"""Class BVSCalculator -- bond valence sums calculator."""


# exported items
__all__ = ["BVSCalculator"]

Expand All @@ -28,30 +27,32 @@

BVSCalculator.valenceprecision = propertyFromExtDoubleAttr(
"valenceprecision",
"""Cutoff value for valence contributions at long distances.
[1e-5]""",
"Cutoff value for valence contributions at long distances. [1e-5]",
)

BVSCalculator.rmaxused = propertyFromExtDoubleAttr(
"rmaxused",
"""Effective bound for bond lengths, where valence contributions
become smaller than valenceprecission, read-only. Always smaller or
equal to rmax. The value depends on ions present in the structure.
""",
(
"Effective bound for bond lengths, where valence contributions"
" become smaller than valenceprecission, read-only."
" Always smaller or equal to rmax."
" The value depends on ions present in the structure."
),
)

BVSCalculator.rmin = propertyFromExtDoubleAttr(
"rmin",
"""Lower bound for the summed bond lengths.
[0 A]""",
"Lower bound for the summed bond lengths. [0 A]",
)

BVSCalculator.rmax = propertyFromExtDoubleAttr(
"rmax",
"""Upper bound for the summed bond lengths. The calculation is
actually cut off much earlier when valence contributions get below
valenceprecission. See also rmaxused and valenceprecission.
[1e6 A]""",
(
"Upper bound for the summed bond lengths."
" The calculation is actually cut off much earlier when"
" valence contributions get below valenceprecission."
" See also rmaxused and valenceprecission. [1e6 A]"
),
)


Expand Down
1 change: 0 additions & 1 deletion src/diffpy/srreal/eventticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"""Class EventTicker -- storage of modification times of dependent
objects."""


# exported items
__all__ = ["EventTicker"]

Expand Down
16 changes: 7 additions & 9 deletions src/diffpy/srreal/overlapcalculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"""Class OverlapCalculator -- calculator of atom overlaps in a
structure."""


# exported items, these also makes them show in pydoc.
__all__ = ["OverlapCalculator"]

Expand All @@ -29,22 +28,21 @@

OverlapCalculator.rmin = propertyFromExtDoubleAttr(
"rmin",
"""Lower bound for the bond distances.
[0 A]""",
"Lower bound for the bond distances. [0 A]",
)

OverlapCalculator.rmax = propertyFromExtDoubleAttr(
"rmax",
"""Upper bound for the bond distances.
[5 A]""",
"Upper bound for the bond distances. [5 A]",
)

OverlapCalculator.rmaxused = propertyFromExtDoubleAttr(
"rmaxused",
"""Effective upper bound for the bond distances.
rmaxused equals either a double of the maximum atom radius
in the structure or rmax.
""",
(
"Effective upper bound for the bond distances."
" rmaxused equals either a double of the maximum"
" atom radius in the structure or rmax."
),
)

# method overrides that support keyword arguments
Expand Down
1 change: 0 additions & 1 deletion src/diffpy/srreal/pairquantity.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"""Class PairQuantity -- base class for Python defined
calculators."""


# exported items
__all__ = ["PairQuantity"]

Expand Down
15 changes: 7 additions & 8 deletions src/diffpy/srreal/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
into parallel calculators.
"""


# exported items
__all__ = ["createParallelCalculator"]

Expand Down Expand Up @@ -48,8 +47,10 @@ def createParallelCalculator(pqobj, ncpu, pmap):
"""

class ParallelPairQuantity(Attributes):
"""Class for running parallel calculations. This is a proxy
class to the wrapper PairQuantity type with the same interface.
"""Class for running parallel calculations.

This is a proxy class to the wrapper PairQuantity type
with the same interface.

Instance data:

Expand Down Expand Up @@ -144,7 +145,7 @@ def parallel_eval(stru):

@property
def evaluatortype(self):
"""str : Type of evaluation procedure.
"""Str : Type of evaluation procedure.

Parallel calculations allow only the 'BASIC' type.
"""
Expand All @@ -166,11 +167,9 @@ def evaluatortype(self, value):

# create proxy methods to all public methods and some protected methods

proxy_forced = set(
"""_getDoubleAttr _setDoubleAttr _hasDoubleAttr
proxy_forced = set("""_getDoubleAttr _setDoubleAttr _hasDoubleAttr
_namesOfDoubleAttributes _namesOfWritableDoubleAttributes
""".split()
)
""".split())

def _make_proxymethod(name, f):
def proxymethod(self, *args, **kwargs):
Expand Down
7 changes: 4 additions & 3 deletions src/diffpy/srreal/pdfbaseline.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
PDFBaseline, ZeroBaseline, LinearBaseline
"""


# exported items
__all__ = """
PDFBaseline makePDFBaseline
Expand All @@ -40,8 +39,10 @@

LinearBaseline.slope = propertyFromExtDoubleAttr(
"slope",
"""Slope of an unscaled linear baseline. For crystal structures it
is preset to (-4 * pi * rho0).""",
(
"Slope of an unscaled linear baseline. For crystal structures it"
" is preset to (-4 * pi * rho0)."
),
)

# Python functions wrapper
Expand Down
Loading
Loading