Skip to content

Commit b05530c

Browse files
committed
src
1 parent 39eeb08 commit b05530c

File tree

4 files changed

+29
-118
lines changed

4 files changed

+29
-118
lines changed

Diff for: src/diffpy/__init__.py

+8-12
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
11
#!/usr/bin/env python
22
##############################################################################
33
#
4-
# diffpy by DANSE Diffraction group
5-
# Simon J. L. Billinge
6-
# (c) 2008 The Trustees of Columbia University
7-
# in the City of New York. All rights reserved.
4+
# (c) 2025 The Trustees of Columbia University in the City of New York.
5+
# All rights reserved.
86
#
9-
# File coded by: Pavol Juhas
7+
# File coded by: Billinge Group members and community contributors.
108
#
11-
# See AUTHORS.txt for a list of people who contributed.
12-
# See LICENSE_DANSE.txt for license information.
9+
# See GitHub contributions for a more detailed list of contributors.
10+
# https://github.com/diffpy/diffpy.srreal/graphs/contributors
11+
#
12+
# See LICENSE.rst for license information.
1313
#
1414
##############################################################################
15-
"""diffpy - tools for structure analysis by diffraction.
16-
17-
Blank namespace package.
18-
"""
15+
"""Blank namespace package for module diffpy."""
1916

2017

2118
from pkgutil import extend_path
2219

2320
__path__ = extend_path(__path__, __name__)
2421

25-
2622
# End of file

Diff for: src/diffpy/srreal/__init__.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
#!/usr/bin/env python
22
##############################################################################
33
#
4-
# diffpy.srreal by DANSE Diffraction group
5-
# Simon J. L. Billinge
6-
# (c) 2008 The Trustees of Columbia University
7-
# in the City of New York. All rights reserved.
4+
# (c) 2025 The Trustees of Columbia University in the City of New York.
5+
# All rights reserved.
86
#
9-
# File coded by: Pavol Juhas
7+
# File coded by: Billinge Group members and community contributors.
108
#
11-
# See AUTHORS.txt for a list of people who contributed.
12-
# See LICENSE_DANSE.txt for license information.
9+
# See GitHub contributions for a more detailed list of contributors.
10+
# https://github.com/diffpy/diffpy.srreal/graphs/contributors
11+
#
12+
# See LICENSE.rst for license information.
1313
#
1414
##############################################################################
1515
"""Tools for real space structure analysis."""
1616

1717
# package version
18-
from diffpy.srreal._version_data import __version__
18+
from diffpy.srreal.version import __version__
1919

2020
# silence the pyflakes syntax checker
2121
assert __version__ or True

Diff for: src/diffpy/srreal/_version_data.py

-49
This file was deleted.

Diff for: src/diffpy/srreal/version.py

+13-49
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,25 @@
11
#!/usr/bin/env python
22
##############################################################################
33
#
4-
# diffpy.srreal by DANSE Diffraction group
5-
# Simon J. L. Billinge
6-
# (c) 2008 The Trustees of Columbia University
7-
# in the City of New York. All rights reserved.
4+
# (c) 2025 The Trustees of Columbia University in the City of New York.
5+
# All rights reserved.
86
#
9-
# File coded by: Pavol Juhas
7+
# File coded by: Billinge Group members and community contributors.
108
#
11-
# See AUTHORS.txt for a list of people who contributed.
12-
# See LICENSE_DANSE.txt for license information.
9+
# See GitHub contributions for a more detailed list of contributors.
10+
# https://github.com/diffpy/diffpy.srreal/graphs/contributors
11+
#
12+
# See LICENSE.rst for license information.
1313
#
1414
##############################################################################
15-
"""Definitions of version-related constants and of libdiffpy_version_info.
16-
17-
Notes
18-
-----
19-
Variable `__gitsha__` is deprecated as of version 1.3.
20-
Use `__git_commit__` instead.
21-
22-
Variable `libdiffpy_version_info.git_sha` is deprecated as of version 1.4.0.
23-
Use `libdiffpy_version_info.git_commit` instead.
24-
"""
25-
26-
__all__ = ["__date__", "__git_commit__", "__timestamp__", "__version__", "libdiffpy_version_info"]
27-
28-
29-
from diffpy.srreal._version_data import __date__, __git_commit__, __timestamp__, __version__
30-
31-
# TODO remove deprecated __gitsha__ in version 1.4.
32-
__gitsha__ = __git_commit__
33-
34-
# version information on the active libdiffpy shared library -----------------
15+
"""Definition of __version__."""
3516

36-
from collections import namedtuple
17+
# We do not use the other three variables, but can be added back if needed.
18+
# __all__ = ["__date__", "__git_commit__", "__timestamp__", "__version__"]
3719

38-
from diffpy.srreal.srreal_ext import _get_libdiffpy_version_info_dict
20+
# obtain version information
21+
from importlib.metadata import version
3922

40-
libdiffpy_version_info = namedtuple(
41-
"libdiffpy_version_info",
42-
"major minor micro patch version_number version date git_commit " +
43-
# TODO remove git_sha in version 1.4.
44-
"git_sha",
45-
)
46-
vd = _get_libdiffpy_version_info_dict()
47-
libdiffpy_version_info = libdiffpy_version_info(
48-
version=vd["version_str"],
49-
version_number=vd["version"],
50-
major=vd["major"],
51-
minor=vd["minor"],
52-
micro=vd["micro"],
53-
patch=vd["patch"],
54-
date=vd["date"],
55-
git_commit=vd["git_commit"],
56-
# TODO remove git_sha in version 1.4.
57-
git_sha=vd["git_commit"],
58-
)
59-
del vd
23+
__version__ = version("diffpy.srreal")
6024

6125
# End of file

0 commit comments

Comments
 (0)