diffpy.utils 3.4.2__tar.gz → 3.4.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/AUTHORS.rst +1 -1
  2. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/PKG-INFO +26 -11
  3. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/README.rst +25 -10
  4. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/pyproject.toml +2 -2
  5. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/src/diffpy.utils.egg-info/PKG-INFO +26 -11
  6. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/src/diffpy.utils.egg-info/SOURCES.txt +2 -2
  7. diffpy_utils-3.4.3/src/diffpy.utils.egg-info/requires.txt +1 -0
  8. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/tests/test_diffraction_objects.py +7 -7
  9. diffpy_utils-3.4.3/tests/test_version.py +10 -0
  10. diffpy_utils-3.4.2/requirements/build.txt +0 -2
  11. diffpy_utils-3.4.2/src/diffpy/utils/version.cfg +0 -6
  12. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/LICENSE.rst +0 -0
  13. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/LICENSE_DANSE.txt +0 -0
  14. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/MANIFEST.in +0 -0
  15. /diffpy_utils-3.4.2/requirements/pip.txt → /diffpy_utils-3.4.3/requirements/build.txt +0 -0
  16. /diffpy_utils-3.4.2/requirements/run.txt → /diffpy_utils-3.4.3/requirements/conda.txt +0 -0
  17. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/requirements/docs.txt +0 -0
  18. /diffpy_utils-3.4.2/src/diffpy.utils.egg-info/requires.txt → /diffpy_utils-3.4.3/requirements/pip.txt +0 -0
  19. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/requirements/test.txt +0 -0
  20. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/setup.cfg +0 -0
  21. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/src/diffpy/__init__.py +0 -0
  22. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/src/diffpy/utils/__init__.py +0 -0
  23. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/src/diffpy/utils/parsers/__init__.py +0 -0
  24. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/src/diffpy/utils/parsers/custom_exceptions.py +0 -0
  25. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/src/diffpy/utils/parsers/loaddata.py +0 -0
  26. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/src/diffpy/utils/parsers/resample.py +0 -0
  27. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/src/diffpy/utils/parsers/serialization.py +0 -0
  28. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/src/diffpy/utils/scattering_objects/__init__.py +0 -0
  29. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/src/diffpy/utils/scattering_objects/diffraction_objects.py +0 -0
  30. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/src/diffpy/utils/scattering_objects/user_config.py +0 -0
  31. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/src/diffpy/utils/tools.py +0 -0
  32. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/src/diffpy/utils/version.py +0 -0
  33. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/src/diffpy/utils/wx/__init__.py +0 -0
  34. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/src/diffpy/utils/wx/gridutils.py +0 -0
  35. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/src/diffpy.utils.egg-info/dependency_links.txt +0 -0
  36. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/src/diffpy.utils.egg-info/top_level.txt +0 -0
  37. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/tests/conftest.py +0 -0
  38. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/tests/test_loaddata.py +0 -0
  39. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/tests/test_resample.py +0 -0
  40. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/tests/test_serialization.py +0 -0
  41. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/tests/test_tools.py +0 -0
  42. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/tests/testdata/dbload/e1.gr +0 -0
  43. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/tests/testdata/dbload/e2.gr +0 -0
  44. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/tests/testdata/dbload/e3.gr +0 -0
  45. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/tests/testdata/generated_db.json +0 -0
  46. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/tests/testdata/generatewarnings.txt +0 -0
  47. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/tests/testdata/loaddata01.txt +0 -0
  48. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/tests/testdata/loaddatawithheaders.txt +0 -0
  49. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/tests/testdata/loadfile.txt +0 -0
  50. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/tests/testdata/strumining.json +0 -0
  51. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/tests/testdata/targetjson.json +0 -0
  52. {diffpy_utils-3.4.2 → diffpy_utils-3.4.3}/tests/testdata/wrong.type +0 -0
@@ -1,7 +1,7 @@
1
1
  Authors
2
2
  =======
3
3
 
4
- Billinge Group and community contibutors.
4
+ Billinge Group and community contributors.
5
5
 
6
6
  Contributors
7
7
  ------------
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: diffpy.utils
3
- Version: 3.4.2
3
+ Version: 3.4.3
4
4
  Summary: Shared utilities for diffpy packages
5
5
  Author-email: "Simon J.L. Billinge group" <simon.billinge@gmail.com>
6
6
  Maintainer-email: "Simon J.L. Billinge group" <simon.billinge@gmail.com>
@@ -71,17 +71,25 @@ diffpy.utils Package
71
71
  General purpose shared utilities for the diffpy libraries.
72
72
 
73
73
  The diffpy.utils package provides functions for extracting array data from
74
- variously formatted text files and wx GUI utilities used by the PDFgui
75
- program. The package also includes an interpolation function based on the
74
+ variously formatted text files, an interpolation function based on the
76
75
  Whittaker-Shannon formula that can be used to resample a PDF or other profile
77
- function over a new grid.
76
+ function over a new grid, `Diffraction_objects` for conveniently manipulating
77
+ diffraction data, and some wx GUI utilities used by the PDFgui
78
+ program.
78
79
 
79
80
  Citation
80
81
  --------
81
82
 
82
- If you use diffpy.utils in a scientific publication, we would like you to cite this package as
83
+ If you use this program for a scientific research that leads
84
+ to publication, we ask that you acknowledge use of the program
85
+ by citing the following paper in your publication:
83
86
 
84
- diffpy.utils Package, https://github.com/diffpy/diffpy.utils
87
+ P. Juhás, C. L. Farrow, X. Yang, K. R. Knox and S. J. L. Billinge,
88
+ `Complex modeling: a strategy and software program for combining
89
+ multiple information sources to solve ill posed structure and
90
+ nanostructure inverse problems
91
+ <http://dx.doi.org/10.1107/S2053273315014473>`__,
92
+ *Acta Crystallogr. A* **71**, 562-568 (2015).
85
93
 
86
94
  Documentation
87
95
  -------------
@@ -102,16 +110,18 @@ To add "conda-forge" to the conda channels, run the following in a terminal. ::
102
110
  We want to install our packages in a suitable conda environment.
103
111
  The following creates and activates a new environment named ``diffpy.utils_env`` ::
104
112
 
105
- conda create -n diffpy.utils_env python=3
113
+ conda create -n diffpy.utils_env diffpy.utils
106
114
  conda activate diffpy.utils_env
107
115
 
108
- Then, to fully install ``diffpy.utils`` in our active environment, run ::
116
+ To confirm that the installation was successful, type ::
109
117
 
110
- conda install diffpy.utils
118
+ python -c "import diffpy.utils; print(diffpy.utils.__version__)"
111
119
 
112
- Another option is to use ``pip`` to download and install the latest release from
120
+ The output should print the latest version displayed on the badges above.
121
+
122
+ If the above does not work, you can use ``pip`` to download and install the latest release from
113
123
  `Python Package Index <https://pypi.python.org>`_.
114
- To install using ``pip`` into your ``diffpy.utils_env`` environment type ::
124
+ To install using ``pip`` into your ``diffpy.utils_env`` environment, type ::
115
125
 
116
126
  pip install diffpy.utils
117
127
 
@@ -121,6 +131,11 @@ and run the following ::
121
131
 
122
132
  pip install .
123
133
 
134
+ Getting Started
135
+ ---------------
136
+
137
+ You may consult our `online documentation <https://diffpy.github.io/diffpy.utils>`_ for tutorials and API references.
138
+
124
139
  Support and Contribute
125
140
  ----------------------
126
141
 
@@ -41,17 +41,25 @@ diffpy.utils Package
41
41
  General purpose shared utilities for the diffpy libraries.
42
42
 
43
43
  The diffpy.utils package provides functions for extracting array data from
44
- variously formatted text files and wx GUI utilities used by the PDFgui
45
- program. The package also includes an interpolation function based on the
44
+ variously formatted text files, an interpolation function based on the
46
45
  Whittaker-Shannon formula that can be used to resample a PDF or other profile
47
- function over a new grid.
46
+ function over a new grid, `Diffraction_objects` for conveniently manipulating
47
+ diffraction data, and some wx GUI utilities used by the PDFgui
48
+ program.
48
49
 
49
50
  Citation
50
51
  --------
51
52
 
52
- If you use diffpy.utils in a scientific publication, we would like you to cite this package as
53
+ If you use this program for a scientific research that leads
54
+ to publication, we ask that you acknowledge use of the program
55
+ by citing the following paper in your publication:
53
56
 
54
- diffpy.utils Package, https://github.com/diffpy/diffpy.utils
57
+ P. Juhás, C. L. Farrow, X. Yang, K. R. Knox and S. J. L. Billinge,
58
+ `Complex modeling: a strategy and software program for combining
59
+ multiple information sources to solve ill posed structure and
60
+ nanostructure inverse problems
61
+ <http://dx.doi.org/10.1107/S2053273315014473>`__,
62
+ *Acta Crystallogr. A* **71**, 562-568 (2015).
55
63
 
56
64
  Documentation
57
65
  -------------
@@ -72,16 +80,18 @@ To add "conda-forge" to the conda channels, run the following in a terminal. ::
72
80
  We want to install our packages in a suitable conda environment.
73
81
  The following creates and activates a new environment named ``diffpy.utils_env`` ::
74
82
 
75
- conda create -n diffpy.utils_env python=3
83
+ conda create -n diffpy.utils_env diffpy.utils
76
84
  conda activate diffpy.utils_env
77
85
 
78
- Then, to fully install ``diffpy.utils`` in our active environment, run ::
86
+ To confirm that the installation was successful, type ::
79
87
 
80
- conda install diffpy.utils
88
+ python -c "import diffpy.utils; print(diffpy.utils.__version__)"
81
89
 
82
- Another option is to use ``pip`` to download and install the latest release from
90
+ The output should print the latest version displayed on the badges above.
91
+
92
+ If the above does not work, you can use ``pip`` to download and install the latest release from
83
93
  `Python Package Index <https://pypi.python.org>`_.
84
- To install using ``pip`` into your ``diffpy.utils_env`` environment type ::
94
+ To install using ``pip`` into your ``diffpy.utils_env`` environment, type ::
85
95
 
86
96
  pip install diffpy.utils
87
97
 
@@ -91,6 +101,11 @@ and run the following ::
91
101
 
92
102
  pip install .
93
103
 
104
+ Getting Started
105
+ ---------------
106
+
107
+ You may consult our `online documentation <https://diffpy.github.io/diffpy.utils>`_ for tutorials and API references.
108
+
94
109
  Support and Contribute
95
110
  ----------------------
96
111
 
@@ -1,5 +1,5 @@
1
1
  [build-system]
2
- requires = ["setuptools>=62.0", "setuptools-git-versioning<2"]
2
+ requires = ["setuptools>=62.0", "setuptools-git-versioning>=2.0"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
@@ -49,7 +49,7 @@ exclude = [] # exclude packages matching these glob patterns (empty by default)
49
49
  namespaces = false # to disable scanning PEP 420 namespaces (true by default)
50
50
 
51
51
  [tool.setuptools.dynamic]
52
- dependencies = {file = ["requirements/run.txt"]}
52
+ dependencies = {file = ["requirements/pip.txt"]}
53
53
 
54
54
  [tool.black]
55
55
  line-length = 115
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: diffpy.utils
3
- Version: 3.4.2
3
+ Version: 3.4.3
4
4
  Summary: Shared utilities for diffpy packages
5
5
  Author-email: "Simon J.L. Billinge group" <simon.billinge@gmail.com>
6
6
  Maintainer-email: "Simon J.L. Billinge group" <simon.billinge@gmail.com>
@@ -71,17 +71,25 @@ diffpy.utils Package
71
71
  General purpose shared utilities for the diffpy libraries.
72
72
 
73
73
  The diffpy.utils package provides functions for extracting array data from
74
- variously formatted text files and wx GUI utilities used by the PDFgui
75
- program. The package also includes an interpolation function based on the
74
+ variously formatted text files, an interpolation function based on the
76
75
  Whittaker-Shannon formula that can be used to resample a PDF or other profile
77
- function over a new grid.
76
+ function over a new grid, `Diffraction_objects` for conveniently manipulating
77
+ diffraction data, and some wx GUI utilities used by the PDFgui
78
+ program.
78
79
 
79
80
  Citation
80
81
  --------
81
82
 
82
- If you use diffpy.utils in a scientific publication, we would like you to cite this package as
83
+ If you use this program for a scientific research that leads
84
+ to publication, we ask that you acknowledge use of the program
85
+ by citing the following paper in your publication:
83
86
 
84
- diffpy.utils Package, https://github.com/diffpy/diffpy.utils
87
+ P. Juhás, C. L. Farrow, X. Yang, K. R. Knox and S. J. L. Billinge,
88
+ `Complex modeling: a strategy and software program for combining
89
+ multiple information sources to solve ill posed structure and
90
+ nanostructure inverse problems
91
+ <http://dx.doi.org/10.1107/S2053273315014473>`__,
92
+ *Acta Crystallogr. A* **71**, 562-568 (2015).
85
93
 
86
94
  Documentation
87
95
  -------------
@@ -102,16 +110,18 @@ To add "conda-forge" to the conda channels, run the following in a terminal. ::
102
110
  We want to install our packages in a suitable conda environment.
103
111
  The following creates and activates a new environment named ``diffpy.utils_env`` ::
104
112
 
105
- conda create -n diffpy.utils_env python=3
113
+ conda create -n diffpy.utils_env diffpy.utils
106
114
  conda activate diffpy.utils_env
107
115
 
108
- Then, to fully install ``diffpy.utils`` in our active environment, run ::
116
+ To confirm that the installation was successful, type ::
109
117
 
110
- conda install diffpy.utils
118
+ python -c "import diffpy.utils; print(diffpy.utils.__version__)"
111
119
 
112
- Another option is to use ``pip`` to download and install the latest release from
120
+ The output should print the latest version displayed on the badges above.
121
+
122
+ If the above does not work, you can use ``pip`` to download and install the latest release from
113
123
  `Python Package Index <https://pypi.python.org>`_.
114
- To install using ``pip`` into your ``diffpy.utils_env`` environment type ::
124
+ To install using ``pip`` into your ``diffpy.utils_env`` environment, type ::
115
125
 
116
126
  pip install diffpy.utils
117
127
 
@@ -121,6 +131,11 @@ and run the following ::
121
131
 
122
132
  pip install .
123
133
 
134
+ Getting Started
135
+ ---------------
136
+
137
+ You may consult our `online documentation <https://diffpy.github.io/diffpy.utils>`_ for tutorials and API references.
138
+
124
139
  Support and Contribute
125
140
  ----------------------
126
141
 
@@ -5,9 +5,9 @@ MANIFEST.in
5
5
  README.rst
6
6
  pyproject.toml
7
7
  requirements/build.txt
8
+ requirements/conda.txt
8
9
  requirements/docs.txt
9
10
  requirements/pip.txt
10
- requirements/run.txt
11
11
  requirements/test.txt
12
12
  src/diffpy/__init__.py
13
13
  src/diffpy.utils.egg-info/PKG-INFO
@@ -17,7 +17,6 @@ src/diffpy.utils.egg-info/requires.txt
17
17
  src/diffpy.utils.egg-info/top_level.txt
18
18
  src/diffpy/utils/__init__.py
19
19
  src/diffpy/utils/tools.py
20
- src/diffpy/utils/version.cfg
21
20
  src/diffpy/utils/version.py
22
21
  src/diffpy/utils/parsers/__init__.py
23
22
  src/diffpy/utils/parsers/custom_exceptions.py
@@ -35,6 +34,7 @@ tests/test_loaddata.py
35
34
  tests/test_resample.py
36
35
  tests/test_serialization.py
37
36
  tests/test_tools.py
37
+ tests/test_version.py
38
38
  tests/testdata/generated_db.json
39
39
  tests/testdata/generatewarnings.txt
40
40
  tests/testdata/loaddata01.txt
@@ -232,7 +232,7 @@ def test_diffraction_objects_equality(inputs1, inputs2, expected):
232
232
 
233
233
 
234
234
  def test_dump(tmp_path, mocker):
235
- x, y = np.linspace(0, 10, 11), np.linspace(0, 10, 11)
235
+ x, y = np.linspace(0, 5, 6), np.linspace(0, 5, 6)
236
236
  directory = Path(tmp_path)
237
237
  file = directory / "testfile"
238
238
  test = Diffraction_object()
@@ -242,8 +242,12 @@ def test_dump(tmp_path, mocker):
242
242
  test.insert_scattering_quantity(
243
243
  x, y, "q", metadata={"thing1": 1, "thing2": "thing2", "package_info": {"package2": "3.4.5"}}
244
244
  )
245
- with mocker.patch("importlib.metadata.version", return_value="3.3.0"), freeze_time("2012-01-14"):
245
+
246
+ mocker.patch("importlib.metadata.version", return_value="3.3.0")
247
+
248
+ with freeze_time("2012-01-14"):
246
249
  test.dump(file, "q")
250
+
247
251
  with open(file, "r") as f:
248
252
  actual = f.read()
249
253
  expected = (
@@ -256,10 +260,6 @@ def test_dump(tmp_path, mocker):
256
260
  "3.000000000000000000e+00 3.000000000000000000e+00\n"
257
261
  "4.000000000000000000e+00 4.000000000000000000e+00\n"
258
262
  "5.000000000000000000e+00 5.000000000000000000e+00\n"
259
- "6.000000000000000000e+00 6.000000000000000000e+00\n"
260
- "7.000000000000000000e+00 7.000000000000000000e+00\n"
261
- "8.000000000000000000e+00 8.000000000000000000e+00\n"
262
- "9.000000000000000000e+00 9.000000000000000000e+00\n"
263
- "1.000000000000000000e+01 1.000000000000000000e+01\n"
264
263
  )
264
+
265
265
  assert actual == expected
@@ -0,0 +1,10 @@
1
+ """Unit tests for __version__.py
2
+ """
3
+
4
+ import diffpy.utils
5
+
6
+
7
+ def test_package_version():
8
+ """Ensure the package version is defined and not set to the initial placeholder."""
9
+ assert hasattr(diffpy.utils, "__version__")
10
+ assert diffpy.utils.__version__ != "0.0.0"
@@ -1,2 +0,0 @@
1
- python
2
- setuptools
@@ -1,6 +0,0 @@
1
- [DEFAULT]
2
- version = 3.2.7
3
- commit = 45e562b77b9ca90270b5d348a3b75588193da915
4
- date = 2024-01-20 03:07:19 +0000
5
- timestamp = 1705720039
6
-
File without changes
File without changes
File without changes